Commit Graph

3148 Commits

Author SHA1 Message Date
ldestailleur
f65903d006 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-09-26 01:23:02 +02:00
Frédéric FRANCE
1d56ed09f4 fix doc (#35416)
* fix doc

* Update commonobject.class.php

* Update mo.class.php
2025-09-21 12:12:37 +02:00
ldestailleur
f82283a22e Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-09-04 17:32:04 +02:00
ldestailleur
5832cfc198 Fix CI 2025-09-04 15:36:54 +02:00
ldestailleur
d0a4541b28 Fix CI 2025-09-04 15:00:47 +02:00
ldestailleur
dd0679db44 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2025-08-21 11:09:10 +02:00
ldestailleur
7878d81e33 FIX #34986 2025-08-21 11:02:48 +02:00
Laurent Destailleur
d4469f34e0 Fix error message 2025-08-11 00:26:19 +02:00
ldestailleur
a23e79f081 Fix warning 2025-08-09 14:12:23 +02:00
ldestailleur
86f5db7aa9 Fix better comaptibilty for extrafield email/mail 2025-08-05 00:45:00 +02:00
ldestailleur
ce6fc756fa Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-07-29 11:27:58 +02:00
ldestailleur
ae8e509c9f Fix CI 2025-07-28 18:59:12 +02:00
ldestailleur
0fa59d0e9c Fix CI and warning message 2025-07-28 16:17:03 +02:00
ldestailleur
c75663b2de Fix CI 2025-07-28 15:40:54 +02:00
ldestailleur
67494f497f Fix warning 2025-07-10 15:16:53 +02:00
Laurent Destailleur
6b68f5aad0 Fix CI 2025-07-05 11:33:46 +02:00
ldestailleur
358daa3ca0 Clean doc and code 2025-06-27 13:39:50 +02:00
ldestailleur
497d774a21 Fix the selectForFormsList was not using correctly the
ismultientitymanaged. Replace a join with and exists.
2025-06-27 00:21:50 +02:00
Alexandre Janniaux
efd95ad107 Qual commonobject: line_max: factor conditonals together (#34600)
* commonobject: line_max: factor conditonals together

The SQL request is shared, except for the additional filter.

* Update commonobject.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-23 18:28:13 +02:00
ldestailleur
cf8beb8505 Fix error return 2025-06-21 14:39:53 +02:00
Alexandre Janniaux
1a3430f40a commonobject: updateLineDown: use early return on query failure (#34598)
Simplify the code by early returning on query failure, which removes
almost every indentation level of the function.

It also highlights some important flaws here, since there is a return
without value (void return type) between the two queries if an error
happened, which would indicate the first query failed and nothing was
registered, but also an error check leading to printing an error message
if the second query fails, without actually reverting the first one, and
since there is no error code, there's no way to trigger a db->rollback()
from the caller code for this reason.
2025-06-21 14:36:07 +02:00
Alexandre Janniaux
1113ae6dc1 Qual: Commonobject reverse happy path (#34599)
* commonobject: getRangOfLine: reverse happy and error path

* commonobject: getIdOfLine: reverse error and happy path
2025-06-21 14:35:01 +02:00
ldestailleur
9c2da8b9b6 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-06-19 11:31:44 +02:00
ldestailleur
a78e63dbf0 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-06-19 11:13:59 +02:00
ldestailleur
ec098b2632 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-06-19 10:59:07 +02:00
ldestailleur
0da1e6b464 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-06-19 10:48:18 +02:00
ldestailleur
247847cd14 Fix warnings 2025-06-19 10:39:19 +02:00
Alexandre Janniaux
0770e79749 commonobject: updateLineUp: use early return on query failure (#34570)
Simplify the code by early returning on query failure, which removes
almost every indentation level of the function.

It also highlights some important flaws here, since there is a return
without value (void return type) between the two queries if an error
happened, which would indicate the first query failed and nothing was
registered, but also an error check leading to printing an error message
if the second query fails, without actually reverting the first one, and
since there is no error code, there's no way to trigger a db->rollback()
from the caller code for this reason.
2025-06-19 10:12:55 +02:00
Alexandre Janniaux
1da9aab8d4 commonobject: updateRangOfLine: de-indent happy path (#34569)
There's no need for the else{} block when the if block early returns,
and it helps highlighting the happy path. Note that this kind of change
only make sense when one of the block is an error, not a choice between
two possibilities.
2025-06-19 10:11:12 +02:00
Alexandre Janniaux
f04a390cb5 commonobject: getChildrenOfLine: early return on query error (#34547)
This makes the code more readable by deindenting two whole levels on the
happy path.
2025-06-18 14:19:37 +02:00
Marc de Lima Lucio
467c772504 FIX: common fields: php warning with select input field (#34495) 2025-06-14 11:58:25 +02:00
Laurent Destailleur
b1812b1080 Debug v22 2025-06-10 02:24:08 +02:00
Laurent Destailleur
221c27c091 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-06-09 18:15:59 +02:00
Laurent Destailleur
326c75dc51 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-06-09 17:58:54 +02:00
kkhelifa-opendsi
115a430652 FIX: Fix delete ecm file into database when delete a contract (#34310) 2025-06-04 14:31:23 +02:00
Günter Lukas
eaf0ec2e30 Fix #34346 - SQL Error (#34347)
* Fix #34346 - SQL Error

* Update commonobject.class.php
2025-06-03 17:05:10 +02:00
Laurent Destailleur
c35965030c Debug v22 2025-05-28 01:16:02 +02:00
Laurent Destailleur
1b3b123472 Debug v22 2025-05-28 00:09:02 +02:00
Quentin-Seekness
024f266089 Allow insertion of value equals to 0 with int type (#34294)
The issue is that right now we can't insert a value of 0 as an int extrafields (unless the filed is mandatory, wich is not always the case)
2025-05-27 18:55:28 +02:00
Laurent Destailleur
393537d1e4 FIX portal module, prepare to replace duplication of code 2025-05-27 18:47:19 +02:00
ldestailleur
62e305f7fa Debug the asset module. Can't delete. 2025-05-10 21:03:27 +02:00
ldestailleur
f0eaae6a1d Debug v22 2025-05-05 17:09:24 +02:00
ldestailleur
e4e5b1e597 Clean code 2025-05-05 02:22:02 +02:00
Florian Mortgat
9d0d8f7ec5 Fix/140/t250062/extrafields multicompany data loss (#34022)
* insertExtrafields(): simplify by returning 0 early if array_options is empty

* insertExtrafields(): simplify by using local variables $newValue and $attributeType

* insertExtrafields(): refactor by grouping the empty value cases for geodatabase-type extrafields

* insertExtrafields(): refactor by using a static mapping of geodata types to their ST_* db function on ExtraField class

* FIX: when an object that is shared across multiple entities already has some extrafields from another entity that are not reachable from the current entity, their values are lost

* Compliance with
- phan ( Closure Closure($key) has no declared or inferred parameter type for $key)
- php-stan (Error: Property ExtraFields::$geoDataTypes has no type specified)
2025-05-04 18:42:01 +02:00
ldestailleur
2aa17f9c3f Fix update of foregin rate on recurring invoices 2025-04-25 03:39:04 +02:00
ThomasNgr-OpenDSI
a56a8e05f0 FIX : set default extrafield value for supplier order (#33971)
* fill extrafields default values in case THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_SUPPLIER_ORDER applies

* Fix: send param changecompany when changing company on a supplier order creation
2025-04-24 19:19:39 +02:00
ThomasNgr-OpenDSI
730667ed5a NEW : force Extrafields values when constants THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_(ORDER|INVOICE) are set (#33954)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-04-24 15:46:56 +02:00
Laurent Destailleur
e034b4b0ef Standardize code 2025-04-24 00:51:47 +02:00
ldestailleur
4d80dc9d69 Debug v22 2025-04-12 16:18:40 +02:00
ldestailleur
6da74b90ce Debug v22 2025-04-10 21:25:45 +02:00