MYOB Greentree

HideShow

  • Contents
  • Index
  • Search
 
Display results with all search words

 

gtARInvoiceJCLine


This function supplies the information to add JC line items to AR invoice headers. The InvoiceReference parameter must be the unique ID returned by the gtARInvoice function call.

Each AR invoice is uploaded to Greentree as a complete transaction set. The AR invoice will either be uploaded in its entirety or nothing of the document will be loaded into Greentree unless the function returns a #VALUE!, in which case, if the transactions are processed, this line will not be included.

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.

Job

The job code for the transaction.

SalesCode

The activity code for the transaction.

Amount

The net amount of the line.

Tax

The amount of tax relevant to this line.

Narration

The narration for the transaction.

TaxType

Valid tax types are Inclusive or Exclusive.

Quantity

The number of units relevant for this line. Defaults to 0.

UnitPrice (optional)

The price per unit of quantity above. Defaults to 0.

DiscPerc

The percentage discount given for this line. Defaults to 0.

DiscAmount (optional)

The amount of discount given on this line.

TaxPerc

The percentage of tax for this line item.

TaxCode

The code used to determine the tax rate and type for the transaction. If not entered and Greentree cannot find a valid default, then an error is returned and the user will be expected to enter a valid code.

Returns

  • Ok if all is okay.
  • #VALUE! if an invalid entry is made such as text for a numeric value. Note that in this case if the transactions are processed this line will not be included.

Errors Returned

  • Invalid Invoice header reference. Should be ARINV-nnn.
  • Must have an Job.
  • Must have a Sales Code.
  • Invalid tax type. Must be Inclusive or Exclusive.
  • Invalid job. Must be a valid Job Code.
  • Invalid sales code. Must be a valid sales code.
  • Invalid Tax Code. Must be a valid tax code or omitted.