Cmdlets for MYOB

Build 24.0.9062

CreditSettlements

Return, create and delete settled customer credits for an AccountRight company file.

Table Specific Information

Select

MYOB allows a subset of columns to be used in the WHERE clause of a SELECT query. These columns may be used with the following operators: =, !=, >, <, >=, <=. In addition, queries with multiple criteria can be executed by combining the criteria with AND and OR operators. These columns support the above comparison types for server side filtering: ID, Date, Memo, Number, CreditAmount, CreditFromInvoiceID, CreditFromInvoiceNumber, CustomerID, CustomerDisplayID, CustomerName. All the other columns and operators are processed client side.

SELECT * FROM CreditSettlements WHERE ID = "7cabea25-6250-4df5-bb37-77eb2d38f803"
SELECT * FROM CreditSettlements WHERE CustomerID = "07763f97-43cc-4149-8c00-d92feb4e1404"
SELECT * FROM CreditSettlements WHERE Memo = "memo"

Insert

The following attributes are required when performing an insert: Date, CreditFromInvoiceID, CustomerID.

To insert the Lines values into CreditSettlements, either pass the JSON data as a string or use a temporary table like below.

INSERT INTO CreditSettlementItems#TEMP (AmountApplied, Type, SaleId) VALUES (444.21, "Invoice", "0229a075-f93a-4b6c-85d7-0ffd5ba43982")
INSERT INTO CreditSettlements (Date, CreditFromInvoiceID, CustomerID, Lines) VALUES ("01/01/2019", "07763f97-43cc-4149-8c00-d92feb4e1404", "6aaccbbf-2a21-44eb-8462-dfff3117dd5a", "CreditSettlementItems#TEMP")

Columns

Name Type ReadOnly References Description
ID [KEY] Uuid True

Unique identifier in the form of a guid.

Date Datetime False

Transaction date.

Memo String False

Memo text describing the settled credit.

Number String False

Cheque credit number, optional on POST as will auto increment based upon last recorded if left blank.

RowVersion String True

Number value that changes upon a record update, can be used for change control but does does not preserve a date or a time.

URI String True

Uniform resource identifier encompasses all types of names and addresses that refer to objects on the web.

CreditAmount Decimal True

Total credit amount to be applied, can only be less than or equal to CreditFromInvoice amount.

CreditFromInvoiceID Uuid False

Unique identifier in the form of a guid.

CreditFromInvoiceNumber String True

Invoice number.

CreditFromInvoiceURI String True

Uniform resource identifier associated with the invoice.

CustomerID Uuid False

Contacts.ID

Unique guid identifier belonging to the assigned customer contact.

CustomerDisplayID String True

Customer contact Card ID, can also be used as a unique customer contact identifier.

CustomerName String True

Name of the customer contact.

CustomerURI String True

Uniform resource identifier associated with the customer contact object.

Lines String False

The following set of information pulls through line details for the credit settlement.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9062