modif pour assujetis tva ou pas

This commit is contained in:
Andre Cianfarani 2006-02-21 13:06:19 +00:00
parent ddbe04c72a
commit 0859d3be89
2 changed files with 13 additions and 4 deletions

View File

@ -829,7 +829,10 @@ if ($_GET['propalid'] > 0)
}
print '<textarea name="desc" cols="50" rows="'.ROWS_2.'">'.stripslashes($objp->description).'</textarea></td>';
print '<td align="right">';
print $html->select_tva("tva_tx",$objp->tva_tx,$mysoc,$societe);
if($societe->tva_assuj == "0")
print '<input type="hidden" name="tva_tx" value="0">0';
else
print $html->select_tva("tva_tx",$objp->tva_tx,$mysoc,$societe);
print '</td>';
print '<td align="right"><input size="6" type="text" name="subprice" value="'.price($objp->subprice).'"></td>';
print '<td align="right"><input size="2" type="text" name="qty" value="'.$objp->qty.'"></td>';
@ -890,7 +893,10 @@ if ($_GET['propalid'] > 0)
print '<tr '.$bc[$var].">\n";
print '<td><textarea cols="50" name="np_desc" rows="'.ROWS_2.'"></textarea></td>';
print '<td align="center">';
$html->select_tva('np_tva_tx', $conf->defaulttx, $mysoc, $societe);
if($societe->tva_assuj == "0")
print '<input type="hidden" name="np_tva_tx" value="0">0';
else
$html->select_tva('np_tva_tx', $conf->defaulttx, $mysoc, $societe);
print "</td>\n";
print '<td align="right"><input type="text" size="5" name="np_price"></td>';
print '<td align="right"><input type="text" size="2" value="1" name="qty"></td>';

View File

@ -154,10 +154,14 @@ class Propal
if ($prod->fetch($idproduct) > 0)
{
$p_product_desc = $prod->description;
$this -> fetch_client();
if($this->client->tva_assuj == "0")
$txtva ="0";
else
$txtva=$prod->tva_tx;
// multiprix
if($conf->global->PRODUIT_MULTIPRICES == 1)
{
$this -> fetch_client();
$price = price2num($prod->multiprices[$this->client->price_level]);
$subprice = price2num($prod->multiprices[$this->client->price_level]);
}
@ -166,7 +170,6 @@ class Propal
$price = price2num($prod->price);
$subprice = price2num($prod->price);
}
$txtva = $prod->tva_tx;
/*
*/