Forum Discussion

DavidDNCS's avatar
DavidDNCS
Contributing Cover User
14 days ago

How to prevent API from generating duplicate lines or invoices

Hi Everyone

 

I have written and application that acts like a translator between InfinityPOS and MYOB AccountRight.

It has been working for years and I have several clients using it.

Lately some customers have complained about having duplicate invoices imported and also sometimes an additional line in the invoice.

This interface imports Customer and Supplier Invoices and GL Journals and wanted to check with the community if there is anything I can do to fix it.

It only happens 2 - 3 times a month at random and it can be any type of transaction.  Sometimes it might be a extra line in an invoice sometimes an extra GL Journal.

The system does check if invoices and lines are travelling OK and will not flag an invoice for example as being transferred if it does not get success codes along the way.  I could build a delay loop in but I do not want to slow it down as it already takes a while to do everything during a daily transfer. 

My question is :

1). Does any one have issues with this type of problem ?

2). If you do have issues have you fixed them up or can anyone provide any ideas on how they could be fixed up.

 

Thanks in advance

David

1 Reply

  • BigWill's avatar
    BigWill
    Experienced User
    2 days ago

    Hey Dave,

     

    Friday night (12/6/2026) we've encountered the first occurance of this happening ever and now every time subsequent. I have written a similar piece of software for ourselves and I have checks in our system which reported a heap of duplicates (245 records in Sale/Invoice/ spanning roughly 20 months) 3 duplicates in one month, 20 in another and so forth. I've checked if its my fault but it looks like the api is straight up reporting the same line (same SaleUID) a couple of times here and there. 

    I am fixing the data after a sync by checking for duplicate SaleUID ids and deleting one of them before using the data. 

    It feels also at the same time this started that I'm getting very few cache hits with the etags. Looks like a lot of the data is dirty every sync making every sync much slower than before Friday. 

    Not sure if this is exactly what you're getting but its in the ballpark for sure!

     

    Hope they sort the issue for us and good luck to you sorting your duplicates!