modif pour assujetis tva ou pas
This commit is contained in:
parent
fbb25e44e1
commit
ee0b1af010
@ -1537,7 +1537,10 @@ else
|
|||||||
}
|
}
|
||||||
print '<textarea name="desc" cols="70" rows="'.ROWS_2.'">'.stripslashes($objp->description).'</textarea></td>';
|
print '<textarea name="desc" cols="70" rows="'.ROWS_2.'">'.stripslashes($objp->description).'</textarea></td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print $html->select_tva('tva_tx',$objp->tva_taux,$mysoc,$soc);
|
if($soc->tva_assuj == "0")
|
||||||
|
print '<input type="hidden" name="tva_tx" value="0">0';
|
||||||
|
else
|
||||||
|
print $html->select_tva('tva_tx',$objp->tva_taux,$mysoc,$soc);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input size="6" type="text" name="price" value="'.price($objp->subprice).'"></td>';
|
print '<td align="right"><input size="6" type="text" name="price" value="'.price($objp->subprice).'"></td>';
|
||||||
print '<td align="right"><input size="2" type="text" name="qty" value="'.$objp->qty.'"></td>';
|
print '<td align="right"><input size="2" type="text" name="qty" value="'.$objp->qty.'"></td>';
|
||||||
@ -1596,7 +1599,10 @@ else
|
|||||||
print '<td colspan="1">';
|
print '<td colspan="1">';
|
||||||
print '<textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea></td>';
|
print '<textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea></td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
$html->select_tva('tva_tx',$conf->defaulttx,$mysoc,$soc);
|
if($soc->tva_assuj == "0")
|
||||||
|
print '<input type="hidden" name="tva_tx" value="0">0';
|
||||||
|
else
|
||||||
|
$html->select_tva('tva_tx',$conf->defaulttx,$mysoc,$soc);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input type="text" name="pu" size="6"></td>';
|
print '<td align="right"><input type="text" name="pu" size="6"></td>';
|
||||||
print '<td align="right"><input type="text" name="qty" value="1" size="2"></td>';
|
print '<td align="right"><input type="text" name="qty" value="1" size="2"></td>';
|
||||||
|
|||||||
@ -182,12 +182,16 @@ class Facture
|
|||||||
{
|
{
|
||||||
$prod = new Product($this->db, $this->products[$i]);
|
$prod = new Product($this->db, $this->products[$i]);
|
||||||
$res=$prod->fetch($this->products[$i]);
|
$res=$prod->fetch($this->products[$i]);
|
||||||
|
$soc = new Societe($this->db);
|
||||||
|
$soc->fetch($this->socidp);
|
||||||
|
if($soc->tva_assuj == "0")
|
||||||
|
$tva_tx ="0";
|
||||||
|
else
|
||||||
|
$tva_tx=$prod->tva_tx;
|
||||||
// multiprix
|
// multiprix
|
||||||
if($conf->global->PRODUIT_MULTIPRICES == 1)
|
if($conf->global->PRODUIT_MULTIPRICES == 1)
|
||||||
{
|
{
|
||||||
$soc = new Societe($this->db);
|
|
||||||
$soc->fetch($this->socidp);
|
|
||||||
$price = $prod->multiprices[$soc->price_level];
|
$price = $prod->multiprices[$soc->price_level];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -201,7 +205,7 @@ class Facture
|
|||||||
$prod->description,
|
$prod->description,
|
||||||
$price,
|
$price,
|
||||||
$this->products_qty[$i],
|
$this->products_qty[$i],
|
||||||
$prod->tva_tx,
|
$tva_tx,
|
||||||
$this->products[$i],
|
$this->products[$i],
|
||||||
$this->products_remise_percent[$i],
|
$this->products_remise_percent[$i],
|
||||||
$this->products_date_start[$i],
|
$this->products_date_start[$i],
|
||||||
@ -234,7 +238,7 @@ class Facture
|
|||||||
$_facrec->lignes[$i]->desc,
|
$_facrec->lignes[$i]->desc,
|
||||||
$_facrec->lignes[$i]->subprice,
|
$_facrec->lignes[$i]->subprice,
|
||||||
$_facrec->lignes[$i]->qty,
|
$_facrec->lignes[$i]->qty,
|
||||||
$_facrec->lignes[$i]->tva_taux,
|
$tva_tx,
|
||||||
$_facrec->lignes[$i]->produit_id,
|
$_facrec->lignes[$i]->produit_id,
|
||||||
$_facrec->lignes[$i]->remise_percent);
|
$_facrec->lignes[$i]->remise_percent);
|
||||||
|
|
||||||
@ -1028,16 +1032,20 @@ class Facture
|
|||||||
$prod = new Product($this->db, $fk_product);
|
$prod = new Product($this->db, $fk_product);
|
||||||
$prod->fetch($fk_product);
|
$prod->fetch($fk_product);
|
||||||
$product_desc = $prod->description;
|
$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
|
// multiprix
|
||||||
if($conf->global->PRODUIT_MULTIPRICES == 1)
|
if($conf->global->PRODUIT_MULTIPRICES == 1)
|
||||||
{
|
{
|
||||||
$soc = new Societe($this->db);
|
|
||||||
$soc->fetch($this->socidp);
|
|
||||||
$pu = $prod->multiprices[$soc->price_level];
|
$pu = $prod->multiprices[$soc->price_level];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$pu=$prod->price;
|
$pu=$prod->price;
|
||||||
$txtva=$prod->tva_tx;
|
|
||||||
}
|
}
|
||||||
$price = $pu;
|
$price = $pu;
|
||||||
$subprice = $pu;
|
$subprice = $pu;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user