2
0
forked from Wavyzz/dolibarr

use count() instead sizeof()

This commit is contained in:
Juanjo Menent
2014-07-03 18:55:03 +02:00
parent 4c7eba0ee0
commit 24b2b83b85
2 changed files with 5 additions and 4 deletions

View File

@@ -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{

View File

@@ -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;
} }