gtARReceipt
This function provides the information for the receipt header. This header must exist before you can add other details to it. The function returns a unique identifier that links the associated line items.
Each Accounts Receivable receipt is uploaded to Greentree Desktop as a complete transaction set. The receipt is either uploaded in its entirety or nothing of the document is loaded into Greentree Desktop.
The unique identifier returned by the function call is structured as ARREC-nnn if nnn is a sequential number that is unique for the current Excel session. This number links the AR Receipt detail function calls with the header call. This number is not updated to or passed to Greentree.
Company
The company code that the receipt is to be created in.
Reference
The receipt number. A receipt with this number cannot already exist for the customer or an error is returned.
Customer
The Customer code for the transaction.
Branch
The branch code that the receipt belongs to.
BatchNumber
The batch number the receipt is to be posted in. A new batch is created if it does not exist.
DocumentDate
The document date for the receipt.
PostingDate
The posting date for the transaction. This determines the financial period the receipt is to post to.
ReceiptMethod
The method of payment the customer has used. Valid receipt types are: Cash, Cheque, Banked Credit Card, Non-Banked Credit Card, and Other.
BankAccount
The bank account code that this receipt is to be posted to. If Cash Management is in use, you must specified this code.
BankGLAccount
The general ledger account that this receipt is to be posted to. If Cash Management is not in use, you must specify the account.
Narration
The receipt header narration.
BatchDescription
The batch description if a new batch is created. Ignored if the batch already exists. If the batch description is null and the batch does not exist an error is returned.
CurrencyRate
The exchange rate to use if the receipt is from a foreign customer. If Foreign Currency is in use and the rate is not specified the default system exchange rate is used.
BankCurrencyRate
This is the bank to transaction (based on supplier) currency exchange rate, which is applicable if the bank's currency is different from the transaction currency. If Foreign Currency is in use and the rate is not specified, this defaults to 1.
CurrencyRateMultiply
Whether the customer's exchange rate is a multiply or divide rate. Valid codes are True or False. If not specified, defaults to True.
BankCurrencyRateMultiply
Whether the bank account's exchange rate is a multiply or divide rate. Valid codes are True or False. If not specified, defaults to True.
Returns
Unique identifier.
Errors Returned
- Must have a Company Identifier
- Must have a Batch Identifier
- Must have a Branch Identifier
- Must have a Reference
- Must have a Customer Number
- Must have a Receipt Type
- Must have a Document Date
- Must have a Posting Date
- Must have either a BankAccount or BankGLAccount
- Must have either a BankAccount or BankGLAccount not both
- Currency rate must be numeric value
- Bank Currency rate must be numeric value
- isCurrencyRateMultiply must be either True, False or Omitted
- isBankCurrencyRateMultiply must be either True, False or Omitted
- The document date is invalid
- The posting date is invalid
- The branch is invalid
- This batch is not a Receipt batch
- The customer is invalid
- Invalid bank account
- Invalid GL Account
- Invalid receipt type