[FIX] Totalizing lines is being fixed and now summarize only those lines

which are in the account_list.
pull/7/merge
Humberto Arocha 2013-07-25 23:06:44 +00:00
parent 49383e8df0
commit b03c6b7930
1 changed files with 5 additions and 5 deletions

View File

@ -332,6 +332,7 @@ class account_balance(report_sxw.rml_parse):
if 'account_list' in form and form['account_list']: if 'account_list' in form and form['account_list']:
account_ids = form['account_list'] account_ids = form['account_list']
account_list= form['account_list']
del form['account_list'] del form['account_list']
credit_account_ids = self.get_company_accounts(form['company_id'] and type(form[ credit_account_ids = self.get_company_accounts(form['company_id'] and type(form[
@ -726,11 +727,10 @@ class account_balance(report_sxw.rml_parse):
# #
# Check whether we must sumarize this line in the report or not # Check whether we must sumarize this line in the report or not
# #
if form['tot_check'] and res['type'] == 'view' and res['level'] == 1 and (res['id'] not in tot): if form['tot_check'] and (res['id'] in account_list) and (res['id'] not in tot):
if form['columns'] == 'qtr': if form['columns'] == 'qtr':
tot_check = True tot_check = True
#~ tot[res['id']] = True tot[res['id']] = True
tot_bal1 += res.get('bal1', 0.0) tot_bal1 += res.get('bal1', 0.0)
tot_bal2 += res.get('bal2', 0.0) tot_bal2 += res.get('bal2', 0.0)
tot_bal3 += res.get('bal3', 0.0) tot_bal3 += res.get('bal3', 0.0)
@ -739,7 +739,7 @@ class account_balance(report_sxw.rml_parse):
elif form['columns'] == 'thirteen': elif form['columns'] == 'thirteen':
tot_check = True tot_check = True
#~ tot[res['id']] = True tot[res['id']] = True
tot_bal1 += res.get('bal1', 0.0) tot_bal1 += res.get('bal1', 0.0)
tot_bal2 += res.get('bal2', 0.0) tot_bal2 += res.get('bal2', 0.0)
tot_bal3 += res.get('bal3', 0.0) tot_bal3 += res.get('bal3', 0.0)
@ -755,7 +755,7 @@ class account_balance(report_sxw.rml_parse):
tot_bal13 += res.get('bal13', 0.0) tot_bal13 += res.get('bal13', 0.0)
else: else:
tot_check = True tot_check = True
#~ tot[res['id']] = True tot[res['id']] = True
tot_bin += res['balanceinit'] tot_bin += res['balanceinit']
tot_deb += res['debit'] tot_deb += res['debit']
tot_crd += res['credit'] tot_crd += res['credit']