Files
opensourcepos/app/Models
jekkos 4173d7f350 fix: Allow searching by Sale ID in Takings/Daily Sales view (#4569)
When searching in the Takings view, entering a plain Sale ID (like '123')
did not return any results. The search only worked with customer names
or with the 'POS 123' format.

The issue was that is_valid_receipt() only recognized 'POS ####' format
or invoice numbers, so plain numeric Sale IDs fell through to the
customer name search branch which doesn't search sale_id.

This fix adds sale_id to the search conditions when the search term is
numeric (ctype_digit check), allowing direct Sale ID searches.

Fixes #4567

Co-authored-by: Ollama <ollama@steganos.dev>
2026-06-04 10:09:35 +02:00
..
2024-06-15 17:19:15 +02:00
2025-03-28 21:24:21 +04:00