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'] .