[IMP] using debit and credit to get balance and reduce time consumption

pull/7/merge
Humberto Arocha 2013-06-20 12:55:25 -05:30
parent a2cf3cc997
commit ce041c78bd
1 changed files with 8 additions and 1 deletions

View File

@ -461,7 +461,14 @@ class account_balance(report_sxw.rml_parse):
#~ Black
dict_black = {}
for i in account_black:
dict_black[i.id] = {'obj': i, 'debit': i.debit, 'credit':i.credit, 'balance': i.balance }
d = i.debit
c = i.credit
dict_black[i.id] = {
'obj': i,
'debit': d,
'credit': c,
'balance': d-c
}
if form['inf_type'] == 'BS':
dict_black.get(i.id)['balanceinit'] = 0.0