Home > Technical > Table Definitions > STOCKAUDIT

STOCKAUDIT

A stock account record is created for each adjustment to the stock of an item. It is used as an audit trail. The STOCKAUDITSUMMARY.

See Stock Audit for further details.

Column Type Description
LINTITEMNUMBER INT The item whose stock was adjusted.
ITEM.lintItemNumber
STRSTORECODE VARCHAR(10) The location at which the stock was adjusted for the item.
TRADUNIT.strTradeCode
CTRCODE BIGINT A unique incrementing number assigned by the system.
DTMWHEN DATETIME The date/time the record was created.
STRSOURCE VARCHAR(5) Indicates where the adjustment was made. for example PO would indicate Purchase Order. See Stock Audit for further details.
LINTREFERENCE INT Used in conjunction with strSource, this identifies the record within the source area.
DBLORDEREDQTY DECIMAL(19,6) The number of units ordered. This will be set when a purchase order is raised and when stock is received.
DBLSTOCKQTYADJUST DECIMAL(19,6) The number of units to adjust the actual stock on hand by. This will be set by sales, receiving stock, stock adjustments, and so on.
DBLCOSTQTYADJUST DECIMAL(19,6) This is the number of units to use in the average cost calculation. It is usually the same as dblStockQtyAdjust, except when receiving stock through Invoice Matching. In this instance there would be two records written. The first time will be to receive the stock at the expected cost. dblStockQtyAdjust and dblCostQtyAdjust will be the same. The second is written to adjust the average cost for the difference between expected cost and actual cost. In this case, dblStockQtyAdjust will be zero (so we don't double adjust the actual stock count) and dblCostQtyAdjust will be the units received.
DBLALLOCATEDQTY DECIMAL(19,6) The number of units allocated for pending transactions such as laybys, customer orders, COD's, and so on.
DBLINTRANSITQTY DECIMAL(19,6) The number of units currently in transit as a result of Transfer Request/ Transfer Send transactions.
DBLRETURNEDQTY DECIMAL(19,6) The number of units which have been requested to return to the supplier.
CURLANDEDCOST DECIMAL(19,6) The unit landed cost to use in the average cost calculation. This would come from the STORERNG.curAvgCost when the sale was first made. If the stock audit came from another inventory transaction, for example Goods Receipt, this would be the cost from that transaction.
CURINVOICECOST DECIMAL(19,4) The unit invoice cost to be used to record the last invoice cost.
CURREBATE DECIMAL(19,6) The expected rebate used for this transaction. This would come from STORERNG.curAvgRebates when the transaction was initially processed.
LINTDAILYSALESCODE BIGINT Provides a link back to the DAILYSALES record that generated this record, if any.
DAILYSALES.ctrCode
DBLREQUESTEDQTY DECIMAL(19,6) The number of units that have been requested FROM this location. So if a store requested stock from a warehouse, this quantity would be increased for the warehouse.
CURSALES DECIMAL(19,6) The sales attributed to this stock audit record. This is used for records created in association with DAILYSALES records. If this is just a single, basic item, this would be equivalent to DAILYSALES.curSales. If the item originally sold was a recipe, the system would have one DAILYSALES record for the recipe and one STOCKAUDIT for each of the ingredients. This value would then be a proportion of DAILYSALES.curSales based on the ratio of the cost between the STOCKACCOUNT and the DAILYSALES records.
CURTAXAMT1 DECIMAL(19,6) The tax attributed to this stock audit record. This is used for records created in association with DAILYSALES records. If this is just a single, basic item, this would be equivalent to DAILYSALES.curTaxAmt1. If the item originally sold was a recipe, the system would have one DAILYSALES record for the recipe and one STOCKAUDIT for each of the ingredients. This value would then be a proportion of DAILYSALES.curTaxAmt1 based on the ratio of the cost between the STOCKACCOUNT and the DAILYSALES records.
CURTAXAMT2 DECIMAL(19,6) Similar to CURTAXAMT1 but based on curTaxAmt2, not curTaxAmt1.

CURTAXAMT3

DECIMAL(19,6)

Similar to CURTAXAMT1 but based on curTaxAmt3, not curTaxAmt1.

CURCHARGE 

DECIMAL(19,6)

The unit amount charged by the warehouse for an internal transfer.

DTMTRADEDATE

DATE

The trading date that the record was created.

 

Primary Key: CTRCODE

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)