Problem with cashier app

Hi everyone!
I am working in a cafe, and everything we do (counting the drinks, counting earnings etc) we have to do “by hand”. So, i tough that bubble would be a perfect choice, but it’s harder then I tough. By the way, I am working in Bubble for oven a year, I created a lot of apps (social networks, schedulers, fitness apps and so on) so, i have some experience but I still find it hard to make cashier app. The problem seems so simple but yet extremely complicated. Here is some info (some names are in foreign language, sorry for that):
So, I have a data type named ‘Proizvod’ (translated - product) that contains name of the product, price, amount of that product in the warehouse, and a type (is it a coffee, juice, alcohol etc).
(how app looks. these are the tables)

Everything works just fine. When worker opens one table and adds the drinks, amount of that product in the warehouse is reduced, bill for that table is calculated and so on, but the problem happens when that worker finish his or her shift. The app have to show amount that guests have consumed for that shift but I just can’t do that right. There is a data type called ‘Zarada’ (earnings) that have a type ‘Proizvod’ (product). Product have a type named ‘Sold’ and it works fine like that but once I have to restart ‘Sold’ amount, problem happens. It resets ‘Sold’ amount for every ‘Earnings’ type. For example, ‘earnings’ type creates when worker ends his shift and every ‘earnings’ type contains a list of ‘Product’ and when i do ‘search for products’ and set their ‘sold’ amount to 0, it sets for every ‘earnings’. I know it’s very bad explained but I am in a hurry right now, sorry.
I will explain it better when I catch some time but I need some ideas as soon as possible. If you understood even a small part of this, please help.
Here are some screenshots:



Bump on this. I really need help

Im making an app its similar yours.
I create 2 database (1 for product 1 for seller)
When a sell is make , he make changes do thing in product (Ex.: Number of coffe avaible -1) and creat a new thing (in seller database for this sell).
Later i create a admin panel/site , and i have a repetitive group that show me the seller for create date time (last sales first).
I think this logical can help you.
My tip is: Think you can in 1 button make 2-3 changes in database.

My app is for Bar. In product table i have: Name: Value for sell : Value for Buy: Total Volume: Cost per ML Sale, Cost per ML Buy
With this data type i can make all payment/control system.

Ex.: Coffe 1 i pay $10 por 1 liter and sell for $2 50 ML.

Well, that would work like that, but I don’t want to see what every guest have bought, i want to see how much of each product have been sold before the button ‘end shift’ is pressed. If i have to count how much is sold for each table then this app is useless.
For example, when the shift start, daily report would look like this:

Product name //////// Amount in the warehouse ////////////////// Sold in the current shift


Coffee ////////// 300 ///////////// 20
Coca-cola //////////// 120 /////////// 10

etc… After the button ‘end the shift’ is pressed it should look like this:

Product name //////// Amount in the warehouse ////////////////// Sold in the current shift


Coffee ////////// 300 ///////////// 0
Coca-cola //////////// 120 /////////// 0

But i have to save this data as something. If i save each product in one list, i can’t reset the number of sold amount because it will restart that amount for every shift ever saved. I want to find a way that will look like this:
for each Product in Products do
LastShift.ProductList.Product = this.Product;
LastShift.ProductList.Product.SoldAmount = this.Product.SoldAmount;

Anyone who knows programming will understand this.