diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 1a6a4f272c0..6801c9236b0 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/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index cba0b0b3e53..ba0bf6212ac 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -160,7 +160,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/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 = '