diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 6ff8a988899..84fbb8dae30 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -400,7 +400,7 @@ if ($conf->product->enabled) print img_picto($langs->trans("Activated"), 'switch_on'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 9d715f92301..81e6bda40a0 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -215,8 +215,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) if ($_POST["optionlocaltax1"] == "localtax1on") { - if (!isset($_REQUEST['lt1'])) - { + if (!GETPOSTISSET('lt1')) { dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", 0, 'chaine', 0, '', $conf->entity); } else { dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1', 'aZ09'), 'chaine', 0, '', $conf->entity); @@ -225,8 +224,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) } if ($_POST["optionlocaltax2"] == "localtax2on") { - if (!isset($_REQUEST['lt2'])) - { + if (!GETPOSTISSET('lt2')) { dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", 0, 'chaine', 0, '', $conf->entity); } else { dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2', 'aZ09'), 'chaine', 0, '', $conf->entity); @@ -236,7 +234,9 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + if (GETPOST('save')) { // To avoid to show message when we juste switch the country that resubmit the form. + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } $db->commit(); } else { $db->rollback(); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 80398531515..af4c2aa348e 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -799,11 +799,15 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $keycode = $listfieldvalue[$i]; if (empty($keycode)) $keycode = $value; - if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') { - $_POST[$keycode] = price2num($_POST[$keycode], 'MU'); - } elseif ($value == 'entity') { - $_POST[$keycode] = getEntity($tabname[$id]); - } + if ($value == 'price' || preg_match('/^amount/i', $value)) { + $_POST[$keycode] = price2num(GETPOST($keycode), 'MU'); + } + elseif ($value == 'taux' || $value == 'localtax1' || $value == 'localtax2') { + $_POST[$keycode] = price2num(GETPOST($keycode), 8); + } + elseif ($value == 'entity') { + $_POST[$keycode] = getEntity($tabname[$id]); + } if ($i) $sql .= ","; @@ -823,11 +827,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) } $sql .= ",1)"; - dol_syslog("actionadd", LOG_DEBUG); - $result = $db->query($sql); - if ($result) // Add is ok - { - setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs'); + dol_syslog("actionadd", LOG_DEBUG); + $result = $db->query($sql); + if ($result) // Add is ok + { + setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs'); // Clean $_POST array, we keep only id of dictionary if ($id == 10 && GETPOST('country', 'int') > 0) { @@ -862,11 +866,15 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $keycode = $listfieldvalue[$i]; if (empty($keycode)) $keycode = $field; - if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') { - $_POST[$keycode] = price2num($_POST[$keycode], 'MU'); - } elseif ($field == 'entity') { - $_POST[$keycode] = getEntity($tabname[$id]); - } + if ($field == 'price' || preg_match('/^amount/i', $field)) { + $_POST[$keycode] = price2num(GETPOST($keycode), 'MU'); + } + elseif ($field == 'taux' || $field == 'localtax1' || $field == 'localtax2') { + $_POST[$keycode] = price2num(GETPOST($keycode), 8); + } + elseif ($field == 'entity') { + $_POST[$keycode] = getEntity($tabname[$id]); + } if ($i) $sql .= ","; $sql .= $field."="; diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index e7149ece88d..9d3dfaaf09b 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -416,7 +416,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (function_exists('imap_open')) { - $connectstringserver = $object->getConnectStringIMAP(); + // Note: $object->host has been loaded by the fetch + $usessl = 1; + + $connectstringserver = $object->getConnectStringIMAP($usessl); try { if ($sourcedir) { diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index a4177a72f86..c87083895c7 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -640,7 +640,11 @@ if (empty($reshook)) } $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); - $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef), 2) : 0); + + $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha')) : 0); + if (empty($remise_percent)) { + $remise_percent = 0; + } // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 4b93cb4cca3..c6afa4def1d 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -749,7 +749,7 @@ if ($action != 'new') if ($object->statut == 1) { $filename = dol_sanitizeFileName($object->ref); - $filedir = $dir.get_exdir($object->ref, 0, 1, 0, $object, 'cheque').dol_sanitizeFileName($object->ref); + $filedir = $dir.get_exdir($object->ref, 0, 1, 0, $object, 'checkdeposits'); $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; print $formfile->showdocuments('remisecheque', $filename, $filedir, $urlsource, 1, 1); diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index f3ea817fa73..ee00a98b039 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -101,7 +101,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts // Load traductions files required by page $outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta")); - $dir = $_dir."/".get_exdir($number, 0, 1, 0, $object, 'cheque').$number; + $dir = $_dir."/".get_exdir($number, 0, 1, 0, $object, 'checkdeposits'); if (!is_dir($dir)) { diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 8b7bfb5d288..e3516b8b2fc 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -169,7 +169,7 @@ if (($line->info_bits & 2) == 2) { } } -if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0) +if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0 && empty($conf->global->SUPPLIER_HIDE_SUPPLIER_OBJECTLINES)) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $productfourn = new ProductFournisseur($this->db); diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 1a05017c1d3..b01f1883d53 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -202,7 +202,6 @@ class EmailCollector extends CommonObject public $debuginfo; - const STATUS_DISABLED = 0; const STATUS_ENABLED = 1; @@ -716,11 +715,15 @@ class EmailCollector extends CommonObject // Connect to IMAP $flags = '/service=imap'; // IMAP - if ($ssl) $flags .= '/ssl'; // '/tls' + if (!empty($conf->global->IMAP_FORCE_TLS)) { + $flags .= '/tls'; + } elseif (empty($conf->global->IMAP_FORCE_NOSSL)) { + if ($ssl) $flags .= '/ssl'; + } $flags .= '/novalidate-cert'; //$flags.='/readonly'; //$flags.='/debug'; - if ($norsh || !empty($conf->global->IMPA_FORCE_NORSH)) $flags .= '/norsh'; + if ($norsh || !empty($conf->global->IMAP_FORCE_NORSH)) $flags .= '/norsh'; $connectstringserver = '{'.$this->host.':993'.$flags.'}'; diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 357abd029fa..d655b97c74f 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -136,7 +136,7 @@ if ($id > 0 || !empty($ref)) print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; // Ref supplier diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index 656cd3c5553..69ea8839cfb 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -67,7 +67,7 @@ $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; // Ref supplier diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 694382be57d..9658d6c3051 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -578,3 +578,5 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',204); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205); +-- Removed no more used function +-- VPGSQL8.2 DROP FUNCTION IF EXISTS update_modified_column_date_m CASCADE;