gtARInvoiceLine
This function supplies the information to add General Ledger line items to Accounts Receivable Invoice headers. The InvoiceReference parameter must be the unique ID returned by the gtARInvoice function call.
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.
AccountCompany
The company code that the account belongs to.
Account
The general ledger account number to be posted to.
Net
The net amount of the line.
Tax
The amount of tax for this line.
Narration
The narration for the transaction line.
TaxType
Valid tax types are Inclusive or Exclusive.
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. This must be zero on all but numeric based general ledger accounts.
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 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 returns and the user must enter a valid code.
SubCode
The sub code for the line item, if applicable.
TransCode
The transaction code for the line item, if applicable.
Returns
Ok if all is okay.
Errors Returned
- Must have a valid Invoice Reference number
- Must have an Account Company Identifier
- Must have an Account number
- Invalid Hold Amount, must be a number or omitted
- Invalid Quantity, 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 Percentage, must be a number or omitted