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) <noreply@anthropic.com>
This commit is contained in:
Mihir Kandoi
2026-06-18 21:34:37 +05:30
parent 4708ac4e3d
commit fa378e2d7a

View File

@@ -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"}