From bb3589e63e1101028124ea81ab34a94229f8d0ff Mon Sep 17 00:00:00 2001 From: Christian Humpel <78662388+Humml87@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:25:00 +0100 Subject: [PATCH 1/4] Fix #31670 (#31671) Invalid Type --- htdocs/product/class/api_products.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 848edad49bd..351ce3256fb 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -806,7 +806,7 @@ class Products extends DolibarrApi * @param int $availability Product availability * @param string $ref_fourn Supplier ref * @param float $tva_tx New VAT Rate (For example 8.5. Should not be a string) - * @param string|float $charges costs affering to product + * @param float $charges costs affering to product * @param float $remise_percent Discount regarding qty (percent) * @param float $remise Discount regarding qty (amount) * @param int $newnpr Set NPR or not From f1581e9eed201734dd179595d9df259ab3814574 Mon Sep 17 00:00:00 2001 From: Jarod1980 <72363506+Jarod1980@users.noreply.github.com> Date: Mon, 4 Nov 2024 06:33:48 -0500 Subject: [PATCH 2/4] Update commonobject.class.php (#31667) change sourcetype and targettype to use $this->getElementType() instead of $this->element --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 2e5009addd8..099a74e947a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4249,8 +4249,8 @@ abstract class CommonObject $sourceid = (!empty($sourceid) ? $sourceid : $this->id); $targetid = (!empty($targetid) ? $targetid : $this->id); - $sourcetype = (!empty($sourcetype) ? $sourcetype : $this->element); - $targettype = (!empty($targettype) ? $targettype : $this->element); + $sourcetype = (!empty($sourcetype) ? $sourcetype : $this->getElementType()); + $targettype = (!empty($targettype) ? $targettype : $this->getElementType()); /*if (empty($sourceid) && empty($targetid)) { From c580e5fb5e709c013a53d626caa543feae01ae82 Mon Sep 17 00:00:00 2001 From: iLLixM <162678117+iLLixM@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:34:21 +0100 Subject: [PATCH 3/4] FIX #30432 make thirdparty code_client and code_compta modifiable via API (#31668) * make thirdparty code_client and code_compta modifiable via API make code_client and code_compta modifiable via API call ( put /thirdparties/{id} ) for existing third parties * fix: thirdparty code_client and code_compta modifiable via API (#30432) make code_client and code_compta modifiable via API call ( put /thirdparties/{id} ) for existing third parties --- htdocs/societe/class/api_thirdparties.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 15614c538a2..f7d70a6d473 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -321,7 +321,7 @@ class Thirdparties extends DolibarrApi $this->company->setNoEmail($this->company->no_email); } - if ($this->company->update($id, DolibarrApiAccess::$user, 1, '', '', 'update', 1) > 0) { + if ($this->company->update($id, DolibarrApiAccess::$user, 1, 1, 1, 'update', 1) > 0) { return $this->get($id); } else { throw new RestException(500, $this->company->error); From 578d2fe83f520f36b65ec91f17296069d14c26e1 Mon Sep 17 00:00:00 2001 From: Christian Humpel <78662388+Humml87@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:34:44 +0100 Subject: [PATCH 4/4] Fix #31677 (#31678) --- htdocs/bom/class/api_boms.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index 8c6895ff9ae..c907b12f54f 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -376,7 +376,9 @@ class Boms extends DolibarrApi $request_data->position, $request_data->fk_bom_child, $request_data->import_key, - $request_data->fk_unit + $request_data->fk_unit, + $request_data->array_options, + $request_data->fk_default_workstation ); if ($updateRes > 0) { @@ -425,7 +427,9 @@ class Boms extends DolibarrApi $request_data->efficiency, $request_data->position, $request_data->import_key, - $request_data->fk_unit + $request_data->fk_unit, + $request_data->array_options, + $request_data->fk_default_workstation ); if ($updateRes > 0) {