gtININLine
This function supplies the information to add Inventory line items to Inventory Transaction headers. It enables inventory transactions like adjustments and transfers, rather than inwards (AP) and outwards (AR) transactions. The Transaction Reference parameter must be the unique ID returned by the gtINTransaction function call.
Each Inventory Transaction line item is uploaded to Greentree Desktop as a complete transaction set. The line item 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.
TransReference
This must be the unique identifier generated by the gtINTransaction function call. It has the format INTRN-nnn. This ensures the lines are of the correct transaction header details and it ensures Excel creates the header information before attempting to calculate and create the invoice line item details.
Stock
The inventory item reference for the line item.
Location
The current location of the inventory item.
Quantity
The number of units relevant for this line.
TaxType
Valid tax types are Inclusive or Exclusive.
UOM
Unit of measure for this line item.
PriceLevel
Indicates pricing level which applies to this inventory item.
FcAmount
If foreign currency is applicable this is the foreign currency amount.
FcTax
The tax on the foreign currency amount.
FcHoldAmount
If foreign currency is applicable this is the amount to be put on hold for this line.
FcDiscount
The amount of foreign currency discount given on this line.
UnitPrice
Price per unit of quantity above.
TaxPercentage
Percentage of tax for this line item.
DiscPercentage
Percentage discount given, defaults to 0.
Narration
Narration for this transaction.
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.
ToLocation (optional for all transaction types other than Transfers, for which it is mandatory)
The new location for the inventory item if the transaction type is a Transfer.
Returns
- Ok - If there are no errors.
- Error - If there is an error.
Examples
Positive Adjustment:
=gtININLine(C2,ItemA,A01,100,Inclusive,EACH,RETAIL)
Negative Adjustment:
=gtININLine(C3,ItemA,A01,50,Inclusive,EACH,RETAIL)
Location Transfer:
=gtININLine(C4,ItemA,A01,20,Inclusive,EACH,RETAIL,,,,,,,,,,C01)
Total Cost Adjustment:
=gtININLine(C5,ItemA,A01,0,Inclusive,EACH,RETAIL,,,,,2.5)
Errors Returned
- Invalid Transaction header reference. Should be INTRN-nn
- Must have a Stock Identifier
- Must have a Location
- Must have a Tax Type
- Must have a Unit of Measure
- Must have a Price Level
- Invalid FcHoldAmount. Must be number or omitted
- Invalid FcDiscount. Must be number or omitted
- Invalid Unit Price. Must be number or omitted
- Invalid Tax Percentage. Must be number or omitted
- Invalid Discount Percentage. Must be number or omitted
- Invalid To Location. Must be supplied if transaction type is a transfer
- Inventory Transaction header not found