Skip to content

dbo.primeAccountsReceivableInvoices ​

Info Generated by scripts/Generate-DataDictionary.ps1 - do not edit by hand. Edit descriptions in schemas/tables/dbo.primeAccountsReceivableInvoices.json and regenerate.

Columns ​

#ColumnTypeNullableFlagsDescription
1IduniqueidentifiernoPrimary key / unique identifier for this record
2JobIduniqueidentifiernoForeign key to primeJobs
3InvoiceNumbernvarchar(50)noInvoice number/reference
4InvoiceStatusvarchar(20)noStatus of the invoice (e.g. Draft, Sent, Paid)
5AccountNumbernvarchar(50)yesAccounting system account number
6InvoicedDatedateyesDate the invoice was issued
7DueDatedateyesDate this item is due
8Notesnvarchar(MAX)yesFree-text internal notes
9Subtotaldecimal(19,4)noSubtotal amount before tax
10Totaldecimal(19,4)noTotal monetary amount
11TaxTotaldecimal(19,4)noTotal tax amount
12ProgressPaymentNumberintyesSequence number of this progress payment/invoice
13ProgressPaymentPercentagedecimal(19,8)yesPercentage of the total job value this progress payment represents
14AccountsReceivableTypenvarchar(50)yesType/category of accounts-receivable entry
15ShowExcessAsnvarchar(50)yesHow the excess amount should be displayed/handled
16InvoicedTouniqueidentifieryesContact/entity the invoice was issued to
17AttachmentIduniqueidentifieryesForeign key to primeAttachment
18SentToClientbitnoFlag indicating whether the message was sent to the client
19CreatedAtdatetime2(3)yesTimestamp the record was created
20CreatedBynvarchar(100)yesUser/system that created the record
21UpdatedAtdatetime2(3)yesTimestamp the record was last updated
22UpdatedBynvarchar(100)yesUser/system that last updated the record
23IsSyncedbitnoFlag indicating whether this record has been synced with Prime Ecosystem
24VersionbigintyesOptimistic-concurrency row version number
25DeletedbitnoFlag indicating whether this record has been soft-deleted
26DeletedAtdatetimeyesTimestamp the record was soft-deleted

Indexes ​

NameTypeUniquePKKey columnsIncludedFilter
IX_AR_Invoice_JobIdNONCLUSTEREDJobId
IX_AR_Invoice_InvoicedDateNONCLUSTEREDInvoicedDate
IX_AR_Invoice_StatusNONCLUSTEREDInvoiceStatus

Relationships (inferred) ​

FromToConfidence
dbo.ethPrimeInvoiceUser.primeAccountsReceivableInvoicesIddbo.primeAccountsReceivableInvoices.Idlow
dbo.primeAccountsReceivableInvoices.InvoicedTodbo.primeContacts.idmedium
dbo.primeAccountsReceivableInvoicesItem.InvoiceIddbo.primeAccountsReceivableInvoices.Idhigh
dbo.primeAccountsReceivableInvoices.JobIddbo.primeJobs.Idhigh

Referenced by ​

Views: dbo.vPrimeJobinvoicesObjectivedb, dbo.vPrimeSalesinvoicesObjectivedb

Procedures: dbo.spEthSyncQueueMissingObjects, dbo.spPopulateInvoiceCheck, dbo.spPrimeUpsertAccountsReceivableInvoice