GetPurchaseOrders

List purchase orders allowing filters on order number, creditor and/or date range.
This web service calls underlying SQL stored procedure – SynergyOneFinance.dbo.spxePurchaseOrders. By default this procedure returns all purchase orders for the business unit that the vendor Synergetic user is allowed access to.

InputObject (XML)

Element

SQL Data Type

Mandatory

Description

VendorTokenGUID

GUID

Yes

Specific GUID that Synergetic will give the third party app to validate them upon every web service request.

VersionNumber

Decimal(4,2)

Yes

To cater for extending the web service and return the version specific format. Default 2.5.

ConfigFileName

Varchar(max)

No

Optional - if missing or blank then the authentication details into DB are found in WebServiceSynergetic.XML in the website folder.

BusinessUnitCode

Varchar(15)

No

Allows override of business unit code. If blank then we will pick up the first available business unit that the vendor has access to. User must have access to the business unit in order to see the orders.

OrderNumber

Integer

No

Purchase order number for specific order.

StartDate

Date

No

Filter orders after this date – dd/mm/yyyy.

EndDate

Date

No

Filter orders before this date – dd/mm/yyyy.

CreditorID

Integer

No

Return orders for a specific creditor.


Sample Input


<InputXML>
<VendorTokenGUID>3FC2ABA9-8F37-4CC9-934C-6ABCCA9F44B7</VendorTokenGUID>
<VersionNumber>2.5</VersionNumber>
<ConfigFileName></ConfigFileName>
<BusinessUnitCode></BusinessUnitCode>
<OrderNumber></OrderNumber>
<StartDate>01/01/2010</StartDate>
<EndDate>31/12/2010</EndDate>
<CreditorID>45646</CreditorID>
</InputXML>

OutputObject (XML)


Element

SQL Data Type

Description

OrderNumber

Integer

Purchase order number assigned by Synergetic.

OrderDate

Date

Date of the purchase order - dd/mm/yyyy.

OrderStatus

Varchar(1)

C – Cancelled
O – On Order
P – Partially Filled
Y - Completed

CreditorID

Integer

Creditor ID for this order.

OrderHeader

Varchar(255)

Header assigned to the purchase order.

OrderTrailer

Varchar(255)

Trailer assigned to the purchase order.

OrderDetails

xmlNode

Sub node of order details linked to this purchase order.

GLJournals

xmlNode

Sub node of general ledger journals transactions created linked to this purchase order.

CreditorTransactions

xmlNode

Sub node of creditor transactions created linked to this purchase order.


OrderDetails sub-node

This node lists the ordered items linked to the purchase order.

Element

SQL Data Type

Description

OrderLine

Smallint

 

GLCode

Varchar(15)

 

Description

Varchar(50)

 

QuantityOrdered

Integer

 

ExtendedCostOrdered

Money

Amount including tax - ExtendedCostOrdered

TaxAmountOrdered

Money

0 – Tax Free

Status

Varchar(1)

C- Cancelled
F – Filled
P - Pending

QuantitySupplied

Integer

 

ExtendedCostSupplied

Money

 

TaxAmountSupplied

Money

 

CreditorTransactionSeq

Integer

 

DeliveryDate

 

 

DeliveryDocketNo

Varchar(20)

 


GLJournals sub-node

This node lists the general ledger journals linked to the purchase order.

Element

SQL Data Type

Description

GLYear

Smallint

 

GLCode

Varchar(15)

Including tax

GLDate

Date

dd/mm/yyyy

JournalDescription

Varchar(50)

 

GLAmount

Money

Excluding tax

TaxAmount

Money

Total tax amount


CreditorTransactions sub-node

This node lists the creditor transactions linked to the purchase order.

Element

SQL Data Type

Description

CreditorTransactionSeq

Integer

 

TotalInvoiceAmount

Money

Including tax

TotalAllocatedAmount

Money

 

InvoiceNumber

Varchar(20)

 

InvoiceDate

Date

 

InvoiceDescription

Varchar(50)

 



Sample Output


<Orders OrderNumber="1" OrderDate="02/03/2010" OrderStatus="Y" CreditorID="5148" OrderHeader="" OrderTrailer="">
<OrderDetails>
<OrderDetail OrderLine="1" GLCode="2123" Description="Turf replacement" QuantityOrdered="1" ExtendedCostOrdered="5000.00" TaxAmountOrdered="454.55" QuantitySupplied="1" ExtendedCostSupplied="5000.00" TaxAmountSupplied="454.55" CreditorTransactionSeq="47" DeliveryDate="04/03/2010" DeliveryDocketNumber="102287" />
<OrderDetail OrderLine="2" GLCode="2133" Description="Footy Posts" QuantityOrdered="4" ExtendedCostOrdered="400.00" TaxAmountOrdered="36.36" QuantitySupplied="4" ExtendedCostSupplied="400.00" TaxAmountSupplied="36.36" CreditorTransactionSeq="48" DeliveryDate="04/03/2010" DeliveryDocketNumber="1003" />
</OrderDetails>
<GLJournals>
<GLJournal GLJournalSeq="276" GLYear="2010" GLCode="2123" GLDate="04/03/2010" JournalDescription="Turf Replacement" GLAmount="4543.64" TaxAmount="454.36" />
<GLJournal GLJournalSeq="277" GLYear="2010" GLCode="2133" GLDate="04/03/2010" JournalDescription="Footy Posts" GLAmount="363.64" TaxAmount="36.36" />
</GLJournals>
<CreditorTransactions>
<CreditorTransaction CreditorTransactionSeq="47" TotalInvoiceAmount="4998.00" InvoiceNumber="1001" InvoiceDate="04/03/2010" InvoiceDescription="Turf Replacement" />
<CreditorTransaction CreditorTransactionSeq="48" TotalInvoiceAmount="400.00" InvoiceNumber="1003" InvoiceDate="04/03/2010" InvoiceDescription="Footy Posts" />
</CreditorTransactions>
</Orders>
<Orders OrderNumber="2" OrderDate="04/03/2010" OrderStatus="O" CreditorID="4923" OrderHeader="" OrderTrailer="">
<OrderDetails>
<OrderDetail OrderLine="1" GLCode="" Description="Fire Hydrant" QuantityOrdered="5" ExtendedCostOrdered="850.00" TaxAmountOrdered="77.27" QuantitySupplied="0" ExtendedCostSupplied="0.00" TaxAmountSupplied="0.00" CreditorTransactionSeq="0" DeliveryDocketNumber="" />
</OrderDetails>
</Orders>