In my app, I want to create a tab for generating reports for my products table to know amount spent on product purchased and also on the order table to know the amount of revenue generated from products sold.
I created my app using JSON and trebuchet, but when I checkout order, it doesn’t remove the quantity from the amount of products available, what can I do?
On my profile page also, I want to be able to view the location like the one on the screenshot.
This is the app link.
Yes, I can.
I have already created the profile page for editing and also for sign up when the users sign in, so I the database can collect the information along with the location tool which at the moment, displays the coordinates.
The reason as to why there are so many columns in the “order helper” table is because I used the JSON and trebuchet method and also separated the data like the ID, name of the product, quantity, and price.
When a user creates an order, the user selects the products from the product tab where they add to order, then moves to the order tab and checkout. After checking out, it is registered in the order table, and the user can view the orders linked to their signed-in email, but the admin can view all orders and who placed them.
What I want to do on the report page is to be able to see the total amount generated from the sales, the total amount from the products purchased (the inventory) and other expenses, which are on the expense tab, and then calculate for profit or loss.
A feature to add new quantity to the owned products is the one giving me issues presently. I set it to user specific and then added a button to clear the value after submission, it calculates it but when the value clears, it removes the calculation again, i am looking for a way to store the quantity being entered and sum it with the old quantity to keep track of all the quantities.
How are you allowing them to select a product? By a boolean user-specific column?
I’m unclear on which table do you store the calculation, I think there’s something missing here so maybe a Loom is needed to understand the context better.
Your “New Edit” workflow updates a value and then immediately clears that same value.
If you want the inputted value to remain you cannot clear it. You need to rework your data. I highly recommend to watch more of Rob’s videos, like the one I dm’d you.
Yeah, i appreciate your help so far.
I have done that precisely, but the problem is when that new quantity add is also out of stock, and i want to add a new quantity, I have to edit the last new quantity and add to the new one else i won’t be able to track the quantities in the database.