From 08bf5af5d4d51b70731557c423c84d8b3b5475ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Jan 2026 13:46:35 +0100 Subject: [PATCH 1/6] Default value --- htdocs/core/class/conf.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 5caabaf0156..59385ee83c7 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -705,8 +705,8 @@ class Conf extends stdClass if (!isset($this->global->FACTURE_TVAOPTION)) { $this->global->FACTURE_TVAOPTION = 1; } - if (!isset($this->global->FAC_FORCE_DATE_VALIDATION)) { - $this->global->FAC_FORCE_DATE_VALIDATION = 1; + if (!isset($this->global->INVOICE_CHECK_POSTERIOR_DATE)) { + $this->global->INVOICE_CHECK_POSTERIOR_DATE = 1; } // Variable globales LDAP From 2d4e09b519dcb935c8fabbd353233427d4fa7fe3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Jan 2026 14:26:39 +0100 Subject: [PATCH 2/6] Fix trans and warning --- htdocs/admin/pdf_other.php | 6 +++--- htdocs/langs/en_US/admin.lang | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index 95a84ede1ce..e9103da1111 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -541,7 +541,7 @@ if (isModEnabled('invoice')) { print ajax_constantonoff('PDF_INVOICE_SHOW_VAT_ANALYSIS'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("PDF_INVOICE_SHOW_VAT_ANALYSIS", $arrval, $conf->global->PDF_INVOICE_SHOW_VAT_ANALYSIS); + print $form->selectarray("PDF_INVOICE_SHOW_VAT_ANALYSIS", $arrval, getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')); } print ''; @@ -553,7 +553,7 @@ if (isModEnabled('invoice')) { print ajax_constantonoff('PDF_INVOICE_SHOW_BALANCE_SUMMARY'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("PDF_INVOICE_SHOW_BALANCE_SUMMARY", $arrval, $conf->global->PDF_INVOICE_SHOW_BALANCE_SUMMARY); + print $form->selectarray("PDF_INVOICE_SHOW_BALANCE_SUMMARY", $arrval, getDolGlobalInt('PDF_INVOICE_SHOW_BALANCE_SUMMARY')); } print ''; @@ -565,7 +565,7 @@ if (isModEnabled('invoice')) { print ajax_constantonoff('SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT'); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT", $arrval, $conf->global->SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT); + print $form->selectarray("SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT", $arrval, getDolGlobalInt('SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT')); } print ''; */ diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 2f6b34aebd3..f861467e2a6 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2479,7 +2479,7 @@ INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal SUPPLIER_PROPOSAL_ADD_BILLING_CONTACTMore=By default the contact only appears for billing -INVOICE_HIDE_LINKED_OBJECT=Hide linked object +INVOICE_HIDE_LINKED_OBJECT=Hide linked objects INVOICE_HIDE_LINKED_OBJECTMore=This feature prevents linked objects from being displayed on the generated PDF invoice document. UrlSocialNetworksDesc=Url link of social network. Use {socialid} for the variable part that contains the social network ID. IfThisCategoryIsChildOfAnother=If this category is a child of another one @@ -2668,7 +2668,7 @@ CaptchaDesc=If you want to protect your login page with a Captcha, you can choos DolibarrStandardCaptcha=A native captcha generated by Dolibarr SALES_ORDER_SHOW_SHIPPING_ADDRESS=Show shipping address SALES_ORDER_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) -PDF_INVOICE_SHOW_VAT_ANALYSIS=Show vat analysis per rate +PDF_INVOICE_SHOW_VAT_ANALYSIS=Show the vat per rate analysis in columns (instead of in lines) MaxNbOfRecordOnListIsOk=You have a max size for lists set to %s lines. This is a good value. YouHaveALargeAmountOfRecordOnLists=You have a default max size for lists set to %s lines. This is a large value that need scrolling to see all answers. It is better to have a value lower than %s and use pagination to see record over this number. Change this in menu Home - Setup - Display. RoundBorders=Round borders From 4017f8166e738c62e50e67c6107a6914e38e786e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Jan 2026 14:47:04 +0100 Subject: [PATCH 3/6] Doc --- htdocs/website/index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index a0a34c288e2..0d296ac2782 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3245,12 +3245,16 @@ if (!GETPOST('hide_websitemenu')) { //print '
'; //print ajax_object_onoff($object, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle inline-block', 'statuswebsite'); //print '
'; + $disabled = ''; + if (!$user->hasRight('website', 'write')) { + $disabled = ' disabled="disabled"'; + } if ($website->status == $website::STATUS_DRAFT) { $text_off = 'Offline'; - print 'ref).'&websitepage='.((int) $websitepage->id).'">'.img_picto($langs->trans($text_off), 'switch_off').''; + print 'ref).'&websitepage='.((int) $websitepage->id).'"'.$disabled.'>'.img_picto($langs->trans($text_off), 'switch_off', '', 0, 0, 0, '', ($user->hasRight('website', 'write') ? '' : 'opacitymedium cursordefault')).''; } else { $text_off = 'Online'; - print 'ref).'&websitepage='.((int) $websitepage->id).'">'.img_picto($langs->trans($text_off), 'switch_on').''; + print 'ref).'&websitepage='.((int) $websitepage->id).'"'.$disabled.'>'.img_picto($langs->trans($text_off), 'switch_on', '', 0, 0, 0, '', ($user->hasRight('website', 'write') ? '' : 'opacitymedium cursordefault')).''; } print ''; } From cd0b8ceab5911d3e8f8f4ed134751ce7fd6da3ef Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Jan 2026 16:21:35 +0100 Subject: [PATCH 4/6] Debug v23 --- htdocs/core/lib/ajax.lib.php | 17 +++++++++++++---- htdocs/website/index.php | 23 +++++++++++++---------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 68923e65fec..2133155550b 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -782,10 +782,11 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof * @param string $htmlname Name of HTML component. Keep '' or use a different value if you need to use this component several time on the same page for the same field. * @param int $forcenojs Force the component to work as link post (without javascript) instead of ajax call * @param string $moreparam When $forcenojs=1 then we can add more parameters to the backtopage URL. String must url encoded. Example: 'abc=def&fgh=ijk' + * @param int $readonly Use 1 if button not allowed. * @return string html for button on/off * @see ajax_constantonoff() to update that value of a constant */ -function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input = array(), $morecss = '', $htmlname = '', $forcenojs = 0, $moreparam = '') +function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input = array(), $morecss = '', $htmlname = '', $forcenojs = 0, $moreparam = '', $readonly = 0) { global $conf, $langs; @@ -795,7 +796,7 @@ function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input = $out = ''; - if (!empty($conf->use_javascript_ajax) && empty($forcenojs)) { + if (!empty($conf->use_javascript_ajax) && empty($forcenojs) && empty($readonly)) { $out .= '