2
0
forked from Wavyzz/dolibarr

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

@@ -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 $local LocalTax
* @param int $selected Preselected value * @param int $selected Preselected value
* @param varchar $htmlname HTML select name * @param varchar $htmlname HTML select name
* @return void
*/ */
function select_localtax($local, $selected, $htmlname) function select_localtax($local, $selected, $htmlname)
{ {
@@ -798,10 +799,14 @@ class FormCompany
{ {
//montar select //montar select
print '<select class="flat" name="'.$htmlname.'">'; print '<select class="flat" name="'.$htmlname.'">';
while($i <= (count($valors))-1){ while ($i <= (count($valors))-1)
if ($selected == $valors[$i]){ {
if ($selected == $valors[$i])
{
print '<option value="'.$valors[$i].'" selected="selected">'; print '<option value="'.$valors[$i].'" selected="selected">';
}else{ }
else
{
print '<option value="'.$valors[$i].'">'; print '<option value="'.$valors[$i].'">';
} }
print $valors[$i]; print $valors[$i];
@@ -809,7 +814,6 @@ class FormCompany
$i++; $i++;
} }
print'</select>'; print'</select>';
} }
} }
} }

View File

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