Merge pull request #38036 from frappe/mergify/bp/version-15-hotfix/pr-38004
fix: handling of exchange rate journals in AR/AP (backport #38004)
This commit is contained in:
commit
ddb1a7643a
@ -176,12 +176,18 @@ frappe.query_reports["Accounts Receivable"] = {
|
|||||||
"label": __("Show Remarks"),
|
"label": __("Show Remarks"),
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "for_revaluation_journals",
|
||||||
|
"label": __("Revaluation Journals"),
|
||||||
|
"fieldtype": "Check",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "ignore_accounts",
|
"fieldname": "ignore_accounts",
|
||||||
"label": __("Group by Voucher"),
|
"label": __("Group by Voucher"),
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
"formatter": function(value, row, column, data, default_formatter) {
|
"formatter": function(value, row, column, data, default_formatter) {
|
||||||
|
|||||||
@ -279,11 +279,20 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
row.invoice_grand_total = row.invoiced
|
row.invoice_grand_total = row.invoiced
|
||||||
|
|
||||||
if (abs(row.outstanding) > 1.0 / 10**self.currency_precision) and (
|
must_consider = False
|
||||||
(abs(row.outstanding_in_account_currency) > 1.0 / 10**self.currency_precision)
|
if self.filters.get("for_revaluation_journals"):
|
||||||
or (row.voucher_no in self.err_journals)
|
if (abs(row.outstanding) > 1.0 / 10**self.currency_precision) or (
|
||||||
):
|
(abs(row.outstanding_in_account_currency) > 1.0 / 10**self.currency_precision)
|
||||||
|
):
|
||||||
|
must_consider = True
|
||||||
|
else:
|
||||||
|
if (abs(row.outstanding) > 1.0 / 10**self.currency_precision) and (
|
||||||
|
(abs(row.outstanding_in_account_currency) > 1.0 / 10**self.currency_precision)
|
||||||
|
or (row.voucher_no in self.err_journals)
|
||||||
|
):
|
||||||
|
must_consider = True
|
||||||
|
|
||||||
|
if must_consider:
|
||||||
# non-zero oustanding, we must consider this row
|
# non-zero oustanding, we must consider this row
|
||||||
|
|
||||||
if self.is_invoice(row) and self.filters.based_on_payment_terms:
|
if self.is_invoice(row) and self.filters.based_on_payment_terms:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user