2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Laurent Destailleur
2011-09-11 10:34:08 +00:00
parent 2b161eeb07
commit 84075f6fab
2 changed files with 3 additions and 3 deletions

View File

@@ -903,7 +903,7 @@ if (($action == 'addline' || $action == 'addline_predef') && $user->rights->fact
// Ecrase $base_price_type par celui du produit // Ecrase $base_price_type par celui du produit
if ($_POST['idprod']) if ($_POST['idprod'])
{ {
$prod = new Product($db); $prod = new Product($db, $_POST['idprod']);
$prod->fetch($_POST['idprod']); $prod->fetch($_POST['idprod']);
$tva_tx = get_default_tva($mysoc,$object->client,$prod->id); $tva_tx = get_default_tva($mysoc,$object->client,$prod->id);
@@ -1884,7 +1884,7 @@ else
$result=$object->fetch_thirdparty(); $result=$object->fetch_thirdparty();
$soc = new Societe($db); $soc = new Societe($db, $object->socid);
$soc->fetch($object->socid); $soc->fetch($object->socid);
$totalpaye = $object->getSommePaiement(); $totalpaye = $object->getSommePaiement();

View File

@@ -372,7 +372,7 @@ class Facture extends CommonObject
{ {
if ($_facrec->lines[$i]->fk_product) if ($_facrec->lines[$i]->fk_product)
{ {
$prod = new Product($this->db); $prod = new Product($this->db, $_facrec->lines[$i]->fk_product);
$res=$prod->fetch($_facrec->lines[$i]->fk_product); $res=$prod->fetch($_facrec->lines[$i]->fk_product);
} }
$tva_tx = get_default_tva($mysoc,$soc,$prod->id); $tva_tx = get_default_tva($mysoc,$soc,$prod->id);