ScrewTurn Wiki

Edit

wikibot

TableProduction.TransactionHistory
DescriptionRecord of each purchase order, sales order, or work order transaction year to date.

Edit

Columns

ColumnData TypeNullableDefaultDescription
TransactionIDintnot null Primary key for TransactionHistory records.
ProductIDintnot null Product identification number. Foreign key to Product.ProductID.
ReferenceOrderIDintnot null Purchase order, sales order, or work order identification number.
ReferenceOrderLineIDintnot null((0))Line number associated with the purchase order, sales order, or work order.
TransactionDatedatetimenot null(getdate())Date and time of the transaction.
TransactionTypenchar(1)not null W = WorkOrder, S = SalesOrder, P = PurchaseOrder
Quantityintnot null Product quantity.
ActualCostmoneynot null Product cost.
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.

Edit

Primary Key

Primary KeyColumns
PK_TransactionHistory_TransactionIDTransactionID

Edit

Indexes

IndexTypeColumns
IX_TransactionHistory_ProductID ProductID
IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID ReferenceOrderID, ReferenceOrderLineID

Edit

Check Constraints

Check ConstraintExpressionDescription
CK_TransactionHistory_TransactionType(upper(TransactionType)='P' OR upper(TransactionType)='S' OR upper(TransactionType)='W')Check constraint TransactionType='p' OR TransactionType='s' OR TransactionType='w' OR TransactionType='P' OR TransactionType='S' OR TransactionType='W')

Edit

Foreign Keys

RelationColumnReferenced Column
Production.ProductProductIDProductID

Edit

References

Dependency TypeObject TypeReferenced Object
SchemaSchemaProduction

Edit

Dependencies

Reference TypeObject TypeReferencing ObjectChild TypeChild Object
InsertTableProduction.WorkOrderTriggeriWorkOrder
InsertTableProduction.WorkOrderTriggeruWorkOrder
InsertTablePurchasing.PurchaseOrderDetailTriggeriPurchaseOrderDetail
InsertTablePurchasing.PurchaseOrderDetailTriggeruPurchaseOrderDetail
InsertTableSales.SalesOrderDetailTriggeriduSalesOrderDetail

Edit

automatically generated

TableProduction.TransactionHistory
DescriptionRecord of each purchase order, sales order, or work order transaction year to date.

ColumnData TypeNullableDefaultDescription / PK / Index
TransactionIDintnot null Primary key for TransactionHistory records.
PK_TransactionHistory_TransactionID
ProductIDintnot null Product identification number. Foreign key to Product.ProductID.
IX_TransactionHistory_ProductID
ReferenceOrderIDintnot null Purchase order, sales order, or work order identification number.
IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
ReferenceOrderLineIDintnot null(0)Line number associated with the purchase order, sales order, or work order.
IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
TransactionDatedatetimenot null(GETDATE())Date and time of the transaction.
TransactionTypenchar(1)not null W = WorkOrder, S = SalesOrder, P = PurchaseOrder
Quantityintnot null Product quantity.
ActualCostmoneynot null Product cost.
ModifiedDatedatetimenot null(GETDATE())Date and time the record was last updated.



RelationColumnReferenced Column
Production.ProductProductIDProductID

Dependency TypeObject TypeReferenced Object
SchemaSchemaProduction

Reference TypeObject TypeReferencing ObjectChild TypeChild Object
InsertTableProduction.WorkOrderTriggeriWorkOrder
InsertTableProduction.WorkOrderTriggeruWorkOrder
InsertTablePurchasing.PurchaseOrderDetailTriggeriPurchaseOrderDetail
InsertTablePurchasing.PurchaseOrderDetailTriggeruPurchaseOrderDetail
InsertTableSales.SalesOrderDetailTriggeriduSalesOrderDetail

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