Warehouse.StockItemTransactions
| Documentation | WideWorldImporters |
| Schema | Warehouse |
| Name | StockItemTransactions |
| Module | Warehouse |
Columns
| Key | Name | Data type | Null | Attributes | References | Description | ||
|---|---|---|---|---|---|---|---|---|
| 1 | StockItemTransactionID | int | Default: NEXT VALUE FOR [Sequences].[TransactionID] | Numeric ID used to refer to a stock item transaction within the database | ||||
| Numeric ID used to refer to a stock item transaction within the database Default: NEXT VALUE FOR [Sequences].[TransactionID] |
||||||||
| 2 | StockItemID | int | Warehouse.StockItems | StockItem for this transaction | ||||
| StockItem for this transaction References: Warehouse.StockItems |
||||||||
| 3 | TransactionTypeID | int | Application.TransactionTypes | Type of transaction | ||||
| Type of transaction References: Application.TransactionTypes |
||||||||
| 4 | CustomerID | int | Sales.Customers | Customer for this transaction (if applicable) | ||||
| Customer for this transaction (if applicable) References: Sales.Customers |
||||||||
| 5 | InvoiceID | int | Sales.Invoices | ID of an invoice (for transactions associated with an invoice) | ||||
| ID of an invoice (for transactions associated with an invoice) References: Sales.Invoices |
||||||||
| 6 | SupplierID | int | Purchasing.Suppliers | Supplier for this stock transaction (if applicable) | ||||
| Supplier for this stock transaction (if applicable) References: Purchasing.Suppliers |
||||||||
| 7 | PurchaseOrderID | int | Purchasing.PurchaseOrders | ID of an purchase order (for transactions associated with a purchase order) | ||||
| ID of an purchase order (for transactions associated with a purchase order) References: Purchasing.PurchaseOrders |
||||||||
| 8 | TransactionOccurredWhen | datetime2(7) | Date and time when the transaction occurred | |||||
| Date and time when the transaction occurred |
||||||||
| 9 | Quantity | decimal(18, 3) | Quantity of stock movement (positive is incoming stock, negative is outgoing) | |||||
| Quantity of stock movement (positive is incoming stock, negative is outgoing) |
||||||||
| 10 | LastEditedBy | int | Application.People | |||||
| References: Application.People | ||||||||
| 11 | LastEditedWhen | datetime2(7) | Default: sysdatetime() | When this row was last edited | ||||
| When this row was last edited Default: sysdatetime() |
||||||||
Relations
| Foreign table | Primary table | Join | Title / Name / Description | |
|---|---|---|---|---|
| Warehouse.StockItemTransactions | Sales.Customers | Warehouse.StockItemTransactions.CustomerID = Sales.Customers.CustomerID | FK_Warehouse_StockItemTransactions_CustomerID_Sales_Customers Foreign key constraint referencing Customers.CustomerID |
|
|
Warehouse.StockItemTransactions.CustomerID = Sales.Customers.CustomerID Name: FK_Warehouse_StockItemTransactions_CustomerID_Sales_CustomersForeign key constraint referencing Customers.CustomerID |
||||
| Warehouse.StockItemTransactions | Sales.Invoices | Warehouse.StockItemTransactions.InvoiceID = Sales.Invoices.InvoiceID | FK_Warehouse_StockItemTransactions_InvoiceID_Sales_Invoices Foreign key constraint referencing Invoices.InvoiceID |
|
|
Warehouse.StockItemTransactions.InvoiceID = Sales.Invoices.InvoiceID Name: FK_Warehouse_StockItemTransactions_InvoiceID_Sales_InvoicesForeign key constraint referencing Invoices.InvoiceID |
||||
| Warehouse.StockItemTransactions | Application.People | Warehouse.StockItemTransactions.LastEditedBy = Application.People.PersonID | FK_Warehouse_StockItemTransactions_Application_People Foreign key constraint referencing People.PersonID |
|
|
Warehouse.StockItemTransactions.LastEditedBy = Application.People.PersonID Name: FK_Warehouse_StockItemTransactions_Application_PeopleForeign key constraint referencing People.PersonID |
||||
| Warehouse.StockItemTransactions | Purchasing.PurchaseOrders | Warehouse.StockItemTransactions.PurchaseOrderID = Purchasing.PurchaseOrders.PurchaseOrderID | FK_Warehouse_StockItemTransactions_PurchaseOrderID_Purchasing_PurchaseOrders Foreign key constraint referencing PurchaseOrders.PurchaseOrderID |
|
|
Warehouse.StockItemTransactions.PurchaseOrderID = Purchasing.PurchaseOrders.PurchaseOrderID Name: FK_Warehouse_StockItemTransactions_PurchaseOrderID_Purchasing_PurchaseOrdersForeign key constraint referencing PurchaseOrders.PurchaseOrderID |
||||
| Warehouse.StockItemTransactions | Warehouse.StockItems | Warehouse.StockItemTransactions.StockItemID = Warehouse.StockItems.StockItemID | FK_Warehouse_StockItemTransactions_StockItemID_Warehouse_StockItems Foreign key constraint referencing StockItems.StockItemID |
|
|
Warehouse.StockItemTransactions.StockItemID = Warehouse.StockItems.StockItemID Name: FK_Warehouse_StockItemTransactions_StockItemID_Warehouse_StockItemsForeign key constraint referencing StockItems.StockItemID |
||||
| Warehouse.StockItemTransactions | Purchasing.Suppliers | Warehouse.StockItemTransactions.SupplierID = Purchasing.Suppliers.SupplierID | FK_Warehouse_StockItemTransactions_SupplierID_Purchasing_Suppliers Foreign key constraint referencing Suppliers.SupplierID |
|
|
Warehouse.StockItemTransactions.SupplierID = Purchasing.Suppliers.SupplierID Name: FK_Warehouse_StockItemTransactions_SupplierID_Purchasing_SuppliersForeign key constraint referencing Suppliers.SupplierID |
||||
| Warehouse.StockItemTransactions | Application.TransactionTypes | Warehouse.StockItemTransactions.TransactionTypeID = Application.TransactionTypes.TransactionTypeID | FK_Warehouse_StockItemTransactions_TransactionTypeID_Application_TransactionTypes Foreign key constraint referencing TransactionTypes.TransactionTypeID |
|
|
Warehouse.StockItemTransactions.TransactionTypeID = Application.TransactionTypes.TransactionTypeID Name: FK_Warehouse_StockItemTransactions_TransactionTypeID_Application_TransactionTypesForeign key constraint referencing TransactionTypes.TransactionTypeID |
||||
Unique keys
| Key name | Columns | Description | |
|---|---|---|---|
| PK_Warehouse_StockItemTransactions | StockItemTransactionID | Primary key (nonclustered) constraint. | |
| Primary key (nonclustered) constraint. | |||
Uses
| Name |
|---|
|
Warehouse.StockItemTransactions
|
Exported: 2019-02-04 23:04, Last imported: 2018-08-10 09:51
