jmoises
Active Member
is somthing very strange happen and just cant figure out
Field Element - Tax
Field Element - Subtotal
Calc Element - Total
i am using a php function to calc the total using the subtotal and tax this is very easy and working my problem is when the user typo 0 tax (cero)
what i am doing in my total calc i use something like this to get the tax
$tax = (int)'{invoice___tax}';
if i do this in the calculation area of the total calc elelement
// simple function to validate
if($tax == '' && $tax == 0) {
echo 'empty';
var_dump($tax);exit;
}
this work great
but if i send the $tax variable to and funtion on external php file the //simple function to validate, dosent work
if i send anything other than 0 works ok but no on 0 (cero)
i how i clear and somebody can guide me.
Field Element - Tax
Field Element - Subtotal
Calc Element - Total
i am using a php function to calc the total using the subtotal and tax this is very easy and working my problem is when the user typo 0 tax (cero)
what i am doing in my total calc i use something like this to get the tax
$tax = (int)'{invoice___tax}';
if i do this in the calculation area of the total calc elelement
// simple function to validate
if($tax == '' && $tax == 0) {
echo 'empty';
var_dump($tax);exit;
}
this work great
but if i send the $tax variable to and funtion on external php file the //simple function to validate, dosent work
if i send anything other than 0 works ok but no on 0 (cero)
i how i clear and somebody can guide me.