MYOBCommunity
Partner Zone
|
|
Partner Zone

How to delete Invoice with payment in MYOB API v2

1 REPLY
MYOB Staff Post DeveloperJack
141 Posts
MYOB Staff Post
Australia
DeveloperJack
MYOB Staff Post

141Posts

30Kudos

21Solutions

Re: How to delete Invoice with payment in MYOB API v2

Hi there @learnjplans_22,

 

For an invoice with a payment, I believe you'll first need to reverse the customer payment (e.g. as a credit) and then close the invoice.  You'd be matching the in-product steps as outlined in this MYOB Help documentation page.

 

For the oData filter, I'd recommend looking at the any() function that we've outlined in the odata documentation. This will allow you to say "where any of the invoices have an Account UID of Xxxxxx".

 

If you have any trouble with the above I'd recommend reaching out to the support team via developers@myob.com where we can take a closer look at your situation.

 

 

Cheers,

Jack

Jack Skinner
MYOBapi Evangelist

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/
learnjplans_22
1 Post
User
learnjplans_22

1Posts

0Kudos

0Solutions

How to delete Invoice with payment in MYOB API v2

Hi, My goal is to delete an invoice with payment. I'm getting an error of "Cannot delete Invoice with payment(s)  applied". What is the best way to do this on api?

I also want to retrieve payments by invoice number? How can i achieve that?
I tried {domain}/{cf guid}/Sale/CustomerPayment/?$filter=Invoices/UID eq guid'xxx-xxxx-xxxx'

but it throws an error of "Please check your OData query: The parent value for a property access of a property 'UID' is not a single value. Property access can only be applied to a single value"

i think because the invoice property is an array.

 

Thanks!

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