Missing invoices in Offline PoS

Hold on. There is some work ongoing now. Will update soon.

2 Likes

Hope to get some feedback soonā€¦

I think using cypress to simulate a large volume of POS invoices in online/offline conditions would be the way to go. Each invoice pushed from cypress should have a unique identifier that can be used to correlate it with the submitted POS invoices in ERPNext. Comparing the two sets of invoices might help to pinpoint the error.

1 Like

Hi @Chude_Osiegbu

What is Cypresse ?

https://frappe.io/docs/user/en/ui-testing

1 Like

Thanks

Though I have a real life store that we are using for testing.

They generate about 500 receipts daily and they print a store copy for control purpose.

We lose 3 to 4 of this daily and we are able to identify the missing invoices for reposting

Right now there is no discernable logic to the missing invoices. It is just random

We have made some changes to the pos bahrain app which sync in batches also rewritten js code natively. Theoretically it should not miss any invoice. But most of are clients donā€™t have high frequency sales if anyone can test it and confirm if it helps.

Thanks

Would be good to have some kind of diagnostic tool that logs:

  • timestamp when local storage size nears is maximum
  • timestamp when network availability changes

and correlate them with the time stamp on the missing invoices.

Is it ready to test now? @Muzzy said it needed some finishing

It is ready but I have not merged it as we have some live projects going on which we make changes constantly.
This is the PR
https://github.com/f-9t9it/pos_bahrain/pull/148

I will merge it now.
If you can test it today itself and help me with the results?

Thanks.

Hello @fkardame and @Muzzy

We have been testing the new pos_bahrain for the past 5 days in a client location

The client does about 600 invoices daily, using offline invoices

We used to have on the average 3 missing invoices daily

For the past 5 days we have had noneā€¦zero.

I am not jumping for joy yet but this is looking hopeful.

I will be extending this to another client location with a larger invoice count.

What are you getting from your end?

2 Likes

Hi. Good to hear this. Fortunately we had rare instances of missing invoices since we built POS Bahrain. We had kept strict instructions of having pos open on only 1 tab of the FireFox browser. But thanks for the feedback. This will surely put our mind at ease.

Can you give brief of how you are tracking every invoice. Are you printing in duplicate (1 for customer and 1 for the shop) to conclude that there are no missing invoices? The duplicate would match with the daily sales invoice.

Not sure what has made the probable fix. Is it rewriting of the code in native language, sync settings or mix of both. The more itā€™s used in production the better would be confirmation that no invoice is missing. Looking forward to hearing from you about the other clients as well.

In this particular client location we agreed on the following

  1. Printing of duplicate invoice, one for the customer and one for the shop/control
  2. At end of day we count the number of invoices on hand against the number of invoices submitted on ERPNext.
  3. We also sum up total value on the physical invoices versus total value on ERPNext.

It is a lot of work, but it needed to be done

I will keep you updated as we extend this to another client location.

Regards

3 Likes

Hi @olamide_shodunke just wanted to know if there were any more missing/duplicated invoices since then? One additional fix we had done for a client was increasing Gunicorn workers to 8 from 4 on a 4 core 8 GB RAM VPS. This seems to have fixed the duplication of invoices.

1 Like