Today value in reporting does not work

  • Posts: 165
  • Thank you received: 3
7 years 4 months ago #256473

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.4

I am trying to figure out how to get the Value of "TODAY" working for the reporting. No matter if I select TODAY in any type of reporting whether it be a table or gauge, etc it does not show the sales of just that days from 0:00 to 23:59 hours. It seems to just take whenever the last 24 hrs was when the widget was published.

How do I fix this? This does not make sense to me because there is a last 24 hrs options, I would think if you selected TODAY that it would start from the beginning of the day?

How do I fix this because the gauge and the table and using sales, it is not reporting the correct dollar amounts. For example it was 22:00 hours and the gauge was set to TODAY and days and the sales reset to 0 on the gauge when it should not have reset until 23:59:59. The only way I can get it to report "TODAY" is to set it to manual to the date range and time that I want, which I need it to be automatic.

How can this be fixed?

Thanks,

Josh

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 4 months ago #256500

Hi,

I'm not able to reproduce the problem.
And looking at the code handling that, it is fine:
take.ms/NqKkT
Could you provide a screenshot of the settings of your report ?

Please Log in or Create an account to join the conversation.

  • Posts: 165
  • Thank you received: 3
7 years 4 months ago #256561

Thank you for the response. Here is the screenshot of the settings.

Is this a possible this is a bug in version 2.6.3 of the cart? I have not upgraded to 2.6.4 because this is a big client and they have had sales going on. I have to wait until after Christmas to upgrade.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 4 months ago #256646

Hi,

I've tried to reproduce the issue with the same configuration on my end and I get that MySQL query:

SELECT DATE_FORMAT(FROM_UNIXTIME(CAST(a.order_created AS SIGNED )+0),'%Y %j') AS calculated_date, SUM(a.order_full_price) AS total,a.order_currency_id AS currency_id 
  FROM s4d38_hikashop_order AS a 
  WHERE a.order_type='sale' 
  AND a.order_created > 1480546800 
  AND a.order_created < 1480603675 
  GROUP BY calculated_date, currency_id 
  ORDER BY calculated_date DESC
the order_created checks are valid and correspond to what it is supposed to do.

I've also checked the modifications done to the reporting system since the 2.6.3 and no modifications are linked to the period calculations.
So as far as I understand, what you have is correct and updating won't help.
You must be missing something.
For example, you've set the statuses setting to all statuses, meaning that even cancelled, refunded and created orders will be taken into account while you might only want to take into account confirmed and shipped orders.
It could also be something relative to your timezone. The report system uses this code to calculate "today at 00:00":
$start= mktime(0, 0, 0, $dayBeginning[0], $dayBeginning[1], $dayBeginning[2]);
This takes into account the timezone of your server. But it doesn't take into account the timezone of your user in Joomla nor the timezone of the Joomla configuration. So it might be why you think that it does the same as "the last 24h" because the time difference you have between your server and your user fill in the gap between "the last 24h" and "today".

Please Log in or Create an account to join the conversation.

Time to create page: 0.048 seconds
Powered by Kunena Forum