I have a Pos system and I need to add some functionalities, such as:
Create multiple tabs for multiple independent sales
Keeping the functionalities I already have(apply discounts add product quantities etc).
Save the sale into indexedDB before DB
Correct calculation of the stock between tabs and refresh when an order is saved in the database
And the sale number must be consecutive after the sale is saved in database.