diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index b546cf235fb..ae3aee082f5 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -594,7 +594,7 @@ if ($action == 'edit' || $action == 'updateedit')
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
print "
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)." ";
print '';
- print "";
+ print '';
print "".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)." ";
$example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code);
print ($example!="LocalTax1IsUsedExample"?"".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)." \n":"");
@@ -602,8 +602,8 @@ if ($action == 'edit' || $action == 'updateedit')
{
print ''.$langs->trans("LTRate").' : ';
$formcompany->select_localtax(1,$conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1");
+ print ' ';
}
- print '';
$opcions=array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"),$langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"),$langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"));
@@ -614,7 +614,7 @@ if ($action == 'edit' || $action == 'updateedit')
print "\n";
$var=!$var;
- print " global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)." ";
+ print " global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)." ";
print '';
print "";
print "".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)." ";
@@ -639,14 +639,14 @@ if ($action == 'edit' || $action == 'updateedit')
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option
print " global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)." ";
print '';
- print "";
+ print '';
print "".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)." ";
$example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code);
print ($example!="LocalTax2IsUsedExample"?"".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)." \n":"");
- print ''.$langs->trans("LTRate").' : ';
if(! isOnlyOneLocalTax(2))
{
- $formcompany->select_localtax(2,$conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2");
+ print ''.$langs->trans("LTRate").' : ';
+ $formcompany->select_localtax(2,$conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2");
print ' ';
}
print ''.$langs->trans("CalcLocaltax").' : ';
@@ -656,7 +656,7 @@ if ($action == 'edit' || $action == 'updateedit')
print " \n";
$var=!$var;
- print " global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)." ";
+ print " global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)." ";
print '';
print "";
print "".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)." ";
@@ -988,7 +988,7 @@ else
/*
* Local Taxes
*/
- if ($mysoc->useLocalTax(1))
+ if ($mysoc->useLocalTax(1)) // True if we found at least on vat with a setup adding a localtax 1
{
// Local Tax 1
print ' ';
@@ -1028,7 +1028,7 @@ else
print "\n";
$var=!$var;
- print " global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)." ";
+ print " global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)." ";
print '';
print "";
print "".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)." ";
@@ -1039,7 +1039,7 @@ else
print "
";
}
- if ($mysoc->useLocalTax(2))
+ if ($mysoc->useLocalTax(2)) // True if we found at least on vat with a setup adding a localtax 1
{
// Local Tax 2
print ' ';
@@ -1080,7 +1080,7 @@ else
print " \n";
$var=!$var;
- print " global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)." ";
+ print " global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)." ";
print '';
print "";
print "".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)." ";