Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Feb 14, 2020
1 parent fe5382f commit 7377aa8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions l10n_nl_xaf_auditfile_export/models/xaf_auditfile_export.py
Expand Up @@ -295,7 +295,7 @@ def get_move_line_count(self):
"select count(*) from account_move_line "
"where date >= %s "
"and date <= %s "
"and (company_id=%s or company_id is null)",
"and company_id=%s",
(self.date_start, self.date_end, self.company_id.id),
)
return self.env.cr.fetchall()[0][0]
Expand All @@ -306,21 +306,21 @@ def get_move_line_total_debit(self):
"select sum(debit) from account_move_line "
"where date >= %s "
"and date <= %s "
"and (company_id=%s or company_id is null)",
"and company_id=%s",
(self.date_start, self.date_end, self.company_id.id),
)
return round(self.env.cr.fetchall()[0][0], 2)
return round(self.env.cr.fetchall()[0][0] or 0.0, 2)

def get_move_line_total_credit(self):
"""return total credit of move lines"""
self.env.cr.execute(
"select sum(credit) from account_move_line "
"where date >= %s "
"and date <= %s "
"and (company_id=%s or company_id is null)",
"and company_id=%s",
(self.date_start, self.date_end, self.company_id.id),
)
return round(self.env.cr.fetchall()[0][0], 2)
return round(self.env.cr.fetchall()[0][0] or 0.0, 2)

def get_journals(self):
"""return journals"""
Expand Down

0 comments on commit 7377aa8

Please sign in to comment.