General ledger: debit/credit value rounding upto 3 decimals
This commit is contained in:
parent
00fc600e8b
commit
40e3d0c780
@ -136,17 +136,17 @@ def get_accountwise_gle(filters, gl_entries, gle_map):
|
||||
opening, total_debit, total_credit = 0, 0, 0
|
||||
|
||||
for gle in gl_entries:
|
||||
amount = flt(gle.debit) - flt(gle.credit)
|
||||
amount = flt(gle.debit, 3) - flt(gle.credit, 3)
|
||||
if filters.get("account") and (gle.posting_date<filters.from_date or cstr(gle.is_opening)=="Yes"):
|
||||
gle_map[gle.account].opening += amount
|
||||
opening += amount
|
||||
elif gle.posting_date <= filters.to_date:
|
||||
gle_map[gle.account].entries.append(gle)
|
||||
gle_map[gle.account].total_debit += flt(gle.debit)
|
||||
gle_map[gle.account].total_credit += flt(gle.credit)
|
||||
gle_map[gle.account].total_debit += flt(gle.debit, 3)
|
||||
gle_map[gle.account].total_credit += flt(gle.credit, 3)
|
||||
|
||||
total_debit += flt(gle.debit)
|
||||
total_credit += flt(gle.credit)
|
||||
total_debit += flt(gle.debit, 3)
|
||||
total_credit += flt(gle.credit, 3)
|
||||
|
||||
return opening, total_debit, total_credit, gle_map
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user