MYOB Greentree

HideShow

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

 

gtAPInvoice


This function supplies the information needed to create an Accounts Payable Invoice header. The unique identifier returned by the function call is structured as: APINV-nnn, if nnn is a sequential number that is unique for the current Excel session. This number links the AP Invoice line item function calls with its header call.

Each Accounts Payable Invoice is uploaded to Greentree Desktop as a complete transaction set. The Invoice either uploads in its entirety or nothing of the document is loaded into Greentree Desktop.

Company

The company code that the invoice is to be created in.

Batch

The batch number the invoice is to be posted in. A new batch is created if it does not exist and a Batch Description is entered.

BatchDesc

The batch description if a new batch is created. This is ignored if the batch already exists. If the batch description is null and the batch does not exit an error is returned.

Branch

The branch code that the invoice belongs to.

Reference

The Supplier's invoice number. An invoice with this number cannot already exist for the supplier or an error is returned.

Supplier

The Supplier code for the transaction.

DocumentDate

The document date for the invoice.

PostingDate

The posting date for the transactions. This determines the financial period the transactions post to.

PaymentDate

The date the invoice is due for payment. If this is not entered, the date is automatically calculated.

HoldCode

If the invoice is to be put on hold then this is the hold code. If omitted it defaults to the of None.

Narration

The narration for the invoice header.

CurrencyRate

The exchange rate for a foreign currency transaction.

MultiplyRate

Defaults to True. If true the rate above is a multiply rate rather than a divide rate.

IsWithhldTax

Defaults to False. Indicates if this invoice is subject to withholding tax on payment.

ForceWithhldTax

Defaults to False. Indicates if this invoice is subject to withholding tax on payment regardless of the supplier default on withholding tax.

Barcode

Works with the Workflow Autoscan feature.

If a barcode is entered here, it will upload as an attachment to the AP Invoice. If a barcode is not entered, and AP Invoice is added to the Autoscan table if the option is set to Custom Print Barcode or Print Barcode using Report Writer, a barcode generates using the settings on the Auto Codes tab of the Workflow Module Control form.

Returns

Unique identifier.

Errors Returned

  • Must have a Company Identifier
  • Must have a Batch Identifier
  • Must have a Branch Identifier
  • Must have an Invoice Reference
  • Must have a Supplier Identifier
  • Must have a Document Date
  • Must have a Posting Date
  • Must have a Payment Date
  • Invalid Narration, must be a string or omitted
  • Invalid Hold Code
  • Invalid Currency Rate
  • Invalid Multiply Rate flag
  • Invalid Is Withholding Tax flag