From fa378e2d7aae43e8f850297bd94d4f9295b51883 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 18 Jun 2026 21:34:37 +0530 Subject: [PATCH] test(sales_payment_summary): exercise the POS customer filter Address review (#56113): add a customer filter to the is_pos test so the customer-subquery fix is covered (a.customer was unselected before and errored). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../sales_payment_summary/test_sales_payment_summary.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py index 92a38b28957..d2ee6f47939 100644 --- a/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py +++ b/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py @@ -125,6 +125,11 @@ class TestSalesPaymentSummary(ERPNextTestSuite): self.assertTrue(data) self.assertTrue(any(flt(row.get("paid_amount")) >= 10000 for row in data)) + # customer filter must work: a.customer was not selected by the invoice subquery before the fix, + # so the filter errored on both engines. With the invoice's customer it still returns its payment. + filters["customer"] = si.customer + self.assertTrue(any(flt(row.get("paid_amount")) >= 10000 for row in get_pos_invoice_data(filters))) + def get_filters(): return {"from_date": "1900-01-01", "to_date": today(), "company": "_Test Company"}