diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index e3be3ac83616c214c9b2e163fe8d79a34ff3694e..4929ee9c70e3f9c6ec13c14079952a2302dcce2c 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -545,16 +545,15 @@ else if ($action == 'addline' && $user->rights->propal->creer) { // Set if we used free entry or predefined product $predef=''; $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); if (GETPOST('prod_entry_mode') == 'free') { $idprod=0; - $price_ht = GETPOST('price_ht'); $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); } else { $idprod=GETPOST('idprod', 'int'); - $price_ht = ''; $tva_tx = ''; } diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index e0950bdccc753ecf7c29ae6c537499facf9bf088..1c01b975a3bed7679314e3ebadeac32b652bf2f5 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -511,16 +511,15 @@ else if ($action == 'addline' && $user->rights->commande->creer) { // Set if we used free entry or predefined product $predef=''; $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); if (GETPOST('prod_entry_mode') == 'free') { $idprod=0; - $price_ht = GETPOST('price_ht'); $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); } else { $idprod=GETPOST('idprod', 'int'); - $price_ht = ''; $tva_tx = ''; } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 25330ba548bf7a91232c32ff1ea083ba1b87620b..c6214f449cb5ed13d66eaa6ac8af1819339d2f9d 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1064,16 +1064,15 @@ else if ($action == 'addline' && $user->rights->facture->creer) // Set if we used free entry or predefined product $predef=''; $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); if (GETPOST('prod_entry_mode') == 'free') { $idprod=0; - $price_ht = GETPOST('price_ht'); $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); } else { $idprod=GETPOST('idprod', 'int'); - $price_ht = ''; $tva_tx = ''; } @@ -1884,8 +1883,10 @@ if ($action == 'create') $projectid = (! empty($objectsrc->fk_project) ? $objectsrc->fk_project : ''); $ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : ''); $ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : ''); - - $soc = $objectsrc->thirdparty; + + // only if socid not filled else it's allready done upper + if (empty($socid)) + $soc = $objectsrc->thirdparty; $cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1)); $mode_reglement_id = (! empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(! empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0));