bugfix
This commit is contained in:
parent
ee0b1af010
commit
2211c24253
@ -1026,24 +1026,20 @@ class Facture
|
||||
$qty=price2num($qty);
|
||||
if (! $qty) $qty=1;
|
||||
if (! $ventil) $ventil=0;
|
||||
|
||||
$soc = new Societe($this->db);
|
||||
$soc->fetch($this->socidp);
|
||||
if($soc->tva_assuj == "0")
|
||||
$txtva ="0";
|
||||
else
|
||||
$txtva=$prod->tva_tx;
|
||||
if ($fk_product && ! $pu)
|
||||
{
|
||||
$prod = new Product($this->db, $fk_product);
|
||||
$prod->fetch($fk_product);
|
||||
$product_desc = $prod->description;
|
||||
$soc = new Societe($this->db);
|
||||
$soc->fetch($this->socidp);
|
||||
if($soc->tva_assuj == "0")
|
||||
$txtva ="0";
|
||||
else
|
||||
$txtva=$prod->tva_tx;
|
||||
// multiprix
|
||||
if($conf->global->PRODUIT_MULTIPRICES == 1)
|
||||
{
|
||||
|
||||
$pu = $prod->multiprices[$soc->price_level];
|
||||
}
|
||||
else
|
||||
$pu=$prod->price;
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer)
|
||||
$facture->addline($_POST["factureid"],
|
||||
addslashes($product->libelle),
|
||||
addslashes($product->description),
|
||||
$product->price,
|
||||
"", // volontairement laissé vide pour fonctionnement module multiprix
|
||||
$_POST["qty"],
|
||||
$product->tva_tx,
|
||||
$product->id,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user