Welcome Guest, you are in: Login

devio dbscript ScrewTurn Wiki

RSS RSS

Navigation





Search the wiki
»

PoweredBy

Page History: Sales SalesOrderHeader (table)

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2010/01/09 17:48


wikibot

TableSales.SalesOrderHeader
DescriptionGeneral sales order information.

ColumnData TypeNullableDefaultDescription / PK / Index
SalesOrderIDintnot null Primary key.
PK_SalesOrderHeader_SalesOrderID
RevisionNumbertinyintnot null((0))Incremental number to track changes to the sales order over time.
OrderDatedatetimenot null(getdate())Dates the sales order was created.
DueDatedatetimenot null Date the order is due to the customer.
ShipDatedatetimenull Date the order was shipped to the customer.
Statustinyintnot null((1))Order current status. 1 = In process; 2 = Approved; 3 = Backordered; 4 = Rejected; 5 = Shipped; 6 = Cancelled
OnlineOrderFlagdbo.Flagnot null((1))0 = Order placed by sales person. 1 = Order placed online by customer.
SalesOrderNumber   Unique sales order identification number.
AK_SalesOrderHeader_SalesOrderNumber
PurchaseOrderNumberdbo.OrderNumbernull Customer purchase order number reference.
AccountNumberdbo.AccountNumbernull Financial accounting number reference.
CustomerIDintnot null Customer identification number. Foreign key to Customer.CustomerID.
IX_SalesOrderHeader_CustomerID
ContactIDintnot null Customer contact identification number. Foreign key to Contact.ContactID.
SalesPersonIDintnull Sales person who created the sales order. Foreign key to SalesPerson.SalePersonID.
IX_SalesOrderHeader_SalesPersonID
TerritoryIDintnull Territory in which the sale was made. Foreign key to SalesTerritory.SalesTerritoryID.
BillToAddressIDintnot null Customer billing address. Foreign key to Address.AddressID.
ShipToAddressIDintnot null Customer shipping address. Foreign key to Address.AddressID.
ShipMethodIDintnot null Shipping method. Foreign key to ShipMethod.ShipMethodID.
CreditCardIDintnull Credit card identification number. Foreign key to CreditCard.CreditCardID.
CreditCardApprovalCodevarchar(15)null Approval code provided by the credit card company.
CurrencyRateIDintnull Currency exchange rate used. Foreign key to CurrencyRate.CurrencyRateID.
SubTotalmoneynot null((0.00))Sales subtotal. Computed as SUM(SalesOrderDetail.LineTotal)for the appropriate SalesOrderID.
TaxAmtmoneynot null((0.00))Tax amount.
Freightmoneynot null((0.00))Shipping cost.
TotalDue   Total due from customer. Computed as Subtotal + TaxAmt + Freight.
Commentnvarchar(128)null Sales representative comments.
rowguiduniqueidentifiernot null(newid())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
AK_SalesOrderHeader_rowguid
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.



RelationColumnReferenced Column
Person.AddressBillToAddressIDAddressID
Person.AddressShipToAddressIDAddressID
Person.ContactContactIDContactID
Sales.CreditCardCreditCardIDCreditCardID
Sales.CurrencyRateCurrencyRateIDCurrencyRateID
Sales.CustomerCustomerIDCustomerID
Sales.SalesPersonSalesPersonIDSalesPersonID
Sales.SalesTerritoryTerritoryIDTerritoryID
Purchasing.ShipMethodShipMethodIDShipMethodID

Detail TableColumnReferencing Column
Sales.SalesOrderDetailSalesOrderIDSalesOrderID
Sales.SalesOrderHeaderSalesReasonSalesOrderIDSalesOrderID

TriggersType
uSalesOrderHeaderON UPDATE

Dependency TypeObject TypeReferenced ObjectChild TypeChild Object
Data TypeTypedbo.AccountNumber
Data TypeTypedbo.Flag
Data TypeTypedbo.OrderNumber
SelectTableSales.SalesOrderHeaderTriggeruSalesOrderHeader
UpdateTableSales.SalesOrderHeaderTriggeruSalesOrderHeader
UpdateTableSales.SalesPersonTriggeruSalesOrderHeader
UpdateTableSales.SalesTerritoryTriggeruSalesOrderHeader
ExecuteProceduredbo.uspLogErrorTriggeruSalesOrderHeader
ExecuteProceduredbo.uspPrintErrorTriggeruSalesOrderHeader
ExecuteFunctiondbo.ufnGetAccountingEndDateTriggeruSalesOrderHeader
ExecuteFunctiondbo.ufnGetAccountingStartDateTriggeruSalesOrderHeader

Reference TypeObject TypeReferencing ObjectChild TypeChild Object
SelectViewSales.vSalesPersonSalesByFiscalYears
SelectTableSales.SalesOrderDetailTriggeriduSalesOrderDetail
UpdateTableSales.SalesOrderDetailTriggeriduSalesOrderDetail
SelectTableSales.SalesOrderHeaderTriggeruSalesOrderHeader
UpdateTableSales.SalesOrderHeaderTriggeruSalesOrderHeader

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam.