Skip to content

Commit

Permalink
fix test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodERPJeff committed Jun 19, 2016
1 parent 4c7af52 commit 2296631
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions finance/trial_balance.py
Expand Up @@ -92,8 +92,8 @@ def create_trial_balance(self):
for current_occurrence in current_occurrence_dic_list:
account = self.env['finance.account'].browse(current_occurrence.get('account_id'))
ending_balance_debit = ending_balance_credit = 0
this_debit = current_occurrence.get('debit', 0)
this_credit = current_occurrence.get('credit', 0)
this_debit = current_occurrence.get('debit', 0) or 0
this_credit = current_occurrence.get('credit', 0) or 0
if account.balance_directions == 'in':
ending_balance_debit = this_debit - this_credit
else:
Expand Down Expand Up @@ -121,8 +121,8 @@ def create_trial_balance(self):
cumulative_occurrence_credit = cumulative_occurrence_debit = 0
subject_name_id = trial_balance.subject_name_id.id
if subject_name_id in trial_balance_dict:
this_debit = trial_balance_dict[subject_name_id].get('current_occurrence_debit', 0)
this_credit = trial_balance_dict[subject_name_id].get('current_occurrence_credit', 0)
this_debit = trial_balance_dict[subject_name_id].get('current_occurrence_debit', 0) or 0
this_credit = trial_balance_dict[subject_name_id].get('current_occurrence_credit', 0) or 0

if trial_balance.subject_name_id.balance_directions == 'in':
ending_balance_debit = initial_balance_debit + this_debit - this_credit
Expand Down

0 comments on commit 2296631

Please sign in to comment.