From 119716bd82e409595ae45e38ac7f540e23f55ed2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Mar 2025 23:56:14 +0100 Subject: [PATCH 01/13] Fix button "Create shipment" if no permission --- htdocs/commande/card.php | 43 +++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index db4c5609f22..c817a252603 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -3091,29 +3091,32 @@ if ($action == 'create' && $usercancreate) { }*/ $numshipping = 0; - if (isModEnabled('shipping')) { - $numshipping = $object->countNbOfShipments(); - } // Create shipment - if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES'))) { - if ((getDolGlobalInt('MAIN_SUBMODULE_EXPEDITION') && $user->hasRight('expedition', 'creer')) || (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && $user->hasRight('expedition', 'delivery', 'creer'))) { - $arrayforbutaction[] = array( - 'lang' => 'sendings', - 'enabled' => (isModEnabled("shipping") && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))), - 'perm' => $user->hasRight('expedition', 'creer'), - 'label' => 'CreateShipment', - 'url' => '/expedition/shipment.php?id=' . $object->id - ); - /* - if ($user->hasRight('expedition', 'creer')) { - print dolGetButtonAction('', $langs->trans('CreateShipment'), 'default', DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id, ''); + if (isModEnabled('shipping')) { + $numshipping = $object->countNbOfShipments(); + + if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES'))) { + if ((getDolGlobalInt('MAIN_SUBMODULE_EXPEDITION') && $user->hasRight('expedition', 'creer')) || (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && $user->hasRight('expedition', 'delivery', 'creer'))) { + // Add button to create shipment into the combo + $arrayforbutaction[] = array( + 'lang' => 'sendings', + 'enabled' => (isModEnabled("shipping") && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))), + 'perm' => $user->hasRight('expedition', 'creer'), + 'label' => 'CreateShipment', + 'url' => '/expedition/shipment.php?id=' . $object->id + ); } else { - print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false); - }*/ - } else { - $langs->load("errors"); - print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false); + //c$langs->load("errors"); + //print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false); + $arrayforbutaction[] = array( + 'lang' => 'sendings', + 'enabled' => (isModEnabled("shipping") && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))), + 'perm' => 0, + 'label' => 'CreateShipment', + 'url' => '/expedition/shipment.php?id=' . $object->id + ); + } } } From b389cbb59e7ad12c444c0bb5b61419a6969bbdfa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Mar 2025 00:27:40 +0100 Subject: [PATCH 02/13] Fix reponsive and NA that must not be visible --- htdocs/expedition/card.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 8c365e7bee5..c7fc531c605 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1180,6 +1180,7 @@ if ($action == 'create') { print '
'; + print '
'; print ''; // Load shipments already done for same order @@ -1849,6 +1850,7 @@ if ($action == 'create') { } print "
"; + print '
'; print '
'; @@ -2273,7 +2275,7 @@ if ($action == 'create') { print '
'; print '
'; - print ''; + print '
'; print ''; print ''; // Adds a line numbering column @@ -2297,15 +2299,15 @@ if ($action == 'create') { } print ''; } else { @@ -2554,7 +2556,11 @@ if ($action == 'create') { // Warehouse source print ''; // Batch number management - print ''; + print ''; print ''; } elseif (count($lines[$i]->details_entrepot) > 1) { print ''; @@ -2565,7 +2571,11 @@ if ($action == 'create') { // Warehouse source print ''; // Batch number management - print ''; + print ''; print ''; } } elseif ($lines[$i]->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { From e9928ef7e6f8450e03f63e79ac25baa90bde7cab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Mar 2025 00:32:51 +0100 Subject: [PATCH 03/13] Fix br --- htdocs/expedition/dispatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/dispatch.php b/htdocs/expedition/dispatch.php index 7fa4f672175..2d553c8dc51 100644 --- a/htdocs/expedition/dispatch.php +++ b/htdocs/expedition/dispatch.php @@ -527,7 +527,7 @@ if ($object->id > 0 || !empty($object->ref)) { print ''; print '
'; if ($object->status <= 1) { - print $langs->trans("QtyToShip").' - '; + print $langs->trans("QtyToShip"); } else { - print $langs->trans("QtyShipped").' - '; + print $langs->trans("QtyShipped"); } if (isModEnabled('stock')) { - print $langs->trans("WarehouseSource").' - '; + print ' - '.$langs->trans("WarehouseSource"); } if (isModEnabled('productbatch')) { - print $langs->trans("Batch"); + print ' - '.$langs->trans("Batch"); } print ''.$formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).' - '.$langs->trans("NA").''; + if (isModEnabled('productbatch')) { + print ' - '.$langs->trans("NA"); + } + print '
'.$formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl'.$detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).' - '.$langs->trans("NA").''; + if (isModEnabled('productbatch')) { + print ' - '.$langs->trans("NA"); + } + print '
'; - print '
'; + print '

