05-25-2023, 11:51 PM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
PHP 8.0 The pain that must be endured.
Hi every,
Due to work requirements, I am now compelled to use WebERP in a PHP8 environment, which has caused many issues. I have managed to solve some problems on my own, but there are still many that I can't resolve. Therefore, I kindly request assistance here. I will gradually present my questions, hoping that you can help me find solutions.
Thank you!
Alex
1-When put customer receipt:
It seems to be a time format issue. Tim made changes to this file before, and it used to work fine. However, later on, there were date format errors appearing on other functional pages.
The error messages mentioned above don't seem to affect the functionality at the moment.
|
|
05-28-2023, 07:52 AM,
(This post was last modified: 05-28-2023, 07:53 AM by ALEXSHEN.)
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
RE: PHP 8.0 The pain that must be endured.
Finally, I found a solution:
1- In DateFunctions.inc, modify line 19
$DateEntry = trim($DateEntry ?? "");
to avoid having a NULL value.
2- Similarly, in MiscFunctions.php, modify line 284
return number_format(floatval($Number), $DecimalPlaces ?? 2, $DecimalPoint, $ThousandsSeparator);
to avoid having NULL as the value for $DecimalPlaces.
Of course, currently, I am just personally experimenting, and I don't know if it could cause any other harm, so please proceed with caution when trying these solutions.
|
|
05-28-2023, 08:02 AM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
RE: PHP 8.0 The pain that must be endured.
In General Ledger -> Bank Account Payments Entry
Got error again
Deprecated: Creation of dynamic property Payment::$Paymenttype is deprecated in /www/wwwroot/erp-trade/webERP/Payments.php on line 185
|
|
05-30-2023, 11:17 PM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
RE: PHP 8.0 The pain that must be endured.
(05-29-2023, 04:18 AM)ALEXSHEN Wrote: New Problem:
When I selected Purchases->Purchase Order, the following error occurs again:
Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC, purchorders.realorderno, suppliers.suppname, purchorde' at line 25 in /erp/includes/ConnectDB_mysqli.inc:58 Stack trace: #0 /erp/includes/ConnectDB_mysqli.inc(58): mysqli_query() #1 /erp/PO_SelectOSPurchOrder.php(589): DB_query() #2 {main} thrown in /erp/includes/ConnectDB_mysqli.inc on line 58
I made some modifications to PO_SelectOSPurchOrder.php, and it seems to be functioning fine now. I'm uploading it here, and if anyone is interested, they can cautiously give it a try.
PO_SelectOSPurchOrder.php (Size: 28.13 KB / Downloads: 0)
|
|
07-27-2023, 06:31 PM,
|
|
dalescott
Senior Member
|
Posts: 107
Threads: 23
Joined: Sep 2016
|
|
RE: PHP 8.0 The pain that must be endured.
Congrats on your progress! How did you resolve cury braces in tcpdf, barcodepack and PHPExcel?
http://www.dalescott.net
|
|
08-04-2023, 06:46 AM,
|
|
ALEXSHEN
Senior Member
|
Posts: 132
Threads: 34
Joined: Sep 2019
|
|
RE: PHP 8.0 The pain that must be endured.
Because I don't use many features of this ERP system, my previous plan was to solve one problem at a time as I encountered them during operation. If I encountered two problems, I would solve them both. However, as I delved deeper, I realized that there were many areas that needed modification and adjustment. That's why I didn't release any new updates later on. My current plan is to cover all the functionalities I'm using and then upload the results.
Currently, I have only made some minor adjustments to the tcPDF and PHPExcel parts, and I haven't worked on BarcodePack because I have been adjusting it based on my own needs. So, I have been solving problems one by one, and it may not be very comprehensive. Once I have completed all the adjustments, I will list the modifications I made according to my own requirements. But I estimate that it will take a long time.
|
|
|