Table: Integration_Invoice
Columns
NameTypeConstraintsDescription
integration_invoice_KEYintNOT NULLAUTO-INCREMENT: Database assigned primary key for this table
row_versiontimestampNOT NULL
update__staff_KEYintNOT NULL
update_date_utcdatetimeNOT NULL
create_date_utcdatetimeNOT NULL
invoice_KEYintNOT NULLKey to the Invoice record created for this exported invoice.
integration_application_KEYintNOT NULLKey to a record in Integration_Application indicating which application exported this data.
integration_date_utcdatetimeNOT NULLDate the data was exported from the remote application, in UTC.
user_namenvarchar (30)NOT NULLUser name of the person who triggered the export.
client_idnvarchar (11)NOT NULLThe Client ID that this invoice is for (in text form).
tinnvarchar (11)NOT NULLTIN of the client the invoice is for.
entitynvarchar (11)NOT NULLEntity as defined by the exporting applciation.
fiscal_year_endsmalldatetimeFYE as defined by the exporting applciation.
invoice_numbernvarchar (30)NOT NULLInvoice number as it is in the exporting application.
referencenvarchar (30)NOT NULLUser defined reference for this entry.
invoice_datesmalldatetimeDate of the invoice.
due_datesmalldatetimeDue date
billed_datesmalldatetimeDate this integration_invoice was saved.
time_amount_billeddecimal (17, 2)NOT NULLIf the exporting application understands time and expense, the amount of the invoice that should be matched up with time. (Optional)
expense_amount_billeddecimal (17, 2)NOT NULLIf the exporting application understands time and expense, the amount of the invoice that should be matched up with expense. (Optional)
progress_amount_billeddecimal (17, 2)NOT NULLIf the exporting application understands time and expense, the amount of the invoice that should be matched up with progress. (Optional)
total_amount_billeddecimal (17, 2)NOT NULLTotal amount of WIP billed by the invoice.
surchargedecimal (17, 2)NOT NULLThe surcharge amount on this integration_invoice (always 0 or positive.)
discountdecimal (17, 2)NOT NULLThe discount amount on this integration_invoice (always 0 or negative.)
sales_taxdecimal (17, 2)NOT NULLAmount of sales tax on this invoice.
service_taxdecimal (17, 2)NOT NULLAmount of service tax on this invoice.
amountdecimal (17, 2)NOT NULLThe total amount of this item.
prior_payment_amountdecimal (17, 2)NOT NULLTotal amount of all prior payments received at the time of this invoice.
approved_datesmalldatetimeDate this item was approved.
posted_datesmalldatetimeDate this item was posted.
commentsnvarchar (-1)NOT NULLComments about this item that can be included on reports.
Primary key
NameColumnsDescription
PK_Integration_Invoice$integration_invoice_KEYintegration_invoice_KEYCLUSTERED
Unique constraints
NameColumnsDescription
UK_Integration_Invoice$invoice_KEYinvoice_KEY
Indexes
NameColumnsDescription
IX_Integration_Invoice$integration_application_KEYintegration_application_KEYIndex supports foreign key FK_Integration_Invoice__Integration_Application__integration_application_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_Integration_Invoice__Integration_Application__integration_application_KEYintegration_application_KEYIntegration_Application
FK_Integration_Invoice__Invoice__invoice_KEYinvoice_KEYInvoiceon delete cascade;
Incoming foreign keys
NameColumnsReferencing tableDescription
FK_Integration_Invoice_Prior_Payment__Integration_Invoice__integration_invoice_KEYintegration_invoice_KEYIntegration_Invoice_Prior_Paymenton delete cascade;

Schema diagram