Hey,
I have the following tables / data :
tbl_invoice:
invoicenr customer date discount
1 ALF 15/10/2004 5€
tbl_invoicedetails:
invoicenr product price
1 123 10€
2 456 10€
when I make a totalreport of all invoices, it gives me the following :
total sales 20€ (i.e. sum of products)
discount 10€ !!!!!!!!!! (WHICH IS WRONG)
in fact, the discount is calculated according the number of invoicedetail-lines I have. It should take this value only once.
How can I correct this ?
Regards,
Peter
I have the following tables / data :
tbl_invoice:
invoicenr customer date discount
1 ALF 15/10/2004 5€
tbl_invoicedetails:
invoicenr product price
1 123 10€
2 456 10€
when I make a totalreport of all invoices, it gives me the following :
total sales 20€ (i.e. sum of products)
discount 10€ !!!!!!!!!! (WHICH IS WRONG)
in fact, the discount is calculated according the number of invoicedetail-lines I have. It should take this value only once.
How can I correct this ?
Regards,
Peter