انتقل إلى المحتوى الرئيسي

Invoice & Payment Entities

Entities for invoices, estimates, invoice items, payments, and invoice history.

Invoice

ColumnTypeDescription
invoiceDateDateInvoice/estimate date
invoiceNumbernumberUnique number
dueDateDatePayment due date
currencystringCurrency code
discountValuenumberDiscount amount
discountTypeenumPERCENTAGE or FLAT
taxnumberTax percentage
tax2number?Second tax percentage
taxTypeenum?Tax calculation type
termsstring?Payment terms text
totalValuenumber?Calculated total
statusenumInvoice status
isEstimatebooleantrue for estimates
isAcceptedboolean?Client acceptance status
sentTostring?Recipient email
tokenstring?Public sharing token
toContactIdUUID?FK to recipient contact
fromOrganizationIdUUID?FK to sender organization

Invoice Statuses: DRAFT, SENT, VIEWED, ACCEPTED, REJECTED, PARTIALLY_PAID, PAID, OVERDUE, VOID

InvoiceItem

ColumnTypeDescription
descriptionstring?Line item description
pricenumberUnit price
quantitynumberQuantity
totalValuenumberLine total
applyTaxboolean?Apply tax to this item
applyDiscountboolean?Apply discount
invoiceIdUUIDFK to invoice
taskIdUUID?FK to task
employeeIdUUID?FK to employee
projectIdUUID?FK to project
productIdUUID?FK to product
expenseIdUUID?FK to expense

Payment

ColumnTypeDescription
paymentDateDatePayment date
amountnumberAmount paid
notestring?Payment note
currencystringCurrency code
paymentMethodenum?Payment method
overdueboolean?Is overdue
invoiceIdUUID?FK to invoice
employeeIdUUID?FK to employee
contactIdUUID?FK to contact
projectIdUUID?FK to project

Payment Methods: CASH, BANK_TRANSFER, DEBIT_CARD, CREDIT_CARD, CHEQUE, ONLINE

EstimateEmail

ColumnTypeDescription
tokenstringAccess token
emailstringRecipient email
expireDateDateToken expiry
invoiceIdUUIDFK to invoice

InvoiceEstimateHistory

ColumnTypeDescription
actionstringChange description
titlestringHistory entry title
invoiceIdUUIDFK to invoice
userIdUUID?FK to user who changed