Jump to content
Sign in to follow this  

Sales Report2 for v2.3.1

Recommended Posts

I used this addon  under PHP 5.6 without any issue, and after moving to PHP 7.2 its not working well, 
there is error in the log file

PHP Warning:  Division by zero in /home/admin/public_html/kirje1/includes/classes/sales_report2.php on line 175

and here is the line s from 167 - 175

      // execute the query
      $cnt = 0;
      $itemTot = 0;
      $sumTot = 0;
      while ($resp[$cnt] = tep_db_fetch_array($rqItems)) {
        // to avoid rounding differences round for every quantum
        // multiply with the number of items afterwords.
        $price = $resp[$cnt]['psum'] / $resp[$cnt]['pquant'];

 and the issue that if there is sales  and returns for some product like sold one and return one so it will be zero sales .  but it show on the report as nan€1262120795_Screenshotfrom2019-03-2219-27-.thumb.png.82ff15646c5d859e6136837e096a69c8.png


any one have same issue?


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this