Calculate Balance
Posted: 2018-01-28 17:00
Hi guys i need some help
I have 3 tables with these fields
1. table sales
some services fields and at the end i calculate all the prices fields in one [total]
2. table accounting
[date]
[sale] (lookup from table sales with [id] - [customer]
[total] (lookup from table sales with [total]
3. table payments
[date]
[account](lookup from table accounting)
[payment_amount]
[balance]
in table 2 i charge the customer with an amount and then when the customer gives an advance i would like to substrack it from the balance
for example in table accounting the total is 100
then the table payments i put a new record, i choose the customer i put the payment amount of 20 and the balance goes 80
then another day i put a new record in the same customer of another 20 and the balance goes 60
How can i do that?
Thank you
I have 3 tables with these fields
1. table sales
some services fields and at the end i calculate all the prices fields in one [total]
2. table accounting
[date]
[sale] (lookup from table sales with [id] - [customer]
[total] (lookup from table sales with [total]
3. table payments
[date]
[account](lookup from table accounting)
[payment_amount]
[balance]
in table 2 i charge the customer with an amount and then when the customer gives an advance i would like to substrack it from the balance
for example in table accounting the total is 100
then the table payments i put a new record, i choose the customer i put the payment amount of 20 and the balance goes 80
then another day i put a new record in the same customer of another 20 and the balance goes 60
How can i do that?
Thank you