gtSOSalesOrderGLLine
This function supplies the information to add General Ledger line items to Sales Order headers. The Reference parameter must be the unique ID returned by the gtSOSalesOrder function call.
Each Sales Order is uploaded to Greentree Desktop as a complete transaction set. The sales order either uploads in its entirety or nothing of the document is loaded into Greentree Desktop.
Reference
This must be the unique identifier generated by the gtSOSalesOrder function call. It has the format SOORD-nnn. This ensures the lines are of the correct order header. It also ensures Excel creates the header information before attempting to calculate and create the order line item details.
Account
The general ledger account number to be posted to.
TaxCode
The code that determines the tax rate for the transaction.
NetAmount
The net amount of the line.
TaxAmount
The amount of tax for this line.
UnitPrice
Price per unit. Normally zero on non-quantity general ledger accounts.
TaxPercentage
Percentage of tax for this line item.
DeliveryDate
The delivery date for this line item.
Quantity
The number of units relevant for this line.
HoldAmount
The amount to be put on hold on this line.
DiscountAmount
The amount of discount given on this line.
DiscountPercentage
Percentage discount given.
TaxType
Valid tax types are Inclusive or Exclusive.
SubCode
The sub code for the line item.
Narration
Narration for the line item.
Returns
- Ok - If there are no errors.
- Error - If there is an error.
Example
gtSOSalesOrderGLLine (SOORD-2,MAS.AK.SLS.1010,NZGST 100,12.50,0,12.5,31/05/2001,,,,,,,,)
Errors Returned
- Invalid sales order header reference
- Sales order header not found
- Must have an account number
- Invalid quantity, must be a number or omitted
- Invalid hold amount, must be a number or omitted
- Invalid discount amount, must be a number or omitted
- Invalid discount percentage, must be a number or omitted