MYOBCommunity
Partner Zone
|
|
Partner Zone

Converting a Purchase/Order/Item to a Bill not behaving as expected

This thread is now closed to new comments.
Some of the links provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
Highlighted
Partner trosevear
2 Posts
Partner
Australia
trosevear
Partner

2Posts

0Kudos

0Solutions

Converting a Purchase/Order/Item to a Bill not behaving as expected

QUESTION: Can someone advise how we might achieve what is happening manually using the API, because what I am doing is not behaving as I expect?

 

MANUAL MYOB SCENARIO

We create Purchase/Order for any item and set the OrderQuantity to 10, we receive a bill from our supplier for 5 of the item. We process this manually in MYOB by going to the order, selecting change to bill, and entering the Bill Amount to 5 and the backorder amout to 5. 

OUTCOME

A bill is created for the 5 items, and an Order is created with the same Number as the invoice for the backordered 5 items.

 

USING THE API

When using the API METHOD USED outlined below we would have expected the OUTCOME to be the same.

OUTCOME

The Order is converted to a Bill, and Quantity on the bill is reduced 5 with the line total being half what we entered, however there is now NO coressponding Purchase Order in the system, it was simply been converted to a Bill. 

 

 

API METHOD USED

SET-UP

  1. Create Purchase/Order in Purchase Register for any product and set the OrderQuantity to 10

ENVIRONMENT

AccountRight Standard 2016.2.1

API V2

ClearWater_Standard_AU file

 

PROCESS

Use GET Purchase/Order/Item Filter by PONumber

/Purchase/Order/Item?$filter=Number%20eq%20'PONUMBER'

 

Use POST Purchase/Bill/Item with the following BODY

NOTES:

  1. The following UID's are MANDATORY and are retrieved from the GET Purchase Order above
    1. Supplier UID
    2. ITEM UID
    3. TaxCode UID
    4. FreightTaxCode UID
    5. Order UID
  2. Set the ReceivedQuantity and BackorderQuantity to 5 and reduce the Total by 50% of the Order.

{"Date" : "2016-07-21 00:00:00",

"Supplier" : {

"UID" : "c7d0e97f-f4ab-474b-85a4-c0cb9a237681",

},

"Lines" : [{

"BillQuantity" : 5.000000,

"BackorderQuantity" : 5.000000,

"Total" : 1449.950000,

"Item" : {

"UID" : "951b9698-a7c2-407b-874c-6e8233327599",

},

"TaxCode" : {

"UID" : "bdef043f-6c8e-497a-a07a-576fc6a15f2c",

},

}

],

"FreightTaxCode" : {

"UID" : "bdef043f-6c8e-497a-a07a-576fc6a15f2c",

},

"Order" : {

"UID" : "ce0f3a79-64a7-4fe1-995b-592906940050",

},

}

Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post