[fix] Floating point issue fixed in payment reconciliation
This commit is contained in:
parent
4952c7b3b5
commit
ee212e7bb5
@ -96,13 +96,14 @@ class PaymentReconciliation(Document):
|
|||||||
|
|
||||||
payment_amount = payment_amount[0][0] if payment_amount else 0
|
payment_amount = payment_amount[0][0] if payment_amount else 0
|
||||||
|
|
||||||
if d.invoice_amount > payment_amount:
|
if d.invoice_amount - payment_amount > 0.005:
|
||||||
non_reconciled_invoices.append({
|
non_reconciled_invoices.append({
|
||||||
'voucher_no': d.voucher_no,
|
'voucher_no': d.voucher_no,
|
||||||
'voucher_type': d.voucher_type,
|
'voucher_type': d.voucher_type,
|
||||||
'posting_date': d.posting_date,
|
'posting_date': d.posting_date,
|
||||||
'invoice_amount': flt(d.invoice_amount),
|
'invoice_amount': flt(d.invoice_amount),
|
||||||
'outstanding_amount': d.invoice_amount - payment_amount})
|
'outstanding_amount': flt(d.invoice_amount - payment_amount, 2)
|
||||||
|
})
|
||||||
|
|
||||||
self.add_invoice_entries(non_reconciled_invoices)
|
self.add_invoice_entries(non_reconciled_invoices)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user