Fix: phpcs

This commit is contained in:
Laurent Destailleur
2014-07-04 14:19:03 +02:00
parent e496823778
commit 8e2999f73f
3 changed files with 36 additions and 31 deletions

View File

@@ -990,7 +990,7 @@ class Contrat extends CommonObject
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
$localtaxes_type=getLocalTaxesFromRate($txtva,0, $this->societe ,$mysoc);
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,'', $localtaxes_type);
$total_ht = $tabprice[0];
@@ -1136,7 +1136,7 @@ class Contrat extends CommonObject
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
$localtaxes_type=getLocalTaxesFromRate($tvatx,0, $this->societe ,$mysoc);
$localtaxes_type=getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc);
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtaxtx1, $txlocaltaxtx2, 0, $price_base_type, $info_bits, 1, '', $localtaxes_type);
$total_ht = $tabprice[0];

View File

@@ -778,11 +778,12 @@ class FormCompany
}
/**
* Return a select with localtax values for thirds
* Return a HTML select with localtax values for thirdparties
*
* @param int $local LocalTax
* @param int $selected Preselected value
* @param varchar $htmlname HTML select name
* @return void
*/
function select_localtax($local, $selected, $htmlname)
{
@@ -794,14 +795,18 @@ class FormCompany
{
$valors=explode(":", $tax);
if(count($valors)>1)
if (count($valors) > 1)
{
//montar select
print '<select class="flat" name="'.$htmlname.'">';
while($i <= (count($valors))-1){
if ($selected == $valors[$i]){
while ($i <= (count($valors))-1)
{
if ($selected == $valors[$i])
{
print '<option value="'.$valors[$i].'" selected="selected">';
}else{
}
else
{
print '<option value="'.$valors[$i].'">';
}
print $valors[$i];
@@ -809,7 +814,6 @@ class FormCompany
$i++;
}
print'</select>';
}
}
}

View File

@@ -3058,7 +3058,8 @@ function get_localtax_by_third($local)
*
* @param float $vatrate VAT Rate
* @param int $local Number of localtax (1 or 2, or 0 to return 1 & 2)
* @param int $thirdparty Company object
* @param int $buyer Company object
* @param int $seller Company object
* @return array array(localtax_type1(1-6 / 0 if not found), rate of localtax1, ...)
*/
function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller)