JDBC Driver for Xero WorkflowMax

Build 22.0.8462

PurchaseOrderDrafts

Return a list of all draft purchase orders

Select

The driver will process all filters client side.

Insert

To insert into PurchaseOrderDrafts you will need to insert temporary at least one PurchaseOrderCost which will serve as items for the PurchaseOrder. You can do that by denoting the table name as PurchaseOrderCosts#TEMP. After inserting to the temporary table you can execute an insert to PurchaseOrders by setting PurchaseOrderCosts = PurchaseOrderCosts#TEMP as in the query below. JobID, SupplierUUID, Date, PurchaseOrderCosts are required to insert. The following queries are needed to create a new PurchaseOrder with 2 PurchaseOrderCost items:

INSERT INTO PurchaseOrderCosts#TEMP (Description,Quantity,UnitCost,Code,Note) VALUES ('first', 4, 50, '123', 'note')
INSERT INTO PurchaseOrderCosts#TEMP (Description,Quantity,UnitCost,Code,Note) VALUES ('second', 42, 502, '1234', 'note2')
INSERT INTO PurchaseOrderDrafts (JobID, SupplierUUID, Date, PurchaseOrderCosts) VALUES ('J000002', '9d382fcf-7013-4d97-8dd8-c08e8b26a0b2', '2019-07-17T00:00:00', 'PurchaseOrderCosts#TEMP')

Alternatively you can execute an INSERT operation on PurchaseOrder by setting the value for PurchaseOrderCosts as a xml string of items in the following structure:

    <Item>
      <UnitCost>50</UnitCost>
      <Description>first</Description>
      <Quantity>4</Quantity>
      <Code>123</Code>
      <Note>note</Note>
    </Item>
    <Item>
      <UnitCost>502</UnitCost>
      <Description>second</Description>
      <Quantity>42</Quantity>
      <Code>1234</Code>
      <Note>note2</Note>
    </Item>

Columns

Name Type ReadOnly Description
ID [KEY] String False

The purchase order identifier.

Description String False

The description related to the purchase order.

State String False

The state of the purchase order.

CreatedDate Datetime True

The date when the purchase order was created.

DeliveryAddress String False

Delivery address for the purchase order.

Amount Float True

The amount to pay.

AmountTax Float True

The tax amount to pay.

AmountIncludingTax Float True

The total amount to pay including tax.

SupplierUUID String False

The supplier identifier related to the purchase order.

SupplierName String True

The supplier name related to the purchase order.

JobID String False

The job identifier related to the purchase order.

JobName String True

The job name related to the purchase order.

PurchaseOrderCosts String False

Lists all purchase orders costs, xml format.

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