Re: Decimal Doesnt Work
Reply #1 –
@guchan what you are doing is not a calculation when dealing with strings in javascript, it is concatenation. If you want to do calculations you will have to use the javascript parseFloat() for decimal numbers or parseInt() for integers. Read more here parseFloat() - JavaScript | MDN (mozilla.org) and here parseInt() - JavaScript | MDN (mozilla.org).
Example
$gross_sales = parseFloat($eftpos) + parseFloat($app_payment) + parseFloat($discount) + parseFloat($cash);