[FIX] account: entries analysis with null values in debit/credit
In SQL, the addition/subtraction between NULL and an integer/numeric returns NULL. Therefore, if either debit or credit was set to null instead of 0.0, debit-credit returned null, instead of the actual subtraction opw-634044
This commit is contained in:
parent
567ade56df
commit
8aa6aa0c78
|
@ -145,7 +145,7 @@ class account_entries_report(osv.osv):
|
|||
l.amount_currency as amount_currency,
|
||||
l.debit as debit,
|
||||
l.credit as credit,
|
||||
l.debit-l.credit as balance
|
||||
coalesce(l.debit, 0.0) - coalesce(l.credit, 0.0) as balance
|
||||
from
|
||||
account_move_line l
|
||||
left join account_account a on (l.account_id = a.id)
|
||||
|
|
Loading…
Reference in New Issue