Column | Data Type | Nullable | Default | Description / PK / Index |
PurchaseOrderID | int | not null | | Primary key. PK_PurchaseOrderHeader_PurchaseOrderID |
RevisionNumber | tinyint | not null | ((0)) | Incremental number to track changes to the purchase order over time.
|
Status | tinyint | not null | ((1)) | Order current status. 1 = Pending; 2 = Approved; 3 = Rejected; 4 = Complete
|
EmployeeID | int | not null | | Employee who created the purchase order. Foreign key to Employee.EmployeeID. IX_PurchaseOrderHeader_EmployeeID |
VendorID | int | not null | | Vendor with whom the purchase order is placed. Foreign key to Vendor.VendorID. IX_PurchaseOrderHeader_VendorID |
ShipMethodID | int | not null | | Shipping method. Foreign key to ShipMethod.ShipMethodID.
|
OrderDate | datetime | not null | (getdate()) | Purchase order creation date.
|
ShipDate | datetime | null | | Estimated shipment date from the vendor.
|
SubTotal | money | not null | ((0.00)) | Purchase order subtotal. Computed as SUM(PurchaseOrderDetail.LineTotal)for the appropriate PurchaseOrderID.
|
TaxAmt | money | not null | ((0.00)) | Tax amount.
|
Freight | money | not null | ((0.00)) | Shipping cost.
|
TotalDue | | | | Total due to vendor. Computed as Subtotal + TaxAmt + Freight.
|
ModifiedDate | datetime | not null | (getdate()) | Date and time the record was last updated.
|