Presumably you'll eventually have enough transactions that you'll want
to start paging them. At that point, it would change how you would
arrive at the balance. If a user is looking at page 30, you shouldn't
need to retrieve the transactions from pages 1-29.
Eventually, you may want to consider so
It worked!!! Thanks a lot.
Marcelo
2010/2/18 Tim :
> There might be a better way, but something like this should work.
>
> In your view, build a list...
>
> transaction_list = []
> balance = 0
> for tran in Transaction.objects.order_by('date'):
> balance = balance + tran.debit
> balance = ba
There might be a better way, but something like this should work.
In your view, build a list...
transaction_list = []
balance = 0
for tran in Transaction.objects.order_by('date'):
balance = balance + tran.debit
balance = balance - tran.credit
transaction_list.append({'transaction':tra
I have a model with accounting records, in which the last two columns
are "Debt" and "Credit".
I would like to do a report that is something like the following:
Description DebtCredit Balance
Movement 1100.000.00 100.00
Movement 2
4 matches
Mail list logo