refactor: filter to toggle employee advance scenario in AP

(cherry picked from commit 257e13c299)

# Conflicts:
#	erpnext/accounts/report/accounts_payable/accounts_payable.js
This commit is contained in:
ruthra kumar
2024-09-05 16:12:52 +05:30
committed by Mergify
parent 99828d945f
commit efdc2173b2
2 changed files with 10 additions and 1 deletions

View File

@@ -158,8 +158,13 @@ frappe.query_reports["Accounts Payable"] = {
fieldtype: "Check",
},
{
<<<<<<< HEAD
fieldname: "in_party_currency",
label: __("In Party Currency"),
=======
fieldname: "handle_employee_advances",
label: __("Handle Employee Advances"),
>>>>>>> 257e13c299 (refactor: filter to toggle employee advance scenario in AP)
fieldtype: "Check",
},
],

View File

@@ -214,7 +214,11 @@ class ReceivablePayableReport:
# Build and use a separate row for Employee Advances.
# This allows Payments or Journals made against Emp Advance to be processed.
if not row and ple.against_voucher_type == "Employee Advance":
if (
not row
and ple.against_voucher_type == "Employee Advance"
and self.filters.handle_employee_advances
):
_d = self.build_voucher_dict(ple)
_d.voucher_type = ple.against_voucher_type
_d.voucher_no = ple.against_voucher_no