Files
krowworkforce_controltower/base44/entities/Invoice.jsonc
2026-08-17 19:45:29 +05:30

309 lines
7.1 KiB
JSON

{
"name": "Invoice",
"type": "object",
"properties": {
"invoice_number": {
"type": "string",
"description": "Unique invoice number (e.g., INV-619)"
},
"event_name": {
"type": "string",
"description": "Name of the event"
},
"event_id": {
"type": "string",
"description": "Related event ID"
},
"po_reference": {
"type": "string",
"description": "Purchase order reference"
},
"event_date": {
"type": "string",
"format": "date",
"description": "Event date"
},
"from_company": {
"type": "object",
"description": "Vendor company information",
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
}
}
},
"to_company": {
"type": "object",
"description": "Client company information",
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"email": {
"type": "string"
},
"manager": {
"type": "string"
},
"phone": {
"type": "string"
},
"vendor_id": {
"type": "string"
}
}
},
"business_name": {
"type": "string",
"description": "Client/Business name"
},
"manager_name": {
"type": "string",
"description": "Manager name"
},
"vendor_name": {
"type": "string",
"description": "Vendor providing services"
},
"vendor_id": {
"type": "string",
"description": "Vendor ID"
},
"hub": {
"type": "string",
"description": "Hub location"
},
"cost_center": {
"type": "string",
"description": "Cost center or department"
},
"roles": {
"type": "array",
"description": "Grouped by role with staff details",
"items": {
"type": "object",
"properties": {
"role_name": {
"type": "string"
},
"staff_entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"staff_name": {
"type": "string"
},
"staff_id": {
"type": "string"
},
"date": {
"type": "string",
"format": "date"
},
"position": {
"type": "string"
},
"check_in": {
"type": "string"
},
"check_out": {
"type": "string"
},
"worked_hours": {
"type": "number"
},
"regular_hours": {
"type": "number"
},
"ot_hours": {
"type": "number"
},
"dt_hours": {
"type": "number"
},
"regular_rate": {
"type": "number"
},
"ot_rate": {
"type": "number"
},
"dt_rate": {
"type": "number"
},
"regular_value": {
"type": "number"
},
"ot_value": {
"type": "number"
},
"dt_value": {
"type": "number"
},
"rate": {
"type": "number"
},
"total": {
"type": "number"
}
}
}
},
"role_subtotal": {
"type": "number"
}
}
}
},
"subtotal": {
"type": "number",
"description": "Subtotal amount"
},
"other_charges": {
"type": "number",
"description": "Additional charges"
},
"amount": {
"type": "number",
"minimum": 0,
"description": "Grand total invoice amount"
},
"tax_amount": {
"type": "number",
"description": "Tax amount"
},
"tax_rate": {
"type": "number",
"description": "Tax rate percentage"
},
"status": {
"type": "string",
"enum": [
"Draft",
"Pending Review",
"Approved",
"Disputed",
"Under Review",
"Resolved",
"Overdue",
"Paid",
"Reconciled",
"Cancelled"
],
"default": "Draft",
"description": "Current invoice status"
},
"issue_date": {
"type": "string",
"format": "date",
"description": "Invoice issue date"
},
"due_date": {
"type": "string",
"format": "date",
"description": "Payment due date"
},
"paid_date": {
"type": "string",
"format": "date",
"description": "Date payment was received"
},
"payment_method": {
"type": "string",
"enum": [
"Credit Card",
"ACH",
"Wire Transfer",
"Check",
"Cash"
],
"description": "Payment method used"
},
"payment_reference": {
"type": "string",
"description": "Payment reference/transaction ID"
},
"dispute_reason": {
"type": "string",
"description": "Reason for dispute"
},
"dispute_details": {
"type": "string",
"description": "Detailed dispute information"
},
"disputed_items": {
"type": "array",
"description": "List of disputed staff entry indices",
"items": {
"type": "object",
"properties": {
"role_index": {
"type": "number"
},
"staff_index": {
"type": "number"
}
}
}
},
"disputed_by": {
"type": "string",
"description": "User who disputed the invoice"
},
"disputed_date": {
"type": "string",
"format": "date-time",
"description": "When dispute was raised"
},
"resolution_notes": {
"type": "string",
"description": "Notes about dispute resolution"
},
"approved_by": {
"type": "string",
"description": "User who approved the invoice"
},
"approved_date": {
"type": "string",
"format": "date-time",
"description": "When invoice was approved"
},
"is_auto_generated": {
"type": "boolean",
"default": false,
"description": "Whether invoice was auto-generated from event"
},
"pdf_url": {
"type": "string",
"description": "URL to PDF version of invoice"
},
"notes": {
"type": "string",
"description": "Additional notes about the invoice"
},
"internal_notes": {
"type": "string",
"description": "Internal notes not visible to client"
}
},
"required": [
"invoice_number",
"business_name",
"amount",
"status",
"issue_date",
"due_date"
]
}