gtAPCreditNoteINLine
This function supplies the information to add Inventory line items to Accounts Payable Credit Note headers. The critical link is the Credit Note Reference parameter must be the unique ID returned by the gtAPCreditNote function call.
Each Accounts Payable Credit Note is uploaded to Greentree Desktop as a complete transaction set. The AP Credit Note 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.
CreditNoteReference
This must be the unique identifier generated by the gtAPCreditNote function call. It has the format APCN-nnn. This ensures the lines are of the correct Credit Note header details and it ensures Excel creates the header information before attempting to calculate and create the credit note line item details.
TransType
The transaction type.
StockItem
The inventory item code for the transaction.
Net
The net amount of the line. You must provide this amount.
Tax
The amount of tax for this line.
Narration
The narration for the transaction.
TaxType
Valid tax types are Inclusive or Exclusive.
UOM
Unit of Measure for this inventory item. Usually expressed as EA (each)
Location
The full location path for the inventory item.
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. Normally zero on non-quantity general ledger accounts.
TaxPerc
The percentage of tax for this line item.
DiscPerc
The percentage of 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.
Returns
Ok if all is okay.
Errors Returned
- Invalid Invoice header reference. Should be APCN-nn
- Must have an Inventory Transaction Type
- Must have a Stock Item number
- Invalid Quantity. Must be number or omitted
- Invalid Hold Amount. Must be number or omitted
- Invalid Discount Amount. 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