diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-27 20:36:53 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-27 20:36:53 +0100 |
| commit | 58320a6ffc85c971182f66e374946c0a50fabb08 (patch) | |
| tree | 9e718eb72e18b157c5a3b7699d4101ea0364ee83 /includes | |
| parent | ff0e935d0e4ce3325d728077e489538f33685c86 (diff) | |
| download | stock-58320a6ffc85c971182f66e374946c0a50fabb08.tar.gz stock-58320a6ffc85c971182f66e374946c0a50fabb08.tar.bz2 stock-58320a6ffc85c971182f66e374946c0a50fabb08.zip | |
Add title search to movement list filter bar
StockMovement::getList(): filter on UPPER(lc.title) LIKE when find is set.
list_movements.tpl: Find label + text input appended to the direction/status
dropdowns, single Go button submits all filters together.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/classes/StockMovement.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/classes/StockMovement.php b/includes/classes/StockMovement.php index 223f4d3..43dbe3f 100644 --- a/includes/classes/StockMovement.php +++ b/includes/classes/StockMovement.php @@ -419,6 +419,11 @@ class StockMovement extends StockBase { $bindVars[] = (int)$pListHash['user_id']; } + if( !empty( $pListHash['find'] ) ) { + $whereSql .= " AND UPPER(lc.`title`) LIKE ?"; + $bindVars[] = '%'.strtoupper( $pListHash['find'] ).'%'; + } + $this->getServicesSql( 'content_list_sql_function', $selectSql, $joinSql, $whereSql, $bindVars ); $orderby = !empty( $pListHash['sort_mode'] ) |
