Error Code 37003

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
HIT_Ken
Contributing User
5 Posts
Contributing User
Contributing User

5Posts

0Kudos

0Solutions

Error Code 37003

I was trying to create an order, but I have no idea why the line total is unbalanced.

I need the attributes of "total" and "UnitPrice". 

Any suggestion for this error please, thanks 

1.png
7 REPLIES 7
Stuart_Donaldson
Valued Partner
492 Posts
Valued Partner
Australia
Valued Partner

492Posts

1Kudos

18Solutions

Re: Error Code 37003

If the ship quantity is 5 and the unit price is 29.95 then the total is 149.75.

From what I have done in invoicing the quantity and total can be sent or the quantity and Unit Price sent instead. Presumably the same is true for orders.

 

https://developer.myob.com/api/myob-business-api/v2/purchase/order/order_item/

shows the quantity and total as required but not the unit price.

Stuart Donaldson (RMP)
donaldsonsit@bigpond.com
Developer, ODBC, Access, Crystal
28 Beleura Hill Rd, Mornington, Vic 3931. Ph: 0418 148 569



.
gavin12345
Ultimate User
5,037 Posts
Ultimate User
Australia
Ultimate User

5,037Posts

917Kudos

640Solutions

Re: Error Code 37003

edited to avoid duplication - As per above

 

Regards

Gavin

(gavinw222@gmail.com)
HIT_Ken
Contributing User
5 Posts
Contributing User
Contributing User

5Posts

0Kudos

0Solutions

Re: Error Code 37003

Thanks for your reply.

 

In my picture, the total is 134.77 because I would like to let the MYOB automatically apply the "

DiscountPercent". Although the ship quantity is 5 and the unit price is 29.95.
 
The ideal state is when creating the order with quantity 5, the unit price is 29.95 and the total is 134.77, and the MYOB automatically apply "DiscountPercent" to 10%. 
 
But when I change the total to 134.79 and keep the quantity 5 and the unit price is 29.95, it will be created successfully.
 
And according to the MYOB API Document, error code 37007 is "Decimal precision error on Total field", so I thought the problem is in the number of line total. But I have no idea why only when the total is 134.77 will be created fail, but 134.79 will no
2.png
Stuart_Donaldson
Valued Partner
492 Posts
Valued Partner
Australia
Valued Partner

492Posts

1Kudos

18Solutions

Re: Error Code 37003

What happens if you include the DiscountPercent figure in the Line array?

Stuart Donaldson (RMP)
donaldsonsit@bigpond.com
Developer, ODBC, Access, Crystal
28 Beleura Hill Rd, Mornington, Vic 3931. Ph: 0418 148 569



.
HIT_Ken
Contributing User
5 Posts
Contributing User
Contributing User

5Posts

0Kudos

0Solutions

Re: Error Code 37003

It still got the error.

3.png
Stuart_Donaldson
Valued Partner
492 Posts
Valued Partner
Australia
Valued Partner

492Posts

1Kudos

18Solutions

Re: Error Code 37003

... and if you leave out the UnitPrice or the Total?

 

Worth raising a ticket with API support I think. They were very helpful with issues I raised.

Stuart Donaldson (RMP)
donaldsonsit@bigpond.com
Developer, ODBC, Access, Crystal
28 Beleura Hill Rd, Mornington, Vic 3931. Ph: 0418 148 569



.
HIT_Ken
Contributing User
5 Posts
Contributing User
Contributing User

5Posts

0Kudos

0Solutions

Re: Error Code 37003

But for my purpose, the unit price and total are requirements.

 

I have submitted a ticket, thanks for your help

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