POS Duplicated sales invoice under the same offline pos name

i’m using v7 and the pos sometimes creating many copies from the same sales invoice under the same pos offline name but with different sales invoice serial , which is very bad to get correct report about the sales .

Example

i made a sale for glass of water for 5 coins and the offline no is 150000001
i see 3 copies of sales invoice under the same offline name 150000001
but with serial SINV-1,2,3

Hi @Bassam_Mamdouh

This issue is fixed in v8, kindly pull the latest update and check

Hello @rohit_w

ok , but i made many changes on the v7 and i dont want to loose it , i think if i pulled the new version 8 or 9 i will loose it !!!

maybe its a time to remove your changes to an app and take advantage of hooks. you don’t want to be always stuck on v7.

thx @ganas
ok , but how can i use hooks to apply my changes ?
is there any documentations ?
how can i filter dublicated records at the moment , i have a business running now and my reports giving me wrong results due to dublication :frowning:

First go through https://frappe.io/docs/user/en/guides/app-development and give close attention to Exporting Customizations to your App, and How To Create Custom Fields During App Installation entries.

1 Like

@ganas
ok, i checked the articles but it looks like working if i made changes to the doc type but what about the changes which i made for the core code of erpenxt or frappe it self how can i keep them ?

You can’t keep changes to the core code, you will have to merge them manually after update.
what kind of changes did you do? are they generic so that you can contribute them back in a pull request ?

see this topic it has good discussion of types of changes https://discuss.frappe.io/t/customizing-erpnext-will-bench-update-later-override-our-changes/29137

1 Like

@ganas @rohit_w
i have already investigate the issue and i see that you only removed the dublicates from the list but it still wrote in the accounting entries and after alot of investigations i see that the problem start from the client side as i saw the dublicates created in the local storage it self :frowning:
so is there any idea about this issue ?

Hi @Bassam_Mamdouh

Can you check latest pos js and pos py file and make changes in your files accordingly, if you don’t want to update your application

Thanks @rohit_w @ganas @rmehta

let me check and i will back to tell you the result

there is also another bug that the server sometimes do not save the invoices from the local storage after syncing , i catch that error while reviewing the printed recipts comparing it withe the saved result in local storage it was typical but after syncing i saw that some of them did not wrote in the data base and not in the list :frowning:

i passed that bug by commenting the clear.localstorage line so the list keep syncing with the server untill i delete it manually and that seems solved the problem as the server stopped missing the invoices.

today i catched another bug as the pc sometimes do not write the invoice on the local storage and its not saved in database as well but i have the reciept which i got after the selling operation , this is weird and i still invistigate in this issue

@Bassam_Mamdouh
All the issues you have marked are already fixed in version 8, kindly pull latest update and check

1 Like

Thanks very much for your response @rohit_w
as i said im reading the .js and .py files of pos and will try to adjust my code to meet the new changes which i need to fix the problem and will get back to you with the result to help the people who still working with v7

Best Regards

@Bassam_Mamdouh may I ask what kind of changes you added to the POS?

Hi @rohit_w

I have sadly encountered this same issue myself yesterday.

Offline POS printed some receipts but the Invoices were never synced on the Server side hence not seen at all which is clearly a bug.

The initial set up was version 9.x.x but this happened after I upgraded to latest version 10.x.x

Any ideas on what the issue could be?

Regards,

Any error in the error log related to POS?

i already fixed the problem of duplicated, missed invoices and the performance of the system in v7 but i do not know how to help you with my code. provide me a channel that i can send my fixes to you so the people who still working with v7 can use it

Hi @Bassam_Mamdouh,

Please share this code regardless of version difference (I am using latest v10) I just want to to check if I have similar challenge in the code.

Regards,

Sorry, I did not manage to check on this at the time.

However, I noticed I still had the browser setting Never remember history in Firefox when I changed it to Always remember history the POS terminal did not loose any Sales made (even if cached locally for a while which was not the case before) for 2 days or so but since the Print dialog issue reported here POS Duplicate (Triplicate) Print Dialog was still persistent customer asked that we switch back to Online POS which was possible after hotfix become available on Pay button issue POS Pay Button Not Working!.

Please consider adding some notes in the POS Settings page as is the case for some Reports describing briefly any assumptions or expected settings browser side if this is the reason.

Many thanks as always.

Mwai

Same issue I reported here:

We however use Chrome. Any similar browser setting which may be causing this?

Kind regards,