mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
fix: wrong amount fetched in payment reconciliation tool
- fetch amount on account currency for outstanding invoices and - unreconcilied dr/cr notes - fix currency field name in payment ledger entry creation
This commit is contained in:
@@ -162,7 +162,7 @@ class PaymentReconciliation(Document):
|
|||||||
{
|
{
|
||||||
"reference_type": inv.voucher_type,
|
"reference_type": inv.voucher_type,
|
||||||
"reference_name": inv.voucher_no,
|
"reference_name": inv.voucher_no,
|
||||||
"amount": -(inv.outstanding),
|
"amount": -(inv.outstanding_in_account_currency),
|
||||||
"posting_date": inv.posting_date,
|
"posting_date": inv.posting_date,
|
||||||
"currency": inv.currency,
|
"currency": inv.currency,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -855,8 +855,8 @@ def get_outstanding_invoices(
|
|||||||
)
|
)
|
||||||
|
|
||||||
for d in invoice_list:
|
for d in invoice_list:
|
||||||
payment_amount = d.invoice_amount - d.outstanding
|
payment_amount = d.invoice_amount_in_account_currency - d.outstanding_in_account_currency
|
||||||
outstanding_amount = d.outstanding
|
outstanding_amount = d.outstanding_in_account_currency
|
||||||
if outstanding_amount > 0.5 / (10**precision):
|
if outstanding_amount > 0.5 / (10**precision):
|
||||||
if (
|
if (
|
||||||
min_outstanding
|
min_outstanding
|
||||||
@@ -872,7 +872,7 @@ def get_outstanding_invoices(
|
|||||||
"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_in_account_currency),
|
||||||
"payment_amount": payment_amount,
|
"payment_amount": payment_amount,
|
||||||
"outstanding_amount": outstanding_amount,
|
"outstanding_amount": outstanding_amount,
|
||||||
"due_date": d.due_date,
|
"due_date": d.due_date,
|
||||||
@@ -1412,7 +1412,7 @@ def create_payment_ledger_entry(
|
|||||||
if gle.against_voucher_type
|
if gle.against_voucher_type
|
||||||
else gle.voucher_type,
|
else gle.voucher_type,
|
||||||
"against_voucher_no": gle.against_voucher if gle.against_voucher else gle.voucher_no,
|
"against_voucher_no": gle.against_voucher if gle.against_voucher else gle.voucher_no,
|
||||||
"currency": gle.currency,
|
"account_currency": gle.account_currency,
|
||||||
"amount": dr_or_cr,
|
"amount": dr_or_cr,
|
||||||
"amount_in_account_currency": dr_or_cr_account_currency,
|
"amount_in_account_currency": dr_or_cr_account_currency,
|
||||||
"delinked": True if cancel else False,
|
"delinked": True if cancel else False,
|
||||||
|
|||||||
Reference in New Issue
Block a user