'; if (isModEnabled('barcode') || isModEnabled('productbatch')) { print ''.img_picto('', 'barcode', 'class="paddingrightonly"').$langs->trans("UpdateByScaning").''; } From e863b1f01a923d01e99a9537f41cd0cb347717a0 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Mon, 17 Mar 2025 10:55:13 +0100 Subject: [PATCH 04/13] Add info to help debug several troubles --- htdocs/core/class/commonobject.class.php | 2 ++ htdocs/core/lib/functions.lib.php | 24 +++++++++++++++++++ ...terface_50_modAgenda_ActionsAuto.class.php | 3 ++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 2070fe85bf5..f506672c640 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6234,8 +6234,10 @@ abstract class CommonObject exit; } if (!is_object($langs)) { // If lang was not defined, we set it. It is required by run_triggers(). + dol_syslog("call_trigger was called with no langs variable defined".getCallerFunctionString(), LOG_WARNING); include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; $langs = new Translate('', $conf); + $langs->load("main"); } include_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 49cd229897b..1c9c99118f5 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -15179,3 +15179,27 @@ function recordNotFound($message = '', $printheader = 1, $printfooter = 1, $show } exit(0); } + + +/** + * Get caller info required to debug. + * + * @return string + */ +function getCallerFunctionString() +{ + $msg = ''; + + if (function_exists('debug_backtrace')) { + $backtrace = debug_backtrace(); + $msg = ""; + if (count($backtrace) >= 1) { + $trace = $backtrace[1]; + if (isset($trace['file'], $trace['line'])) { + $msg = " - From ".$trace['file'].":".$trace['line']; + } + } + } + + return $msg; +} diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 386cbb9b8ef..ef8043ca6cb 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -1451,7 +1451,7 @@ class InterfaceActionsAuto extends DolibarrTriggers $object->sendtoid = array(); } else { // TODO Merge all previous cases into this generic one - // $action = PASSWORD, BILL_DELETE, TICKET_CREATE, TICKET_MODIFY, TICKET_DELETE, CONTACT_SENTBYMAIL, RECRUITMENTCANDIDATURE_MODIFY, ... + // $action = PASSWORD, ORDER_DELETE, BILL_DELETE, TICKET_CREATE, TICKET_MODIFY, TICKET_DELETE, CONTACT_SENTBYMAIL, RECRUITMENTCANDIDATURE_MODIFY, ... // Can also be a value defined by an external module like SENTBYSMS, COMPANY_SENTBYSMS, MEMBER_SENTBYSMS, ... // Note: We are here only if getDolGlobalString('MAIN_AGENDA_ACTIONAUTO_action') is on (tested at beginning of this function). // Note that these activation key can be set in agenda setup (but only if defined into llx_c_action_trigger). @@ -1634,6 +1634,7 @@ class InterfaceActionsAuto extends DolibarrTriggers // for such objects because there is already a dedicated field into table llx_actioncomm or llx_actioncomm_resources. if (!in_array($elementtype, array('societe', 'contact', 'project'))) { $actioncomm->fk_element = $elementid; + $actioncomm->elementid = $elementid; $actioncomm->elementtype = $elementtype.($elementmodule ? '@'.$elementmodule : ''); } From 07d517ec49b5fa9698ef4fc9d21ddb06da3d9b1c Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Mon, 17 Mar 2025 11:05:41 +0100 Subject: [PATCH 05/13] FIX text in tooltip on buttons when pb is not a permission problem --- htdocs/commande/card.php | 1 + htdocs/core/lib/functions.lib.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index c817a252603..9de21c37fdb 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -3027,6 +3027,7 @@ if ($action == 'create' && $usercancreate) { if ($numlines > 0) { print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, $object->id, 1); } else { + $langs->load("errors"); print dolGetButtonAction($langs->trans("ErrorObjectMustHaveLinesToBeValidated", $object->ref), $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, $object->id, 0); } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1c9c99118f5..4d5ccb4b62a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -12838,7 +12838,7 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url = $attr['class'] = 'butActionRefused'; $attr['href'] = ''; $attr['title'] = (($label && $text && $label != $text) ? $label : ''); - $attr['title'] = ($attr['title'] ? $attr['title'].'
' : '').$langs->trans('NotEnoughPermissions'); + $attr['title'] = ($attr['title'] ? $attr['title'] : $langs->trans('NotEnoughPermissions')); } if (!empty($id)) { From 23244ddc9ddd3dd3117f33309b3179c80a6e5edf Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Mon, 17 Mar 2025 11:33:06 +0100 Subject: [PATCH 06/13] Fix getCallerInfoString() return empty when only one function used --- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/class/hookmanager.class.php | 2 -- htdocs/core/lib/functions.lib.php | 34 ++++--------------- 4 files changed, 9 insertions(+), 31 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index bdb1d1124ce..b4ecbf104c5 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3913,7 +3913,7 @@ class Facture extends CommonInvoice // Deprecation warning if ($label) { dol_syslog(__METHOD__.": using line label is deprecated", LOG_WARNING); - //var_dump(debug_backtrace(false));exit; + //var_dump(getCallerInfoString());exit; } global $mysoc, $conf, $langs; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f506672c640..8c83db4b8a2 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6234,7 +6234,7 @@ abstract class CommonObject exit; } if (!is_object($langs)) { // If lang was not defined, we set it. It is required by run_triggers(). - dol_syslog("call_trigger was called with no langs variable defined".getCallerFunctionString(), LOG_WARNING); + dol_syslog("call_trigger was called with no langs variable defined".getCallerInfoString(), LOG_WARNING); include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; $langs = new Translate('', $conf); $langs->load("main"); diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index fc8fc9ada54..40cc7c38841 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -197,8 +197,6 @@ class HookManager */ public function executeHooks($method, $parameters = array(), &$object = null, &$action = '') { - //global $debugbar; - //if (is_object($debugbar) && get_class($debugbar) === 'DolibarrDebugBar') { if (isModEnabled('debugbar') && function_exists('debug_backtrace')) { $trace = debug_backtrace(); if (isset($trace[0])) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4d5ccb4b62a..4901eae96b0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -812,7 +812,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null if (empty($check)) { dol_syslog("Deprecated use of GETPOST, called with 1st param = ".$paramname." and a 2nd param that is '', when calling page ".$_SERVER["PHP_SELF"], LOG_WARNING); // Enable this line to know who call the GETPOST with '' $check parameter. - //var_dump(debug_backtrace()[0]); + //var_dump(getCallerInfoString()); } if (empty($method)) { @@ -2337,8 +2337,12 @@ function getCallerInfoString() { $backtrace = debug_backtrace(); $msg = ""; - if (count($backtrace) >= 2) { - $trace = $backtrace[1]; + if (count($backtrace) >= 1) { + $pos = 1; + if (count($backtrace) == 1) { + $pos = 0; + } + $trace = $backtrace[$pos]; if (isset($trace['file'], $trace['line'])) { $msg = " From {$trace['file']}:{$trace['line']}."; } @@ -15179,27 +15183,3 @@ function recordNotFound($message = '', $printheader = 1, $printfooter = 1, $show } exit(0); } - - -/** - * Get caller info required to debug. - * - * @return string - */ -function getCallerFunctionString() -{ - $msg = ''; - - if (function_exists('debug_backtrace')) { - $backtrace = debug_backtrace(); - $msg = ""; - if (count($backtrace) >= 1) { - $trace = $backtrace[1]; - if (isset($trace['file'], $trace['line'])) { - $msg = " - From ".$trace['file'].":".$trace['line']; - } - } - } - - return $msg; -} From 2858d4e5447a584a4409299b5f9471c0dec45c2a Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Mon, 17 Mar 2025 11:42:39 +0100 Subject: [PATCH 07/13] Debug message on tooltip of not allowed button. --- htdocs/commande/card.php | 2 +- htdocs/core/lib/functions.lib.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 9de21c37fdb..fa693ac941a 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -3028,7 +3028,7 @@ if ($action == 'create' && $usercancreate) { print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, $object->id, 1); } else { $langs->load("errors"); - print dolGetButtonAction($langs->trans("ErrorObjectMustHaveLinesToBeValidated", $object->ref), $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, $object->id, 0); + print dolGetButtonAction($langs->trans("ErrorObjectMustHaveLinesToBeValidated", $object->ref), $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, $object->id, -1); } } // Edit diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4901eae96b0..36a5efd1ff0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -12710,7 +12710,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st * 30 => array('attr' => array('class'=>''), 'lang'=>'mymodule', 'enabled'=>isModEnabled("mymodule"), 'perm'=>$user->hasRight('mymodule', 'write'), 'label' => 'MyModuleOtherAction', 'urlraw' => '# || external Url || javascript: || tel: || mailto:' ), * ); ); * @param string $id Attribute id of action button. Example 'action-delete'. This can be used for full ajax confirm if this code is reused into the ->formconfirm() method. - * @param int|boolean $userRight User action right + * @param int|boolean $userRight User action right. Use 0 if user has no permission. It will add the message "No permission" on tooltip. Use -1 to have button not allowed without adding the message (because an explicit label is already set). * // phpcs:disable * @param array{confirm?:array{url?:string,title?:string,content?:string,use_unsecured_unescapedattr?:bool|string[],action-btn-label?:string,cancel-btn-label?:string,modal?:bool},attr?:array,areDropdownButtons?:bool,backtopage?:string,lang?:string,enabled?:bool,perm?:int<0,1>,label?:string,url?:string,isDropdown?:int<0,1>,isDropDown?:int<0,1>} $params = [ // Various params for future : recommended rather than adding more function arguments * 'attr' => [ // to add or override button attributes @@ -12838,11 +12838,11 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url = $attr['aria-label'] = $label; } - if (empty($userRight)) { + if (empty($userRight) || $userRight < 0) { $attr['class'] = 'butActionRefused'; $attr['href'] = ''; $attr['title'] = (($label && $text && $label != $text) ? $label : ''); - $attr['title'] = ($attr['title'] ? $attr['title'] : $langs->trans('NotEnoughPermissions')); + $attr['title'] = ($attr['title'] ? $attr['title'] . (empty($userRight) ? '
' : '') : '').(empty($userRight) ? $langs->trans('NotEnoughPermissions') : ''); } if (!empty($id)) { From cc9658fbb44c5901f0b8cebfb6a5ae93aa679656 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Mon, 17 Mar 2025 12:59:30 +0100 Subject: [PATCH 08/13] Fix address separator --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 357c03b72d3..7532c89f7ad 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2941,7 +2941,7 @@ class Societe extends CommonObject } if (!empty($this->address)) { - $datas['address'] = '
'.$langs->trans("Address").': '.dol_format_address($this, 1, ' ', $langs); // Address + country + $datas['address'] = '
'.$langs->trans("Address").': '.dol_format_address($this, 1, ', ', $langs); // Address + country } elseif (!empty($this->country_code)) { $datas['address'] = '
'.$langs->trans('Country').': '.$this->country_code; } From 00fe425b0fd2395a40fd81b1874d92fca2cd6018 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Mar 2025 19:22:55 +0100 Subject: [PATCH 09/13] Fix css --- htdocs/core/class/html.form.class.php | 2 +- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 08a27e4861b..cb19a6e2df1 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7384,7 +7384,7 @@ class Form $retstring .= ' onChange="dpChangeDay(\'' . dol_escape_js($prefix) . '\',\'' . dol_escape_js($langs->trans("FormatDateShortJavaInput")) . '\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript $retstring .= ' autocomplete="off">'; - // Icone calendrier + // Icon calendar if ($disabled) { $retstringbutton = ''; $retstring = $retstringbutton . $retstring; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 6f10003a874..78c1a6e180a 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1989,7 +1989,7 @@ maxscreenheightless200 { .maxwidth40 { max-width: 40px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } -.maxwidthdate { max-width: 85px; } +.maxwidthdate { max-width: 90px; } .maxwidth100 { max-width: 100px; } .maxwidth125 { max-width: 125px; } .maxwidth150 { max-width: 150px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index cb3bbfdee00..c682df2452c 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2135,7 +2135,7 @@ tr.nobottom td { .maxwidth40 { max-width: 40px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } -.maxwidthdate { max-width: 85px; } +.maxwidthdate { max-width: 90px; } .maxwidth100 { max-width: 100px; } .maxwidth125 { max-width: 125px; } .maxwidth150 { max-width: 150px; } From dd5b947cf7326be6a3507d6c21b9984aee7fb037 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Mar 2025 19:49:31 +0100 Subject: [PATCH 10/13] Fix css --- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index cbefc6d4f80..cce01be1d61 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2021,7 +2021,7 @@ maxscreenheightless200 { .maxwidth40 { max-width: 40px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } -.maxwidthdate { max-width: 90px; } +.maxwidthdate { max-width: 95px; } .maxwidth100 { max-width: 100px; } .maxwidth125 { max-width: 125px; } .maxwidth150 { max-width: 150px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index e936515e655..90ecc18e5f1 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2160,7 +2160,7 @@ tr.nobottom td { .maxwidth40 { max-width: 40px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } -.maxwidthdate { max-width: 90px; } +.maxwidthdate { max-width: 95px; } .maxwidth100 { max-width: 100px; } .maxwidth125 { max-width: 125px; } .maxwidth150 { max-width: 150px; } From 57fe705f5c0f31deacddd8fca96589f03d792051 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Mar 2025 19:49:31 +0100 Subject: [PATCH 11/13] Fix css --- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 78c1a6e180a..5318c2ea9ab 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1989,7 +1989,7 @@ maxscreenheightless200 { .maxwidth40 { max-width: 40px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } -.maxwidthdate { max-width: 90px; } +.maxwidthdate { max-width: 95px; } .maxwidth100 { max-width: 100px; } .maxwidth125 { max-width: 125px; } .maxwidth150 { max-width: 150px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index c682df2452c..af6996962a4 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2135,7 +2135,7 @@ tr.nobottom td { .maxwidth40 { max-width: 40px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } -.maxwidthdate { max-width: 90px; } +.maxwidthdate { max-width: 95px; } .maxwidth100 { max-width: 100px; } .maxwidth125 { max-width: 125px; } .maxwidth150 { max-width: 150px; } From 5443b7cc11b8101d3ebce5cc2b592f1e028669df Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Mar 2025 20:30:02 +0100 Subject: [PATCH 12/13] FIX Bad link to download tax vat document --- htdocs/compta/tva/card.php | 2 +- htdocs/ecm/class/ecmfiles.class.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index dcf5d5b3248..99710575723 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -112,7 +112,6 @@ $resteapayer = 0; * Actions */ - $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -857,6 +856,7 @@ if ($id > 0) { $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed = 0; $delallowed = $user->hasRight('tax', 'charges', 'creer'); // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('tax-vat', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang); } diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 0bd44eceb31..91cf29374b4 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -1012,6 +1012,8 @@ class EcmFiles extends CommonObject $tmppath = preg_replace('/^(\d+\/)?fournisseur\/facture\//', '', $this->filepath); } elseif ($option == 'commande_fournisseur') { $tmppath = preg_replace('/^(\d+\/)?fournisseur\/commande\//', '', $this->filepath); + } elseif ($option == 'tax-vat') { // Remove part "tax/vat/" + $tmppath = preg_replace('/^(\d+\/)?tax\/vat\//', '', $this->filepath); } else { if ((int) $this->entity > 1) { // Remove the part "entityid/commande/" into "entityid/commande/REFXXX" to get only the ref From 0f0c00c56edbfc4cc3364984c562c017600355c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Mar 2025 01:16:19 +0100 Subject: [PATCH 13/13] Test commit with signed-off-by Signed-off-by: Laurent Destailleur --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a9199f8bf7c..bef3b3fbe52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,7 +18,7 @@ WARNING: The following changes may create regressions for some external modules, but were necessary to make Dolibarr better: * The directory /build has been moved into /dev/build. -* The use of GETPOST function is not allowed inside extrafields conditions or any strings that contains dynamic code evaluated with dol_eval() +* The use of GETPOST function is not allowed inside extrafields conditions or any strings that contains dynamic code evaluated with dol_eval(). * The deprecated variable $trigger_name (duplicate of variable $triggersendname) has been removed. You must use $triggersendname everywhere now. * The behavior of constant STOCK_ALLOW_NEGATIVE_TRANSFER has been reversed. It has been renamed to STOCK_DISALLOW_NEGATIVE_TRANSFER.