JDBC Driver for MYOB

Build 22.0.8462

PurchaseBills

Return all purchase bill types 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, AppliedToDate, BalanceDueAmount, BillDeliveryStatus, Comment, Date, Freight, IsReportable, IsTaxInclusive, JournalMemo, Number, ShipToAddress, ShippingMethod, Status, Subtotal, TotalAmount, TotalTax, SupplierInvoiceNumber, CategoryID, CategoryDisplayID, CategoryName, FreightTaxCodeID, FreightTaxCodeCode, OrderID, OrderNumber, SupplierID, SupplierDisplayID, SupplierName, TermsBalanceDueDate, TermsDiscount, TermsDiscountDate, TermsDiscountExpiryDate, TermsDiscountForEarlyPayment, TermsDueDate, TermsPaymentIsDue, TermsMonthlyChargeForLatePayment. All the other columns and operators are processed client side. BillType supports only equality comparison.

SELECT * FROM PurchaseBills WHERE ID = REPLACE
SELECT * FROM PurchaseBills WHERE AppliedToDate = 20
SELECT * FROM PurchaseBills WHERE BalanceDueAmount = 45.86163291317715

Update

To update an existing bill, 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 PurchaseBillItems#TEMP(Total, AccountID, TaxCodeID) values (444.21, "44a7b2bc-0a0e-4381-86fc-9b2c7a479f8f", "bd0f9821-4437-4ec2-9c95-c1bdbdd26c7b")
UPDATE PurchaseBills SET BillType = "Service", Lines = "PurchaseBillItems#TEMP" WHERE ID = "f979f0e7-1cd8-4fb9-b2c2-9d4546440cf7"

Insert

The following attributes are required when performing an insert: BillType, Date, FreightTaxCodeID, SupplierID.

INSERT INTO PurchaseBills(BillType, Date, FreightTaxCodeID, SupplierID) VALUES ("Item", "01/01/2019", "446d2226-254b-4821-acc2-7031842e0166", "9421b774-20fa-4c5f-bced-fbb6ecd42ebd")

Columns

Name Type ReadOnly Description
ID [KEY] Uuid True

Unique identifier in the form of a guid.

AppliedToDate Decimal True

Amount currently applied to the purchase bill.

BalanceDueAmount Decimal True

Amount still payable on the purchase bill.

BillDeliveryStatus String False

Bill delivery status assigned: Print = ToBePrinted, Email = ToBeEmailed, PrintAndEmail = ToBePrintedAndEmailed, Nothing = AlreadyPrintedOrSent.

BillType String False

Type of the bill. One of: Item,Service,Professional,Miscellaneous.

Comment String False

Purchase bill comment.

Date Datetime False

The date of the entry.

Freight Decimal False

Tax inclusive freight amount applicable to the purchase bill.

IsReportable Boolean False

ONLY applicable for AU region. True indicates the transaction is reportable taxable payment. Falseindicates the transaction is not reportable taxable payment.

IsTaxInclusive Boolean False

True indicates the transaction is set to tax inclusive. False indicates the transaction is not tax inclusive.

JournalMemo String False

Memo text for the object.

Number String False

Purchase bill number.

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.

ShipToAddress String False

ShipTo address of the purchase bill.

ShippingMethod String False

Shipping method text.

Status String True

Bill status: Open, Closed, Debit.

Subtotal Decimal True

If IsTaxInclusive = false then sum of all tax exclusive line amounts. If IsTaxInclusive = true then sum of all tax inclusive line amounts.

TotalAmount Decimal True

Total amount of the purchase bill.

TotalTax Decimal True

Total of all tax amounts applicable to the purchase bill.

SupplierInvoiceNumber String False

Supplier invoice number.

URI String True

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

CategoryID Uuid False

Unique category identifier in the form of a guid.

CategoryDisplayID String True

Display id for the category.

CategoryName String True

Name of the category.

CategoryURI String True

Uniform resource identifier associated with the category object.

FreightTaxCodeID Uuid False

Unique guid identifier belonging to the assigned tax code.

FreightTaxCodeCode String True

3 digit tax code.

FreightTaxCodeURI String True

Uniform resource identifier associated with the tax code object.

OrderID Uuid False

Unique identifier in the form of a guid.

OrderNumber String True

The order number.

OrderURI String True

Uniform resource identifier associated with the order.

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.

TermsBalanceDueDate Integer False

If PaymentIsDue = CashOnDelivery, PrePaid, InAGivenNumberOfDaysNumber or NumberOfDaysAfterEOM then set the number of days within which the customer has to pay invoices. If PaymentIsDue = OnADayOfTheMonth or DayOfMonthAfterEOM then set the day of the month within which the payment must be made to pay invoices.

TermsDiscount Decimal True

Discount amount that will apply if payment is made in full by the discount date.

TermsDiscountDate Integer True

If PaymentIsDue = CashOnDelivery, PrePaid, InAGivenNumberOfDaysNumber or NumberOfDaysAfterEOM then set the number of days within which the customer must pay to receive discounts. If PaymentIsDue = OnADayOfTheMonth or DayOfMonthAfterEOM then set the day of the month within which the payment must be made to receive discounts.

TermsDiscountExpiryDate Datetime True

Date in which payment must be paid in full in quote to receive discount.

TermsDiscountForEarlyPayment Double True

% discount for early payment.

TermsDueDate Datetime True

Date in which payment is due.

TermsPaymentIsDue String False

Default Terms of Payment definitions: CashOnDelivery, PrePaid, InAGivenNumberOfDays, OnADayOfTheMonth, NumberOfDaysAfterEOM, DayOfMonthAfterEOM.

TermsMonthlyChargeForLatePayment Double False

% monthly charge for late payment.

Lines String False

An array of line bill information.

CompanyFileId String True

The ID of the company file. Takes precedence over the CompanyFileId connection property.

PromisedDate Datetime False

Transaction Promised Date.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462