fix: Convert null values to empty string on grouping

This commit is contained in:
Deepesh Garg 2021-07-25 21:26:22 +05:30
parent 19a0ca1980
commit 3fcc5e3134

View File

@ -104,7 +104,7 @@ class ExchangeRateRevaluation(Document):
where account in (%s) where account in (%s)
and posting_date <= %s and posting_date <= %s
and is_cancelled = 0 and is_cancelled = 0
group by account, party_type, party group by account, NULLIF(party_type,''), NULLIF(party,'')
having sum(debit) != sum(credit) having sum(debit) != sum(credit)
order by account order by account
""" % (', '.join(['%s']*len(accounts)), '%s'), tuple(accounts + [self.posting_date]), as_dict=1) """ % (', '.join(['%s']*len(accounts)), '%s'), tuple(accounts + [self.posting_date]), as_dict=1)