Purchasing.PurchaseOrderHeader

Table: 'Purchasing.PurchaseOrderHeader'

13 fields. 150 bytes.

General purchase order information. See PurchaseOrderDetail.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
PurchaseOrderIDint identity int Not nullPrimary key. 
RevisionNumbertinyint  (0)Not nullIncremental number to track changes to the purchase order over time. 
Statustinyint  (1)Not nullOrder current status. 1 = Pending; 2 = Approved; 3 = Rejected; 4 = Complete([Status]>=(1) AND [Status]<=(4))
EmployeeIDint   Not nullEmployee who created the purchase order. Foreign key to Employee.EmployeeID. 
VendorIDint   Not nullVendor with whom the purchase order is placed. Foreign key to Vendor.VendorID. 
ShipMethodIDint   Not nullShipping method. Foreign key to ShipMethod.ShipMethodID. 
OrderDatedatetime  getdate()Not nullPurchase order creation date. 
ShipDatedatetime   NullEstimated shipment date from the vendor. 
SubTotalmoney19,4decimal(19,4)(0.00)Not nullPurchase order subtotal. Computed as SUM(PurchaseOrderDetail.LineTotal)for the appropriate PurchaseOrderID.([SubTotal]>=(0.00))
TaxAmtmoney19,4decimal(19,4)(0.00)Not nullTax amount.([TaxAmt]>=(0.00))
Freightmoney19,4decimal(19,4)(0.00)Not nullShipping cost.([Freight]>=(0.00))
TotalDuemoney19,4decimal(19,4) Not nullTotal due to vendor. Computed as Subtotal + TaxAmt + Freight. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Purchasing.PurchaseOrderHeader'

Primary Key NameField Name
PK_PurchaseOrderHeader_PurchaseOrderIDPurchaseOrderID

Foreign keys for table 'Purchasing.PurchaseOrderHeader', 3 items

ForeignPrimaryKey Name
PurchaseOrderHeader.EmployeeIDEmployee.EmployeeIDFK_PurchaseOrderHeader_Employee_EmployeeID
PurchaseOrderHeader.ShipMethodIDShipMethod.ShipMethodIDFK_PurchaseOrderHeader_ShipMethod_ShipMethodID
PurchaseOrderHeader.VendorIDVendor.VendorIDFK_PurchaseOrderHeader_Vendor_VendorID

Indexes for table 'Purchasing.PurchaseOrderHeader', 3 items

Index NameDescriptionClusteredUniqueFields
PK_PurchaseOrderHeader_PurchaseOrderIDClustered index created by a primary key constraint.YesYesPurchaseOrderID
IX_PurchaseOrderHeader_EmployeeIDNonclustered index.NoNoEmployeeID
IX_PurchaseOrderHeader_VendorIDNonclustered index.NoNoVendorID

Triggers for table 'Purchasing.PurchaseOrderHeader', 1 item

NameDescriptionTypeEnabled
uPurchaseOrderHeaderAFTER UPDATE trigger that updates the RevisionNumber and ModifiedDate columns in the PurchaseOrderHeader table.after Update Yes

Dependencies for table 'Purchasing.PurchaseOrderHeader', 3 items

Object NameTypeField Name
Purchasing.PurchaseOrderHeaderuser tableSubTotal
Purchasing.PurchaseOrderHeaderuser tableTaxAmt
Purchasing.PurchaseOrderHeaderuser tableFreight