Hello support Team,
I am making a billing app which has a relation to our "product" app/table.
The products table has the product title, price without taxes and description.
A bill can contain multiple products, and each product can be ordered more then once. I didn't find a way to use only one relation field (with multiples choices on) to the product table where it is possible to add as many of a product as delivered to our clients and from there calculate the total amount, for example:
A client ordered 1 of product A, 2 of product B and 3 of product C. the total amount would be:
(1* (price of product A) + 2*(price of product B) + 3*(price of product C))* taxes
The approche I use now is: 5 relation to the products table, 5 quantity ordered field (number type) and a total field which sums up all of the prices and adds the taxes.
Is it possible to make this billing app with 1 relation field to our product table, up to 5 fields to indicate the amount ordered from each product? (for example: 1 of A, 2 of B and 3 of C) and one calculation field to calculate the total amount (price*taxes amount)
Or if we have one relation field to our products table with multiple choices on (all of the product ordered by the client would be in one relation field), is it possible to use a for loop to go through the prices of each product, take into account the number each product was ordered and calculate this total amount on that field?
Please sign in to leave a comment.