diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 75689f509ea..bd202e62343 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -496,6 +496,8 @@ if (empty($reshook)) { $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx)); $tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx)); + $pu_ht = price2num($price_ht, 'MU'); + // On reevalue prix selon taux tva car taux tva transaction peut etre different // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). if ($tmpvat != $tmpprodvat) { @@ -521,7 +523,7 @@ if (empty($reshook)) { $fk_unit = $prod->fk_unit; } else { - $pu_ht = GETPOST('price_ht'); + $pu_ht = price2num($price_ht, 'MU'); $price_base_type = 'HT'; $tva_tx = GETPOST('tva_tx') ?str_replace('*', '', GETPOST('tva_tx')) : 0; // tva_tx field may be disabled, so we use vat rate 0 $tva_npr = preg_match('/\*/', GETPOST('tva_tx')) ? 1 : 0; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 908dacb870c..79072cdb324 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1078,7 +1078,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl $extrafieldsobjectkey = $contactstatic->table_element; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - $sql = "SELECT t.rowid, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste, t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo,"; + $sql = "SELECT t.rowid, t.entity, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste, t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo,"; $sql .= " t.civility as civility_id, t.address, t.zip, t.town"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)"; @@ -1225,6 +1225,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl $contactstatic->email = $obj->email; $contactstatic->socialnetworks = $obj->socialnetworks; $contactstatic->photo = $obj->photo; + $contactstatic->entity = $obj->entity; $country_code = getCountry($obj->country_id, 2); $contactstatic->country_code = $country_code;