Home > Technical > Table Definitions > INVOICEDETAIL
Details for invoices are stored in INVOICEHEADER and INVOICEDETAIL. Each invoice will have one record in INVOICEHEADER and one or more in INVOICEDETAIL (for each item invoiced).
Column 
Type 
Description 
LINTINVOICENUMBER 
INT(4) 
The number of the INVOICEHEADER this record links to. 
INT(4) 
A unique number assigned by the system to maintain the order in which the details were entered. 

LINTITEMNUMBER 
INT(4) 
The number of the item on the invoice. 
STRORDERCODE 
VARCHAR(20) 
The supplier’s order code for this item. 
STRDESCRIPTION 
VARCHAR(60) 
The description for the item. 
DBLQTYORDERED 
DECIMAL(9)19,4 
The units quantity originally ordered. 
DBLQTYRECEIVED 
DECIMAL(9)19,4 
The units quantity actually received. 
DBLQTYINVOICED 
DECIMAL(9)19,4 
The units quantity actually invoiced. 
DBLBONUSEXPECTED 
DECIMAL(9)19,4 
The bonus units expected. 
DBLBONUSRECEIVED 
DECIMAL(9)19,4 
The bonus units received. 
DBLCARTONSORDERED 
DECIMAL(9)19,4 
The cartons quantity original ordered. 
DBLCARTONSRECEIVED 
DECIMAL(9)19,4 
The cartons quantity actually received. 
DBLCARTONSINVOICED 
DECIMAL(9)19,4 
The cartons quantity actually invoiced. 
CURPONETTCOST 
DECIMAL(9)19,4 
The nett carton cost for one carton from the original purchase order. 
CURPOSERVICEFEE 
DECIMAL(9)19,4 
The service fee for one carton from the original purchase order. 
CURPOULLAGEFEE 
DECIMAL(9)19,4 
The ullage fee for one carton from the original purchase order. 
CURPOLIQUORTAX 
DECIMAL(9)19,4 
The liquor tax for one carton from the original purchase order. 
CURPOFREIGHT 
DECIMAL(9)19,4 
The freight for one carton from the original purchase order. 
INTCARTONSIZE 
DECIMAL(5)9,3 
The number of units in a carton. 
YSNCLAIMROW 
VARCHAR(1) 
‘T’ if there is a variance the user wants to claim, ‘F’ otherwise. 
STRWHO 
VARCHAR(20) 
The user who entered the record. 
LINTPONUMBER 
INT(4) 
Our purchase order number that this item came from. 0 if not associated with a PO. 
INTSTATUS 
INT(4) 
The status of the item. Usually 0 while the item is on order, 1 if fully received and another value if the stock is partially received, for example out of stock. Set by the Invoice Matching program. 
CURDEALAMT 
DECIMAL(9)19,4 
The expected carton deal amount for the item. 
YSNSTOCKRECEIVED 
VARCHAR(1) 
If the invoice details are extracted from a purchase order and that purchase order has already received some stock then this will be 'T'. If no stock has been received then this will be 'F'. 
CURPOCOST 
DECIMAL(9)19,4 
The expected cost from the original purchase order. 
CURINVOICECOST 
DECIMAL(9)19,4 
The cost entered for this invoice. Equivalent to curPOCost. This is a carton cost. 
CUREXPECTEDLANDEDCOST 
DECIMAL(9)19,4 
The expected landed cost. If the details have come from a purchase order then this will be the sum of all the cost components. If the item has simply been keyed in, this value will be set from STORERNG.curLandedCost. 
CURCURRENTCOST 
DECIMAL(9)19,4 
The current cost within the system. It comes from STORERNG.curCost. It used to check if the cost is different. 
YSNCREATECOSTRECORD 
VARCHAR(1) 
If 'T' the system will create a COST record based on the new invoice cost. 
INTINVOICESTATUS 
INT(4) 
The status of the item. Usually 0 while the item is on order, 1 if fully received and another value if the stock is partially received, for example out of stock. Set by the Invoice Matching program. 
CURNETTCOST 
DECIMAL(9)19,4 
Not used. 
CURSERVICEFEE 
DECIMAL(9)19,4 
If Service Fee is not included in the invoice cost, this is the value of the service fee recorded for this item. This is a total amount not a per carton amount. 
CURULLAGEFEE 
DECIMAL(9)19,4 
If Ullage Fee is not included in the invoice cost, this is the value of the ullage fee recorded for this item. This is a total amount not a per carton amount. 
CURSALESTAX 
DECIMAL(9)19,4 
If Sales Tax is not included in the invoice cost, this is the value of the sales tax recorded for this item. This is a total amount not a per carton amount. 
CURLIQUORTAX 
DECIMAL(9)19,4 
If Liquor Tax is not included in the invoice cost, this is the value of the liquor fee recorded for this item. This is a total amount not a per carton amount. Not used in GST or US Tax System. 
CURFREIGHT 
DECIMAL(9)19,4 
If Freight is not included in the invoice cost, this is the value of the freight fee recorded for this item. This is a total amount not a per carton amount. This is the ex tax freight amount. 
CURDISCOUNT 
DECIMAL(9)19,4 
The amount of discount allocated to this item. This is a total amount not a per carton amount. No longer used. 
YSNCLAIMSUPPLIER 
VARCHAR(1) 
'T' if rebates have already been claimed from the supplier for this detail, 'F' otherwise. 
YSNCLAIMMANUFACTURER 
VARCHAR(1) 
'T' if rebates have already been claimed from the manufacturer for this detail, 'F' otherwise. 
YSNCLAIMHEADOFFICE 
VARCHAR(1) 
'T' if rebates have already been claimed from head office for this detail, 'F' otherwise. 
STRMANUFACTURER 
VARCHAR(10) 
The manufacturer of the item. Used when doing rebates. 
CURTAXAMT 
DECIMAL(9)19,4 
The amount of tax included in this detail line. This is a total amount not a per carton amount. 
CURPOWETAMT 
DECIMAL(9)19,4 
The WET (Wine Equalisation Tax) for one carton from the original purchase order. 
CURWETAMT 
DECIMAL(9)19,4 
If WET is not included in the invoice cost, this is the value of the WET recorded for this item. This is a total amount not a per carton amount. 
DBLOUTSTANDINGINV 
DECIMAL(9)19,4 

STRTAXCODE 
VARCHAR(10) 

STRWETTAXCODE 
VARCHAR(10) 

CUREXPECTEDREBATE 
DECIMAL(9)19,6 

Primary Key: LINTINVOICENUMBER + LINTLINENUMBER
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) 