The shop's main PC runs the BooksPOS store server, which owns that branch's database: stock, bills, khata and the day book. Only the store server writes to it. The till on the same PC, and tills on other PCs in the shop, all ask the store server. Never put the store's database on a shared folder, OneDrive or Google Drive: BooksPOS is built on the rule that one program owns it.
A sale is saved on the store PC together with a numbered message for the cloud, in one step. Every 15 seconds (less often while the cloud is not answering), or when you press Sync now, the store sends what is waiting. A message sent twice counts once, and the store forgets a message only after the cloud confirms it has saved it. In a test, sales made while the cloud was switched off reached it later, and the cloud's daily totals matched the store's own report.