Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sales Report2 for v2.3.1


joe122joe

Recommended Posts

Hello,
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?

Joe
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...