Purchase Order
Purchase Order's Database
P/O No
Doc
String
Avoid using the same P/O No
to prevent overwrite.
E.g.: PO-123456
P/O Key
DocKey
Number
E.g.: 123456
Last Modified
LastModified
String
E.g.: 2024-12-19T08:57:37.557
Creditor
CreditorCode
String
Creditor
must match existing creditor code, and they must be active state.
E.g.: 400-C001
Name
CreditorName
String
E.g.: ABC SUPPLIER
Supplier DO No
SupplierDONo
String
E.g.: DO-654321
Address [Line 1]
InvAddr1
String
E.g.: 123 INDUSTRIAL PARK
Address [Line 2]
InvAddr2
String
E.g.: ZONE 4
Address [Line 3]
InvAddr3
String
E.g.: CITY, STATE 12345
Address [Line 4]
InvAddr4
String
E.g.: null
Date
DocDate
String
E.g.: 2024-12-19T00:00:00
Branch
BranchCode
String
E.g.: BR001
Credit Term
DisplayTerm
String
E.g.: NET 30
Purchase Location
PurchaseLocation
String
Must have existing Purchase Location
in the accounting system.
E.g.: NY
Purchase Agent
PurchaseAgent
String
E.g.: JOHN SMITH
Ship Via
ShipVia
String
E.g.: AIR
Ship Info
ShipInfo
String
E.g.: EXPRESS
Total (ex)
TotalExTax
Number
E.g.: 1000
Inclusive
InclusiveTax
String
E.g.: T
Taxable Amount
TaxableAmt
Number
E.g.: 100
Tax
Tax
Number
E.g.: 10
Currency
CurrencyCode
String
E.g.: USD
Rate
CurrencyRate
Number
E.g.: 1.0
Local Total
LocalNetTotal
Number
E.g.: 1100
Total
NetTotal
Number
E.g.: 1100
Sequence
Seq
Number
E.g.: 1
Item Code
ItemCode
String
E.g.: ITEM-001
Description
Description
String
E.g.: ITEM DESCRIPTION
Description 2
Desc2
String
E.g.: ADDITIONAL INFO
Delivery Date
DeliveryDate
String
E.g.: 2024-12-20T00:00:00
Location
Location
String
E.g.: WAREHOUSE 1
UOM
UOM
String
E.g.: PCS
Quantity
Qty
Number
Value must be number, and value cannot be negative.
E.g.: 10
Unit Price
UnitPrice
Number
Value must be number, and value cannot be negative.
E.g.: 100
Discount
Discount
String
E.g.: 10%
C/N Amt.
CNAmt
String
E.g.: 50
Subtotal
SubTotal
Number
E.g.: 900
Subtotal (ex)
SubTotalExTax
Number
E.g.: 800
Detail Tax
DtlTax
Number
E.g.: 80
Ref Document No
FromDocNo
String
E.g.: DOC-001
UDF Description 2
UDF_Desc2
String
E.g.: CUSTOM FIELD
Purchase Order's Sample Code
Remember to change to the correct field before proceeding to run ANY script.
SELECT TOP (10)
Doc AS Document,
DocKey AS DocumentKey,
LastModified,
CreditorCode,
CreditorName,
InvAddr1,
InvAddr2,
InvAddr3,
InvAddr4,
DocDate,
BranchCode,
DisplayTerm,
PurchaseLocation,
PurchaseAgent,
ShipVia,
ShipInfo,
TotalExTax,
InclusiveTax,
TaxableAmt,
Tax,
CurrencyCode,
CurrencyRate,
LocalNetTotal,
NetTotal,
Seq,
ItemCode,
Description,
Desc2,
DeliveryDate,
Location,
UOM,
Qty,
UnitPrice,
Discount,
SubTotal,
SubTotalExTax,
DtlTax,
FromSODocList,
FurtherDescription,
LastModified
FROM PurchaseOrders
WHERE LastModified > "{LAST_MODIFIED_DATE_TIME}";
Last updated