Date of a period not saved at table reports

  • Posts: 46
  • Thank you received: 0
  • Hikashop Business
12 years 1 month ago #68056

Hi,
I like to view all the sales per 3 months. When I select the start date 2012-07-01 00:00 and end date 2012-10-01 00:00 and save the row it displays € 0,00, but I know that I've sold a lot more. When I edit that certain row, I see that the dates are changed to 1970-01-01 01:33.
When I choose for the option "This Year", there is an amount displayed, but when I calculate all orders manually, the amount differs form the automatic calculated amount. (maybe it also adds the deleted orders, which are not displayed anymore).
Also in the edit screen for the report an other amount is displayed than at the dashboard.
I hope this can be solved.
Kind Regards,

Remko Rijpkema
www.edsmusic.nl

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
12 years 1 month ago #68162

Hi,

Please do a screenshot of your report option screen so that we can see what you did.

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

  • Posts: 46
  • Thank you received: 0
  • Hikashop Business
12 years 1 month ago #68355

I have made a video which shows the problem. When you watch it at full screen in HD it must be clear.... I hope... B)
Link to video: www.youtube.com/watch?v=RZuVTmEISyE

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

  • Posts: 2334
  • Thank you received: 403
12 years 1 month ago #68605

Hi Remko,

Indeed, it seems we had an issue there :)
Please find attached a fixed version of the widget.php file and replace the old one with this one in administrator\components\com_hikashop\classes. This will solve the value and date problem.
You'll also found a view.html.php file which has to be put in administrator\components\com_hikashop\views\report. it will solve the problem of different display on the dashboard and edit page.

About the last message you have, I've never seen this before so if the fix doesn't change anything please PM me an access to your backend.


File Attachment:

File Name: widget_201...04-2.zip
File Size:16 KB

Attachments:

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

  • Posts: 46
  • Thank you received: 0
  • Hikashop Business
12 years 1 month ago #68649

Hi Eliot,
The date problem is fixed! :) Thanks!
Now it's possible for me to notice the next problem :( .
I want to view the total amount of the sales per 3 months. When I take the sum of all orders in month 7, 8 and 9. The widget shows an other amount then the amount calculated bij myself. Even when I do not use any filters, there is a difference.

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

  • Posts: 46
  • Thank you received: 0
  • Hikashop Business
12 years 1 month ago #68653

Ah... I think I know which amount is displayed. It comes close to the sum the total order amount excl. shipping and excl. tax in the selected period.
Is it possible to view the total order amount incl. tax and shipping?
I also like to view the total amount of tax (of products, shipping, payment). So I can split the total incl. and excl. tax for a selected period.

Another thing is that everytime I edit a report, the report switches activate to "NO". After I changed something I have to activate the report again.

Last edit: 12 years 1 month ago by Remko.

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
12 years 1 month ago #68817

In that widget.php file, can you try to change the line:
$theSum='prod.order_product_price*prod.order_product_quantity';

to:
$theSum='a.order_full_price';

and remove the line:
$leftjoin[] = ' LEFT JOIN '.hikashop_table('order_product').' AS prod ON a.order_id=prod.order_id ';

That should allow it to use the full total for the widget.

For the total without tax, there is also no option for it and the modification is a bit more complex.
Maybe by replacing the line:
$theSum='prod.order_product_price*prod.order_product_quantity';

by:
$theSum='a.order_full_price-a.order_shipping_tax-(select sum(prod.order_product_tax*prod.order_product_quantity) from '.hikashop_get('order.product').' as prod where prod.order_id=prod.order_id)';

and removing the line:
$leftjoin[] = ' LEFT JOIN '.hikashop_table('order_product').' AS prod ON a.order_id=prod.order_id ';

I think that the best would be to have a new option to select which type of calculation would be used in a future version of HikaShop.

I'll let Eliot look at the publishing issue when he will be back, next week as it's not a pressing issue.

Last edit: 12 years 1 month ago by nicolas.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum