forked from Wavyzz/dolibarr
use count() instead sizeof()
This commit is contained in:
@@ -794,11 +794,11 @@ class FormCompany
|
|||||||
{
|
{
|
||||||
$valors=explode(":", $tax);
|
$valors=explode(":", $tax);
|
||||||
|
|
||||||
if(sizeof($valors)>1)
|
if(count($valors)>1)
|
||||||
{
|
{
|
||||||
//montar select
|
//montar select
|
||||||
print '<select class="flat" name="'.$htmlname.'">';
|
print '<select class="flat" name="'.$htmlname.'">';
|
||||||
while($i <= (sizeof($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{
|
||||||
|
|||||||
@@ -2896,6 +2896,7 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
|
|||||||
{
|
{
|
||||||
if ($local == 1)
|
if ($local == 1)
|
||||||
{
|
{
|
||||||
|
if(! $mysoc->localtax1_assuj) return 0;
|
||||||
if ($thirdparty_seller->id==$mysoc->id)
|
if ($thirdparty_seller->id==$mysoc->id)
|
||||||
{
|
{
|
||||||
if (! $thirdparty_buyer->localtax1_assuj) return 0;
|
if (! $thirdparty_buyer->localtax1_assuj) return 0;
|
||||||
@@ -2908,7 +2909,7 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
|
|||||||
|
|
||||||
if ($local == 2)
|
if ($local == 2)
|
||||||
{
|
{
|
||||||
|
if(! $mysoc->localtax2_assuj) return 0;
|
||||||
if ($thirdparty_seller->id==$mysoc->id )
|
if ($thirdparty_seller->id==$mysoc->id )
|
||||||
{
|
{
|
||||||
if (! $thirdparty_buyer->localtax2_assuj) return 0;
|
if (! $thirdparty_buyer->localtax2_assuj) return 0;
|
||||||
@@ -3002,7 +3003,7 @@ function isOnlyOneLocalTax($local)
|
|||||||
|
|
||||||
$valors=explode(":", $tax);
|
$valors=explode(":", $tax);
|
||||||
|
|
||||||
if(sizeof($valors)>1)
|
if(count($valors)>1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user