![]() |
Admin 3/4/2024 |
The code itself looks fine to me. Maybe it doesn't work with some specific values that are not numbers? How do you know that the issue is with this specific code? |
A
|
Andrew S author 3/4/2024 |
All the values are being treated as text and php8.2 no longer supports calculations this way. I am currently in the process of going through all values and converting to ints and storing in tmp variables to carry out calculations and it appears to be working so far. Just have one variable left which I am currently trying to debug. I know it is this code because I only have calculations on this page in the whole project. |
A
|
Andrew S author 3/4/2024 |
This is the code which works fine php runner 9.8 php version 5 if ($_SESSION['tmpRetention']=="Y") { } ($values['InvoiceSubTotal'] = ($values['InvoiceLabour']+$values['InvoiceMaterials'])); // Added 28th February 2021 - VAT changes if ($_SESSION['tmpVATReversal']=="Y") { ($values['InvoiceLabourTax']=($values['InvoiceLabour']*$values['LabourTAXRate'])); if ($values["InvoiceDate"]=="" || $values["InvoiceDate"]==NULL) $values["InvoiceDate"]=now(); } // Place event code here. return true; |
A
|
Andrew S author 3/5/2024 |
I setup temp variables for all values that required adding / subtracting / multiplying and settype to Interger. All now works. |