diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index e834cdd47c3..5c5d462e77a 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2362,6 +2362,7 @@ class Adherent extends CommonObject $linkend = ''; $result .= $linkstart; + if ($withpictoimg) { $paddafterimage = ''; if (abs($withpictoimg) == 1 || abs($withpictoimg) == 4) { @@ -2394,6 +2395,7 @@ class Adherent extends CommonObject $result .= ''; } } + $result .= $linkend; if ($addlinktonotes) { diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 9025049b4a4..289d68cb4cd 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1636,7 +1636,7 @@ class Facture extends CommonInvoice require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; - if ($date > (dol_get_last_hour(dol_now('tzuserrel')) + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { + if ($date > (dol_get_last_hour(dol_now('tzuserrel')) + getDolGlobalInt('INVOICE_MAX_FUTURE_DELAY'))) { $origin->error = 'ErrorDateIsInFuture'; return null; } diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index d6a2ca29cf5..65c33a88632 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -213,7 +213,7 @@ if (empty($reshook)) { $result = $object->setPaymentMethods(GETPOSTINT('mode_reglement_id')); } elseif ($action == 'setdatef' && $usercancreate) { $newdate = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear'), 'tzserver'); - if ($newdate > (dol_now('tzuserrel') + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { + if ($newdate > (dol_now('tzuserrel') + getDolGlobalInt('INVOICE_MAX_FUTURE_DELAY'))) { if (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY')) { setEventMessages($langs->trans("WarningInvoiceDateInFuture"), null, 'warnings'); } else { diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 2c7226e6f21..92e40a12237 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -477,7 +477,7 @@ if (empty($reshook)) { } } elseif ($action == 'setdatef' && $usercancreate) { $newdate = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear'), 'tzserver'); - if ($newdate > (dol_now('tzuserrel') + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { + if ($newdate > (dol_now('tzuserrel') + getDolGlobalInt('INVOICE_MAX_FUTURE_DELAY'))) { if (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY')) { setEventMessages($langs->trans("WarningInvoiceDateInFuture"), null, 'warnings'); } else { @@ -803,7 +803,7 @@ if (empty($reshook)) { $action = 'create'; //$_GET['socid'] = $_POST['socid']; $error++; - } elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { + } elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + getDolGlobalInt('INVOICE_MAX_FUTURE_DELAY'))) { $error++; setEventMessages($langs->trans("ErrorDateIsInFuture"), null, 'errors'); $action = 'create'; @@ -869,7 +869,7 @@ if (empty($reshook)) { $action = 'create'; //$_GET['socid'] = $_POST['socid']; $error++; - } elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { + } elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + getDolGlobalInt('INVOICE_MAX_FUTURE_DELAY'))) { $error++; setEventMessages($langs->trans("ErrorDateIsInFuture"), null, 'errors'); $action = 'create'; @@ -981,7 +981,7 @@ if (empty($reshook)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); $action = 'create'; - } elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { + } elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + getDolGlobalInt('INVOICE_MAX_FUTURE_DELAY'))) { $error++; setEventMessages($langs->trans("ErrorDateIsInFuture"), null, 'errors'); $action = 'create'; @@ -1037,7 +1037,7 @@ if (empty($reshook)) { $action = 'create'; //$_GET['socid'] = $_POST['socid']; $error++; - } elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { + } elseif ($dateinvoice > (dol_get_last_hour(dol_now('tzuserrel')) + getDolGlobalInt('INVOICE_MAX_FUTURE_DELAY'))) { $error++; setEventMessages($langs->trans("ErrorDateIsInFuture"), null, 'errors'); $action = 'create'; diff --git a/htdocs/mrp/class/api_mos.class.php b/htdocs/mrp/class/api_mos.class.php index 5dc781d6110..dc7b22ab4b4 100644 --- a/htdocs/mrp/class/api_mos.class.php +++ b/htdocs/mrp/class/api_mos.class.php @@ -872,7 +872,7 @@ class Mos extends DolibarrApi // Update status of MO dol_syslog("consumptioncomplete = " . (string) $consumptioncomplete . " productioncomplete = " . (string) $productioncomplete); //var_dump("consumptioncomplete = ".$consumptioncomplete." productioncomplete = ".$productioncomplete); - if ($consumptioncomplete && $productioncomplete) { + if ($consumptioncomplete && $productioncomplete) { $result = $this->mo->setStatut(Mo::STATUS_PRODUCED, 0, '', 'MRP_MO_PRODUCED'); } else { $result = $this->mo->setStatut(Mo::STATUS_INPROGRESS, 0, '', 'MRP_MO_PRODUCED');