mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
refactor: filter to toggle employee advance scenario in AP
This commit is contained in:
@@ -162,6 +162,11 @@ frappe.query_reports["Accounts Payable"] = {
|
|||||||
label: __("Group by Voucher"),
|
label: __("Group by Voucher"),
|
||||||
fieldtype: "Check",
|
fieldtype: "Check",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldname: "handle_employee_advances",
|
||||||
|
label: __("Handle Employee Advances"),
|
||||||
|
fieldtype: "Check",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
formatter: function (value, row, column, data, default_formatter) {
|
formatter: function (value, row, column, data, default_formatter) {
|
||||||
|
|||||||
@@ -214,7 +214,11 @@ class ReceivablePayableReport:
|
|||||||
|
|
||||||
# Build and use a separate row for Employee Advances.
|
# Build and use a separate row for Employee Advances.
|
||||||
# This allows Payments or Journals made against Emp Advance to be processed.
|
# 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 = self.build_voucher_dict(ple)
|
||||||
_d.voucher_type = ple.against_voucher_type
|
_d.voucher_type = ple.against_voucher_type
|
||||||
_d.voucher_no = ple.against_voucher_no
|
_d.voucher_no = ple.against_voucher_no
|
||||||
|
|||||||
Reference in New Issue
Block a user