Browse Source

[FIX] Fixing Bug that was arising when selecting accounts


			
			
				6.0
			
			
		
Miguel Delgado 13 years ago
parent
commit
8aaa4252dc
  1. 14
      account_financial_report/report/account_balance_2_cols.py

14
account_financial_report/report/account_balance_2_cols.py

@ -260,8 +260,18 @@ class account_balance(report_sxw.rml_parse):
if form['display_account'] == 'bal_mouvement' and account['parent_id']:
# Include accounts with movements
result_acc.append(res)
result_acc.append(res)
if abs(res['credit']-res['debit']) >= 0.5 * 10**-int(2) \
or abs(res['credit']) >= 0.5 * 10**-int(2) \
or abs(res['debit']) >= 0.5 * 10**-int(2):
result_acc.append(res)
elif form['display_account'] == 'bal_solde' and account['parent_id']:
# Include accounts with balance
if abs(res['credit']-res['debit']) >= 0.5 * 10**-int(2):
result_acc.append(res)
else:
# Include all account
result_acc.append(res)
if form['tot_check'] and res['type'] == 'view' and res['level'] == 1 and (res['id'] not in tot):
tot[res['id']] = True
tot_deb += res['debit']

Loading…
Cancel
Save