I’m trying to add the total to my database. I have a text field that shows the quantity multiplied by the price. I want that number created to be the total in the database. Can someone please help me with this? Been stuck on this for a few days. I’ll attach photos of everything I believe you will need to help me solve this, If you need more information and/or photos please let me know. Thanks for your help.
You’ll need 3 datatypes for this
1 - product: this wills store info about the product such as name, description, price, sku, etc
2- line item: this will store either the product datatype (so you can reference information about the product such as name, description, etc) as well as order information such as quantity, price (qty*this line item’s product’s price), line item discounts, etc.
3- Invoice: this can store a list of line items (alternatively you can only store the invoice id on each line item), discounts, tax, total, etc.
Updating the total of the invoice is as simple as fetching all the invoice’s line items, calculating the sum, then applying tax or discounts
Each item will have its own total. The total is the price of the service * quantity but I don’t know how to save the total under the data type total.
do a search for each item’s total:summed
Why would I do search for each items total if the total data field is empty?
Can you share your data structure?
I attached 2 pictures of the structure. Let me know if you need anything else, Thank you so much for your help.
The data structure doesn’t make sense, particularly the invoice datatype. Have a look at the structure I offered and try implement that
By implementing that data structure still doesn’t show me how I can add the total to the total field?
Its all in my first comment. I explain the line item total and the invoice total. What’s not making sense?
I understand the line item total is quantity * price but how do I actually input it and where inside of bubble?
This topic was automatically closed after 70 days. New replies are no longer allowed.