diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 598f19ee0a0..f4c493c8b52 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1562,8 +1562,6 @@ class CommandeFournisseur extends CommonOrder { global $langs, $mysoc, $conf; - $error = 0; - dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $fk_prod_fourn_price, $ref_supplier, $remise_percent, $price_base_type, $pu_ttc, $type, $info_bits, $notrigger, $date_start, $date_end, $fk_unit, $pu_ht_devise, $origin, $origin_id"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index ef4e46e0d5a..520c8bc3c47 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -564,7 +564,9 @@ if (empty($reshook)) $fk_unit = GETPOST('units', 'alpha'); - $tva_tx = price2num($tva_tx); // When vat is text input field + if (!preg_match('/\((.*)\)/', $tva_tx)) { + $tva_tx = price2num($tva_tx); // When vat is text input field + } // Local Taxes $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty); diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 2aadd4b3813..d66d7338bfd 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -160,9 +160,13 @@ if (empty($reshook)) if (empty($ref_fourn_old)) $ref_fourn_old = $ref_fourn; $quantity = price2num(GETPOST("qty", 'nohtml'), 'MS'); $remise_percent = price2num(GETPOST('remise_percent', 'alpha')); + $npr = preg_match('/\*/', $_POST['tva_tx']) ? 1 : 0; $tva_tx = str_replace('*', '', GETPOST('tva_tx', 'alpha')); - $tva_tx = price2num($tva_tx); + if (!preg_match('/\((.*)\)/', $tva_tx)) { + $tva_tx = price2num($tva_tx); + } + $price_expression = GETPOST('eid', 'int') ? GETPOST('eid', 'int') : ''; // Discard expression if not in expression mode $delivery_time_days = GETPOST('delivery_time_days', 'int') ? GETPOST('delivery_time_days', 'int') : ''; $supplier_reputation = GETPOST('supplier_reputation'); diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 7b997fbd613..7c470d880ca 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1923,7 +1923,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Country print '