Commit graph

1047 commits

Author SHA1 Message Date
Frédéric FRANCE
2232e8f26e
NEW: Migrate BOM extrafields admin pages to the unified page 2026-08-11 17:27:03 +02:00
MDW
f551727df9
Qual/Sec: Use db->sanitize instead of db->escape when not quoted, fix some quoting (#39286)
* 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>
2026-07-27 13:00:33 +02:00
MDW
1dcd497c69
Qual: Fix 'SqlInjection' notices (#39219)
# Qual: Fix 'SqlInjection' notices

Batch of 25 files with changes to fix 'SqlInjection' Notices
2026-07-20 02:50:44 +02:00
Laurent Destailleur
ad4ceba536 Automated merge from 23.0 to develop 2026-07-15 02:06:09 +02:00
Francis Appels
0a3ba8e740
Revert "NEW: Show bom net needs treeview by line position. (#37459)" (#39083)
* Revert "NEW: Show bom net needs treeview by line position. (#37459)"

This reverts commit b02f1a4ebf.

* Update changelog and fix stan

* fix stan
2026-07-10 17:44:53 +02:00
Vincent Maury
edc1d1497c
Add API validate method to boms and mos (#39085)
* Add Validate method to MO API

* add validate method to BOM API

* del trailing spaces
2026-07-10 17:37:11 +02:00
Laurent Destailleur
0c50fd0223 Fix dir 2026-07-01 12:24:59 +02:00
Laurent Destailleur
f8f50679a9 CSS 2026-06-16 14:56:13 +02:00
Frédéric FRANCE
855a00ae09
clean code (#38472)
* clean code

* clean code

* clean code

* clean code

* fix

* clean code

* clean code

* clean code

* clean code

* clean code
2026-06-10 19:31:35 +02:00
Laurent Destailleur
bf432da483 Doc example 2026-05-29 12:16:42 +02:00
Frédéric FRANCE
80184f0bd3
fix phpstan (#38038)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* clean

* clean code

* clean code

* clean code

* Update bom_agenda.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-11 01:19:35 +02:00
Laurent Destailleur
85384fb523 Fix sanitize fields in API put and post for extrafields 2026-05-09 01:16:35 +02:00
Frédéric FRANCE
bd6dba76ba
clean code (#38081)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-07 14:13:08 +02:00
MDW
8e2868c291
Qual: Fix PHPStan (array definition) (#38071)
* Qual: Fix PHPStan (array definition)

# Qual: Fix PHPStan (array definition)

More complete array definition for $TNetNeeds argument

* Qual: Update PHPStan baseline

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-05-04 17:36:05 +02:00
Laurent Destailleur
b0dca0eb46 Clean code 2026-05-04 09:54:31 +02:00
Laurent Destailleur
b116273033 Clean code 2026-04-23 17:41:15 +02:00
MDW
6514e89128
Qual: Update fields array type (#37931)
* 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>
2026-04-19 16:10:54 +02:00
Laurent Destailleur
0dba55e1e0 CI 2026-04-11 17:43:22 +02:00
Francis Appels
b02f1a4ebf
NEW: Show bom net needs treeview by line position. (#37459)
* New show bom net needs treeview by line position.

* bom_net_needs fix level is also position.

* bom_net_needs position need numeric sort.

* Fix sorting string

* Fix warning

* fix stan/phan

* Fix stan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-03-12 14:38:31 +01:00
Laurent Destailleur
39d39f475d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-01-23 17:46:38 +01:00
boudet jean pascal
f9c8164e57
FIX: [BOM] Reset date_creation when cloning a BOM" -m "The creation date of the source object was preserved. This fix ensures the new object gets the current timestamp. (#36898)
Co-authored-by: jpb <jean-pascal.boudet@atm-consulting>
2026-01-19 14:38:13 +01:00
Laurent Destailleur
578a1ef568 Clean files 2026-01-07 19:01:54 +01:00
Francis Appels
21f4769c6c Fix missing line number when bom card in sub bom mode (#36805) 2026-01-05 17:43:22 +01:00
Laurent Destailleur
ba816b847d Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 23.0
Debug v23
2026-01-05 14:36:23 +01:00
Zakaria Boushaba
ecb14aecf2
Fix text overflow in linked object table lists (v22) (#36776)
Co-authored-by: Zakaria Boushaba <z.boushaba@vold.africa>
2026-01-05 11:31:55 +01:00
Laurent Destailleur
b61ff7d17a Devug v23 2025-11-24 16:29:21 +01:00
Laurent Destailleur
0c8581f80d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-11-24 16:23:07 +01:00
Regis Houssin
0aa6652005
FIX #35141 (#36390)
* FIX #35141

* FIX avoid problem with chinese language
2025-11-24 16:03:38 +01:00
Laurent Destailleur
3a40fe5d79 Fix CI 2025-11-23 01:36:54 +01:00
Frédéric FRANCE
46d6714fe0
clean code (#36317)
* clean code

* clean code

* clean doc

* clean doc

* clean doc

* clean doc

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-20 01:47:46 +01:00
Frédéric FRANCE
d07e8c03a0
avoid changing object after call (#36159)
* avoid changing object after call

* avoid changing object after call

* avoid changing object after call

* avoid changing object after call

* avoid changing object after call

* avoid changing object after call

* avoid changing object after call

* clean code

* clean code

* clean code

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* clean code

* clean

* clean

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-12 09:44:39 +01:00
MDW
c39e87d703
Qual: Make $fields covariant, define type for $FIELDS in BankAccounts api (#36188)
* Qual: Make $fields covariant

* Qual: Update BankAccounts class phpDoc ($FIELDS)

# Qual: Update BankAccounts class phpDoc ($FIELDS)

Updated the documentation for the $FIELDS property.
2025-11-09 18:06:58 +01:00
Frédéric FRANCE
9491d880cf
clean code (#36170)
* clean code

* Update bom.class.php

* Update commondocgenerator.class.php

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-09 01:19:31 +01:00
Laurent Destailleur
dfbf173b17 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-07 19:25:42 +01:00
Regis Houssin
fa10fc0f94
FIX avoid NULL value (#36126) 2025-11-06 13:15:03 +01:00
MDW
b925dd6c37
Qual: Make $fields type covariant (phpstan) (#36084)
# Qual: Make $fields type covariant (phpstan)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-04 14:16:17 +01:00
Frédéric FRANCE
03ea0cda01
clean code class commondict (#35952)
* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* add fetchAll in abstract class commondict

* clean code
2025-10-28 01:25:30 +01:00
Frédéric FRANCE
29b3880e6c
add dolBuildUrl (#35664)
* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

* clean baseline

* add dolBuildUrl

* add dolBuildUrl

* add dolBuildUrl

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-17 02:31:07 +02:00
Laurent Destailleur
793f48dbff Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-10-16 19:42:43 +02:00
atm-corentin
a4822e466a
remove redundant price2num calls in cost calculations to simplify code (#35743)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-15 00:46:57 +02:00
Frédéric FRANCE
3c597c263d
clean code (#35710)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* fix

* clean code
2025-10-14 19:58:04 +02:00
ldestailleur
ef22546aa6 NEW Can drag and drop in BOM card 2025-10-05 20:12:52 +02:00
Frédéric FRANCE
6afec608a3
fix CI (#35631)
* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-10-04 13:29:57 +02:00
Frédéric FRANCE
a90c222f73
clean code (#35626)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
2025-10-04 00:07:24 +02:00
Laurent Destailleur
131d1390bc Debug v23 2025-09-28 22:20:44 +02:00
ldestailleur
e45fe1f988 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-27 15:57:27 +02:00
Frédéric FRANCE
95e2a7690c
clean phpstan baseline for branch 22 (#35511)
* clean phpstan baseline

* upgrade phpstan version

* fix phan

* fix phan

* fix phan

* fix phan

* fix phan
2025-09-27 03:58:59 +02:00
VIAL-GOUTEYRON Quentin
049cbbfb4d
Fix MRP: Add hook calculateCostsBomAfter to alter BOM costs (#35465)
* fix doc (#35416)

* fix doc

* Update commonobject.class.php

* Update mo.class.php

* FIX missing entity filter (#35461)

* Add post-processing hook `calculateCostsBomAfter` in BOM cost calculations

---------

Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: Regis Houssin <regis.houssin@inodbox.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-25 11:48:19 +02:00
ldestailleur
ad830a346e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-09-23 16:50:17 +02:00
ldestailleur
6ead2839d0 Fix missing several test on permission on actions 2025-09-23 16:41:53 +02:00