* FIX phpstan: Societe::$client (int<0,3>) does not accept -1 (#39244)
Societe::$client is annotated @var int<0,3> (domain 0=no customer,
1=customer, 2=prospect, 3=both) in societe.class.php, but the create
form in societe/card.php pre-set it to -1 as a transient "nothing
pre-selected" placeholder, tripping PHPStan level 10 on develop.
The value is never persisted (save paths compute 0..3) and the only
reader, the switch() building the form, treats -1 and 0 identically via
its default case. Use 0 (the property's own default) so the assignment
matches the declared type. No behavior change.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Qual: Fix entity handling in bonprelevement.class.php
The variable name 'entities' was changed to 'entity' to better reflect the singular nature of the value being retrieved.
It was also casted to an int instead of using an unquoted db->escape.
* Qual: Improve SQL query construction in company.lib.php
By escaping the concatenated string, injection verification does not identify a false positive.
* Qual: Avoid void positive, sanitize instead of escape
* Qual: Avoid false positive, sanitize instead of escape
* Sec: Fix potential injection with cast to int (timespent_duration)
* Qual: Avoid false positive, sanitize instead of escape
* Qual: Avoid false positive, sanitize instead of escape
* fix: Replace escape() with sanitize() in SQL queries
# FIX: Replace escape() with sanitize() in SQL queries
- Replace escape() with sanitize() in SQL queries to ensure proper SQL injection protection
- Update SQL queries in multiple files to use sanitize() instead of escape()
- Ensure consistent use of sanitize() across the codebase for better security
* fix(sql): Replace escape with sanitize in SQL queries
# FIX: Replace escape with sanitize in SQL queries
- Replace `escape` with `sanitize` in SQL queries to ensure proper SQL injection prevention
* Qual: Improve field escaping/quoting
# Qual: Qual: Improve field escaping/quoting
---------
Co-authored-by: Jam Balaya <jambalaya.pyoncafe@outlook.jp>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Update stocktransfer_card.php
* migration: limiter les triggers stocktransfer au script 23->24
* agenda: ajouter les libellés InDolibarr pour stocktransfer
* stocktransfer pdf: éviter method_exists sur ligne nulle
* migration 23-24: ajouter le point-virgule manquant avant triggers
* notification: ajouter le support stocktransfer et event MODIFY
* langs: ajouter traductions Notify_STOCKTRANSFER_*
* langs: ajouter la clé Stocktransfer dans stocks.lang
* feat(stocktransfer): add quick add entry for stock transfers
* fix(quickadd): add stock transfer entry directly in main menu list
* projet: ajouter stocktransfer avant stock_mouvement
* projet: retirer le filtre global sur stocktransfer
* projet: renommer le titre stocktransfer et ajouter traductions
* projet: masquer montant sur la section stocktransfer
* projet: aligner la marge de stocktransfer sur commentaire
* projet: afficher NA pour les montants des stocktransfer
* projet: ajouter tooltip NA pour stocktransfer
* projet: ajouter message dédié NoAmountforStockTransfer
* projet: ajouter colonnes logistiques aux transferts de stock
* projet: retirer colonne date des transferts et aligner totaux
* projet: ajouter stocktransfer au badge de la vue d'ensemble
* projet: uniformiser les largeurs de colonnes stocktransfer
* stocktransfer: use email template type for presend form
* admin: add stock transfer email template type in setup list
* admin: show stock transfer mail template type when module enabled
* admin: move stock transfer mail type below products with box icon
* stocktransfer: align admin icon markup and presend attachment path
* langs: use stocktransfer-prefixed agenda trigger labels
* Update agenda.lang
* Update admin.lang
* Update other.lang
* Update stocks.lang
* Update admin.lang
* Update other.lang
* Update stocks.lang
* Update admin.lang
* Update agenda.lang
* Update stocks.lang
* Update admin.lang
* Update agenda.lang
* Update agenda.lang
* Update other.lang
* Update stocks.lang
* Update other.lang
* Update stocks.lang
* Update notify.class.php
* Remove destocking and stock increment triggers
Removed stock transfer action triggers for destocking and stock increment cancellation.
* Update 23.0.0-24.0.0.sql
* Update agenda.lang
* Update other.lang
* Update stocktransfer_card.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW: adding tms and datec to email templates
* Escaping a timestamp string I just generated myself
* switching single and double quotes in escape line for tms and datec to make the build system happy?
* Add an id to the table
* showing better names than tms and datec
* Changing code to label to fix#29116
* using hregis advice to use idate not escape the string with date
* requested changes
* forgot to add my name to editors
* had to make class changes for API to work
* setting datec back to int|string
* removing unused code lines and using idate in the api file
* no tms in create or update, but select. No datec in update
* expanding hurl tests to prevent post with id or tms, put with id or datec
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
* NEW API for getting, adding, deleting and/or modifying email templates
* removing duplicate class formmail which has been moved to a separate file
* hurl file for testing the emailtemplates api
* more comprehensive tests of posting a new email template, all required fields and making sure that ID is rejected
* first GUI test of email templates
---------
Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* `fix(delivery): correct inconsistencies in email triggers and templates`
**Body:**
- Adjusted email trigger names from `RECEPTION_*` to `SHIPPING_*`.
- Updated parameters and placeholders for shipment email tracking.
- Removed redundant `reception_send` entry in mail templates for shipping.
* `fix(delivery): update email triggers and templates for deliveries`
**Body:**
- Replaced email trigger `SHIPPING_SENTBYMAIL` with `DELIVERY_SENTBYMAIL`.
- Updated template references from `shipping_*` to `delivery_*` for consistency.
- Modified tracking ID format from `shi` to `del` in `card.php`.
- Added `MailToSendDelivery` language entry for email labels.
- Adjusted mail templates to include `delivery_send` entries.