Invalid floating point number (v2020)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
SOHIB
User
Posts: 93

Invalid floating point number (v2020)

Post by SOHIB »

Hello All
I have this error is displayed when I submit the page,
I have there fields
number1 is double(define in table) and evaluated as float
number 2 is double(define in table) and evaluated as float
number3 is double(define in table) which is the difference between number1 and number2 and evaluated as float
this error is came from field number3
how I can fix it ,


arbei
User
Posts: 9288

Post by arbei »

How did you set the value of number3 in the page? Was it in correct format as other numbers?


SOHIB
User
Posts: 93

Post by SOHIB »

Thank you for replay
whose 3 number was generated by the system and the errors came from number3 all setting for the 3 numbers on the page is same
number is:111٬000
number2 is:555٬000
number3 is:‏-444٬000


arbei
User
Posts: 9288

Post by arbei »

Why is the negative sign after the number? What is your locale (language ID)? How did you calculate? You may post your code table schema and SQL for discussion.


SOHIB
User
Posts: 93

Post by SOHIB »

my language details: version="16.0.0" id="ar" name="Arabic"

here is the code :which is in startup script for add page

$("#x_curr1").change(function()
{
if($(this).val() !="YR")
	{
	$("#x_rate1").val(0);
	$("#x_ovfcurr1").val(0);
$('#x_rate1').on("change", function(){
$ov1=$("#x_ov1").toNumber();
$r1=$("#x_rate1").toNumber();
$tot1=$ov1*$r1;
$("#x_ovfcurr1").val($tot1);
////////cahnge total
	$ovh1=$("#x_ovfcurr1").toNumber();
	$ovh2=$("#x_ovfcurr2").toNumber();
	$ovh3=$("#x_ovfcurr3").toNumber();
	$ovh4=$("#x_ovfcurr4").toNumber();
	$ovh5=$("#x_ovfcurr5").toNumber();
		 //
	$ovh6=$("#x_ovfcurr6").toNumber();
	$ovh7=$("#x_ovfcurr7").toNumber();
	$ovh8=$("#x_ovfcurr8").toNumber();
	$ovh9=$("#x_ovfcurr9").toNumber();
	$ovh10=$("#x_ovfcurr10").toNumber();
		//
	$ovh11=$("#x_ovfcurr11").toNumber();
	$ovh12=$("#x_ovfcurr12").toNumber();
	$ovh13=$("#x_ovfcurr13").toNumber();
	$ovh14=$("#x_ovfcurr14").toNumber();
	$ovh15=$("#x_ovfcurr15").toNumber();
	//
	$ovh16=$("#x_ovfcurr16").toNumber();
	$ovh17=$("#x_ovfcurr17").toNumber();
	$ovh18=$("#x_ovfcurr18").toNumber();
	$ovh19=$("#x_ovfcurr19").toNumber();
	$ovh20=$("#x_ovfcurr20").toNumber();
	//
$tot1=$ovh1+$ovh2+$ovh3+$ovh4+$ovh5+$ovh6+$ovh7+$ovh8+$ovh9+$ovh10+$ovh11+$ovh12+$ovh13+$ovh14+$ovh15+$ovh16+$ovh17+$ovh18+$ovh19+$ovh20;
$("#x_ovshow").val($tot1);
	$ov=$("#x_ovshow").toNumber();
	$fh=$("#x_fhshow").toNumber();
	$diff=$ov-$fh;
	$("#x_diffshow").val($diff);
////////end
});
	}//IF CURR=SR OR USD

Post Reply