Hello all,
I am developing invoice system and i have two tables:
1- invoice: contains ( invoiceID, Date and customerName) i added custom field called total
2- invoiceDetail: contains (invoiceID, itemName, Quantity and price) also, i added custom field for sub-total and it works fine.
how can i sum(sub-total) for each invoice in list page?
e.g.
InvoiceID | Date | Customer Name
2 | 1/1/2017 | Sarah
Item | Quantity | Price | sub-total
Pen | 4 | 10$ | 40
Paper | 6 | 20$ | 120
after i insert above invoice it will redirect to list invoice page
i want to display invoice total in the list invoice page as custom field.
what should i do?