Skip to content

Commit ae7fb95

Browse files
committed
feat: add mode of payment filter to Payments and Cash Control Report
1 parent 8cbe53d commit ae7fb95

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

pos_next/pos_next/report/payments_and_cash_control_report/payments_and_cash_control_report.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ frappe.query_reports["Payments and Cash Control Report"] = {
3434
"label": __("Cashier"),
3535
"fieldtype": "Link",
3636
"options": "User"
37+
},
38+
{
39+
"fieldname": "mode_of_payment",
40+
"label": __("Mode of Payment"),
41+
"fieldtype": "Link",
42+
"options": "Mode of Payment"
3743
}
3844
]
3945
};

pos_next/pos_next/report/payments_and_cash_control_report/payments_and_cash_control_report.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ def get_conditions(filters):
294294
if filters.get("shift"):
295295
conditions.append("pcs.name = %(shift)s")
296296

297+
if filters.get("mode_of_payment"):
298+
conditions.append("pr.mode_of_payment = %(mode_of_payment)s")
299+
297300
return " AND " + " AND ".join(conditions) if conditions else ""
298301

299302

0 commit comments

Comments
 (0)