SupplierPayments
Return, create and delete supplier payments 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 criterias can be executed by combining the criteria with AND and OR operators.
These columns support the above comparison types for server side filtering: ID, AmountPaid, Date, DeliveryStatus, Memo, PayFrom, PayeeAddress, PaymentNumber, StatementParticulars, AccountID, AccountDisplayID, AccountName, SupplierID, SupplierDisplayID, SupplierName, ForeignCurrencyID, ForeignCurrencyCode, ForeignCurrencyName. All the other columns and operators are processed client side.
SELECT * FROM SupplierPayments WHERE ID = "7cabea25-6250-4df5-bb37-77eb2d38f803" SELECT * FROM SupplierPayments WHERE Memo = "memo" SELECT * FROM SupplierPayments WHERE AmountPaid = 46.502 SELECT * FROM SupplierPayments WHERE PayeeAddress = "WLJ Real Estate 555 High Street Chatswood NSW 2067 Australia"
Update
To update an existing payment, along with its Lines, we can either pass a JSON string to the Lines value or use a temporary table like below.
Note: this will replace all the current Lines with the ones below.
INSERT INTO SupplierPaymentItems#TEMP(AmountApplied, PurchaseID) VALUES (444.21, " 0229a075-f93a-4b6c-85d7-0ffd5ba43982") UPDATE SupplierPayments SET Lines = "supplierpaymentitems#TEMP" WHERE ID = "c3d2350b-733a-4140-8dda-ffa0f34d4297"
Insert
The following attributes are required when performing an insert: PayFrom, AccountID, SupplierID, Lines.
INSERT INTO SupplierPaymentItems#TEMP(amountapplied, purchaseid) VALUES (444.21, "415ffd17-9fb7-45b4-aeb1-3af0db11ff84") INSERT INTO SupplierPayments(PayFrom, AccountId, SupplierId, Lines) VALUES ("Account", "c195ee7d-2954-42a6-8a19-6f362442bf89", "9421b774-20fa-4c5f-bced-fbb6ecd42ebd", "SupplierPaymentItems#TEMP")
Columns
Name | Type | ReadOnly | Description |
ID [KEY] | Uuid | True |
Unique identifier in the form of a guid. |
AmountPaid | Double | False |
Total of all amounts paid to the purchase bill/bills. |
Date | Datetime | False |
The date of the entry. |
DeliveryStatus | String | False |
Delivery status assigned to payment: Print = ToBePrinted, Email = ToBeEmailed, PrintAndEmail = ToBePrintedAndEmailed, Nothing = AlreadyPrintedOrSent. |
Memo | String | False |
Memo text for the object. |
PayFrom | String | False |
If allocating a banking account for the payment specify Account. If using electronic payments specify ElectronicPayments. |
PayeeAddress | String | False |
Payee name and address of the supplier contact. |
PaymentNumber | String | False |
ID No of payment transaction. |
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. |
StatementParticulars | String | False |
ONLY applicable for Electronic Payments. Particulars attached to electronic payment. |
URI | String | True |
Uniform resource identifier encompasses all types of names and addresses that refer to objects on the web. |
AccountID | Uuid | False |
Unique identifier for the account in the form of a guid. |
AccountDisplayID | String | True |
Account code. Format includes separator ie 4-1100 |
AccountName | String | True |
Name of the account. |
AccountURI | String | True |
Uniform resource identifier associated with the account object. |
SupplierID | Uuid | False |
Unique guid identifier belonging to the assigned supplier contact. |
SupplierDisplayID | String | True |
Customer contact Card ID, can also be used as a unique supplier contact identifier. |
SupplierName | String | True |
Name of the supplier contact. |
SupplierURI | String | True |
Uniform resource identifier associated with the supplier contact object. |
ForeignCurrencyID | Uuid | True |
Unique identifier in the form of a guid. |
ForeignCurrencyCode | String | True |
The currency code. |
ForeignCurrencyName | String | True |
The full name of the currency. |
ForeignCurrencyURI | String | True |
Uniform resource identifier associated with the purchase. |
Lines | String | False |
An array of purchase bill/order line information |
CompanyFileId | String | True |
The ID of the company file. Takes precedence over the CompanyFileId connection property. |