gtARInvoiceINLine
This function supplies the information to add Inventory line items to Accounts Receivable Invoice headers. The InvoiceReference parameter must be the unique ID returned by the gtARInvoice function call.
Each Accounts Receivable Invoice is uploaded to Greentree Desktop as a complete transaction set. The AR Invoice either uploads in its entirety or nothing of the document is loaded into Greentree Desktop.
If the Inventory line being added is for a serial or lot item then the serial or lot numbers can be entered for the line using the gtINSerialLotLine function.
InvoiceReference
This must be the unique identifier generated by the gtARInvoice function call. It has the format ARINV-nnn. This ensures the lines are of the correct invoice header details and it ensures Excel creates the header information before attempting to calculate and create the invoice line item details.
TransType
The transaction type.
StockItem
The inventory item code for the transaction.
Net
The net amount of the line.
Tax
The amount of tax for this line.
Narration
The narration for the transaction.
TaxType
Valid tax types are Inclusive or Exclusive.
UOM
The unit of measure for this inventory item — for example EA (each)
Location
The full location path for the inventory item.
PriceLevel
Indicates which pricing level applies to this inventory item — for example, Manual Pricing Daily.
HoldAmount
The amount to be put on hold for this line.
DiscAmount
The amount of discount given on this line.
Quantity
The number of units relevant for this line. Defaults to 0.
UnitPrice
The price per unit of quantity above. Defaults to 0.
TaxPerc
The percentage of tax for this line item.
DiscPerc
The percentage discount given, defaults to 0.
TaxCode
The code that determines the tax rate and type for the transaction. If not entered and Greentree Desktop cannot find a valid default, then an error is returned and the user must enter a valid code.
TransCode
The transaction codes for the line item, if applicable.
Returns
Ok if all is okay.
Errors Returned
- Invalid Invoice header reference. Should be ARINV-nnn
- Must have an Inventory Transaction Type
- Must have an Stock Item number
- Invalid Quantity. Must be number or omitted
- Invalid Hold Amount, must be a number or omitted
- Invalid Unit Price, must be a number or omitted
- Invalid Tax Percentage, must be a number or omitted
- Invalid Discount Amount. Must be number or omitted
- Invalid Discount Percentage. Must be number or omitted