Post by dkv666 » Mon Nov 14, 2022 9:48 am

Error in "Reports" when selecting "Sales" - TypeError: Opencart\System\Library\Cart\Currency::format(): Argument #1 ($number) must be of type float, null given, called in E:\WWW\FPC.BY\extension\opencart\admin\controller\report\sale_order.php on line 156 in E:\WWW\FPC.BY\system\library\cart\currency.php on line 24

opencart version 4.0.1.1

How to fix:
In file - extension\opencart\admin\controller\report\sale_order.php
Line 156

Code: Select all

'tax'        => $this->currency->format($result['tax'], $this->config->get('config_currency')),
Replaced by:

Code: Select all

'tax'        => $this->currency->format((float)$result['tax'], $this->config->get('config_currency')),
Or add the value (float) before $result['tax'] , like this (float)$result['tax'] .

Newbie

Posts

Joined
Sun Sep 18, 2022 4:40 am

Post by JNeuhoff » Mon Nov 14, 2022 8:06 pm

Have you tried the master branch to see whether this issue still exists? And if it does, then please post it as a new issue on github.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 4 guests