Generated using SQL Data Dictionary demo version.


Table Sales.Invoices (70,510 rows)


Details of customer invoices


  Column Data Type Identity Nullable Default
PK InvoiceID int NEXT VALUE FOR [Sequences].[InvoiceID]
Numeric ID used for reference to an invoice within the database
FK CustomerID int
Customer for this invoice
FK BillToCustomerID int
Bill to customer for this invoice (invoices might be billed to a head office)
FK OrderID int X
Sales order (if any) for this invoice
FK DeliveryMethodID int
How these stock items are beign delivered
FK ContactPersonID int
Customer contact for this invoice
FK AccountsPersonID int
Customer accounts contact for this invoice
FK SalespersonPersonID int
Salesperson for this invoice
FK PackedByPersonID int
Person who packed this shipment (or checked the packing)
InvoiceDate date
Date that this invoice was raised
CustomerPurchaseOrderNumber nvarchar(20) X
Purchase Order Number received from customer
IsCreditNote bit
Is this a credit note (rather than an invoice)
CreditNoteReason nvarchar(max) X
Reason that this credit note needed to be generated (if applicable)
Comments nvarchar(max) X
Any comments related to this invoice (sent to customer)
DeliveryInstructions nvarchar(max) X
Any comments related to delivery (sent to customer)
InternalComments nvarchar(max) X
Any internal comments related to this invoice (not sent to the customer)
TotalDryItems int
Total number of dry packages (information for the delivery driver)
TotalChillerItems int
Total number of chiller packages (information for the delivery driver)
DeliveryRun nvarchar(5) X
Delivery run for this shipment
RunPosition nvarchar(5) X
Position in the delivery run for this shipment
ReturnedDeliveryData nvarchar(max) X
JSON-structured data returned from delivery devices for deliveries made directly by the organization
ConfirmedDeliveryTime datetime2 X
Confirmed delivery date and time promoted from JSON delivery data
ConfirmedReceivedBy nvarchar(4000) X
Confirmed receiver promoted from JSON delivery data
FK LastEditedBy int
LastEditedWhen datetime2 sysdatetime()

Indexes:


References:


Referenced by:


Used by: