From 793bfde2a6c9ebee0c2228720c08dc853cba0213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Fali=C3=A8re?= <121813548+BenjaminFlr@users.noreply.github.com> Date: Fri, 13 Feb 2026 15:10:58 +0100 Subject: [PATCH 1/2] FIX phpdoc on createFixedAmountDiscount() (#37212) * FIX phpdoc on createFixedAmountDiscount * FIX phpdoc --------- Co-authored-by: Laurent Destailleur --- htdocs/societe/class/api_thirdparties.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 6b10759eb53..9ce4ccb76c5 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1173,13 +1173,15 @@ class Thirdparties extends DolibarrApi /** * Create a fixed amount discount for a thirdparty * + * @since 24.0.0 Initial implementation + * * @param int $id ID of thirdparty * @param array $request_data Request data - * - amount float Amount including tax (required if price_base_type is TTC) - * - description string Description of the discount (required) - * - tva_tx float VAT rate in percentage (required) - * - discount_type int Type of discount: 0 = customer discount, 1 = supplier discount (default: 0) - * - price_base_type string Price base type: 'HT' or 'TTC' (default: 'HT') + * - amount float Amount including tax (required if price_base_type is TTC) + * - description string Description of the discount (required) + * - tva_tx float VAT rate in percentage + * - discount_type int Type of discount: 0 = customer discount, 1 = supplier discount (default: 0) + * - price_base_type string Price base type: 'HT' or 'TTC' (default: 'HT') * @phan-param ?array $request_data * @phpstan-param ?array $request_data * From b313d7c0fdf5d72f9bfc08b44e24ee76aa165ade Mon Sep 17 00:00:00 2001 From: John BOTELLA <68917336+thersane-john@users.noreply.github.com> Date: Sat, 14 Feb 2026 14:51:33 +0100 Subject: [PATCH 2/2] Fix in card css modal display (#36569) * Fix display of cards in a modal * fix php stan * fix php stan * Try a change to force CI --------- Co-authored-by: Laurent Destailleur --- htdocs/public/webportal/css/card.css | 5 ++ htdocs/public/webportal/css/dialog.css | 51 +++++++++++++++++++ .../webportal/tpl/card-edit-footer.tpl.php | 3 +- htdocs/public/webportal/tpl/card-edit.tpl.php | 6 +-- .../tpl/card-view-actions-buttons.tpl.php | 26 ++++------ .../webportal/tpl/card-view-footer.tpl.php | 3 +- .../tpl/card-view-properties.tpl.php | 2 +- htdocs/public/webportal/tpl/card-view.tpl.php | 8 ++- 8 files changed, 76 insertions(+), 28 deletions(-) diff --git a/htdocs/public/webportal/css/card.css b/htdocs/public/webportal/css/card.css index 9bce48fbe03..c8e6470c391 100644 --- a/htdocs/public/webportal/css/card.css +++ b/htdocs/public/webportal/css/card.css @@ -59,3 +59,8 @@ grid-row: 2; } } + +:is(.object-card-view__footer, .object-card-edit__footer):empty, +:is(.object-card-view__footer, .object-card-edit__footer):has(#actions_buttons:empty){ + display: none; +} diff --git a/htdocs/public/webportal/css/dialog.css b/htdocs/public/webportal/css/dialog.css index 6c67fb50006..6cafb44a2c4 100644 --- a/htdocs/public/webportal/css/dialog.css +++ b/htdocs/public/webportal/css/dialog.css @@ -107,3 +107,54 @@ dialog article .dialog-header-btn.close { margin-top: 0; margin-bottom: 0; } + +body.--is-modal { + background: var(--colorbackbody); +} + +body.--is-modal .modal-hidden, +body:not(.--is-modal) .modal-displayed { + display: none; +} + + +body.--is-modal .card-view-container, +body.--is-modal main.container { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} + +body.--is-modal article.card-view-container { + box-shadow: none; +} + +body.--is-modal article.card-view-container > header { + margin-top: 0; +} +body.--is-modal article.card-view-container > footer { + margin-bottom: 0; + margin-bottom: 0; +} + +@media (min-width: 576px) { + body.--is-modal .container { + max-width: 100%; + } +} +@media (min-width: 768px) { + body.--is-modal .container { + max-width: 100%; + } +} +@media (min-width: 992px) { + body.--is-modal .container { + max-width: 100%; + } +} +@media (min-width: 1200px) { + body.--is-modal .container { + max-width: 100%; + } +} diff --git a/htdocs/public/webportal/tpl/card-edit-footer.tpl.php b/htdocs/public/webportal/tpl/card-edit-footer.tpl.php index e603787c00f..b8d6b092afe 100644 --- a/htdocs/public/webportal/tpl/card-edit-footer.tpl.php +++ b/htdocs/public/webportal/tpl/card-edit-footer.tpl.php @@ -22,5 +22,4 @@ $formCard = $this->formCard; ?> -
-
+
loadTemplate('card-edit-actions-buttons') ?>
diff --git a/htdocs/public/webportal/tpl/card-edit.tpl.php b/htdocs/public/webportal/tpl/card-edit.tpl.php index b2d848c16e7..d68b76bff9b 100644 --- a/htdocs/public/webportal/tpl/card-edit.tpl.php +++ b/htdocs/public/webportal/tpl/card-edit.tpl.php @@ -38,9 +38,9 @@ $formCard = $this->formCard; loadTemplate('card-edit-properties') ?> loadTemplate('card-edit-lines') ?> + + + loadTemplate('card-edit-footer') ?> - loadTemplate('card-edit-actions-buttons') ?> - - loadTemplate('card-edit-footer') ?> diff --git a/htdocs/public/webportal/tpl/card-view-actions-buttons.tpl.php b/htdocs/public/webportal/tpl/card-view-actions-buttons.tpl.php index 1c9e6ea6546..af6f1477219 100644 --- a/htdocs/public/webportal/tpl/card-view-actions-buttons.tpl.php +++ b/htdocs/public/webportal/tpl/card-view-actions-buttons.tpl.php @@ -22,21 +22,17 @@ $formCard = $this->formCard; $url = $context->getControllerUrl($context->controller). '&id=' . $formCard->object->id; -?> - -action != 'presend' && $formCard->action != 'editline') { ?> -
- action != 'presend' && $formCard->action != 'editline') { ?> +
executeHooks('addMoreActionsButtons', $parameters, $context); - if ($reshook < 0) { - $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } elseif (empty($reshook)) { - // Edit card - if ($formCard->permissiontoadd) { ?> +if ($reshook < 0) { + $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} elseif (empty($reshook)) { + // Edit card + if ($formCard->permissiontoadd) { ?> " role="button">trans('Modify') ?> - -
- +
+formCard; ?> -
-
+
loadTemplate('card-view-actions-buttons') ?>
diff --git a/htdocs/public/webportal/tpl/card-view-properties.tpl.php b/htdocs/public/webportal/tpl/card-view-properties.tpl.php index c77592ea6b1..118b132c9f9 100644 --- a/htdocs/public/webportal/tpl/card-view-properties.tpl.php +++ b/htdocs/public/webportal/tpl/card-view-properties.tpl.php @@ -24,7 +24,7 @@ $fieldShowList = $formCard->fieldsmanager->getAllFieldsInfos($formCard->object, ?> -
+
$fields) { diff --git a/htdocs/public/webportal/tpl/card-view.tpl.php b/htdocs/public/webportal/tpl/card-view.tpl.php index bea429cdae7..bbdf3fd9699 100644 --- a/htdocs/public/webportal/tpl/card-view.tpl.php +++ b/htdocs/public/webportal/tpl/card-view.tpl.php @@ -36,14 +36,12 @@ print $formconfirm; ?> -
+
loadTemplate('card-view-header') ?> loadTemplate('card-view-properties') ?> loadTemplate('card-view-lines') ?> + + loadTemplate('card-view-footer') ?>
- -loadTemplate('card-view-actions-buttons') ?> - -loadTemplate('card-view-footer') ?>