Replaced all instances of `$this->db->escape($filtermode)` with `$this->db->sanitize($filtermode)` in SQL query construction across multiple classes to ensure proper SQL sanitization and prevent potential SQL injection vulnerabilities.
* Qual: Fix 'SqlInjection' notices
# Qual: Fix 'SqlInjection' notices
Batch of 25 files with changes to fix 'SqlInjection' Notices
* Qual: Enhance SQL injection prevention in CodingPhpTest.php
Improved the SQL injection prevention mechanism in the CodingPhpTest.php file by adding a check for integer and float casts in the IN clause of SQL queries to avoid false positives.
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* FIX: propagate fk_warehouse from BOM line in processBOM()
When creating MO lines from a BOM, the fk_warehouse defined on each
BOM line was not copied to the corresponding MO line. This caused
produceandconsumeall() to fail with a stock movement error when a
warehouse is set on BOM lines but not on the MO itself.
* FIX: propagate fk_warehouse from BOM line in processBOM()
When creating MO lines from a BOM, the fk_warehouse defined on each
BOM line was not copied to the corresponding MO line. This caused
produceandconsumeall() to fail with a stock movement error when a
warehouse is set on BOM lines but not on the MO itself.
* Update mo.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Qual: Update fields array type
Propagate the fields array type changes to other classes
* Adjust initialisations of $fields to avoid phpstan notices
* Qual: Fix invalid value for 'index' in $fields
* Fix: notnull in $fields can not be -1
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* FIX: Mo::deleteLine() - stock movement correction should not rely on linked lines
* FIX: do not permit product line to consume removal if product consumption started
* Qual: Make $fields covariant
* Qual: Update BankAccounts class phpDoc ($FIELDS)
# Qual: Update BankAccounts class phpDoc ($FIELDS)
Updated the documentation for the $FIELDS property.
# Qual: Fix misuse of Mo->error
Phan identified that ++ was performed on Mo->error which is a string.
This fixes that by using a local $error variable (as in another
function).
* FIX - MRP MO Product to Consume
Fixes MO Product to Consume when recursive BOM's are used, the product
to consume only includes the BOM line items instead of BOM product
* fix php-stan errors
* fix phan analysis errors
* fix phan analysis errors take 2
---------
Co-authored-by: brad <brad@endurotags.com.au>
* Qual: Update comments from French to English
# Qual: Update comments from French to English
* Qual: Fix missing initialisations
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>