VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: gba on September 29, 2016, 16:00:47 PM

Title: [SOLVED] Wrong selection in revenue report
Post by: gba on September 29, 2016, 16:00:47 PM
Hi!

I noticed a while ago, that the revenue report seems to display wrong data:
1) Using interval 'daily' the period from i.e. 01.07.2016 to 31.07.2016 ignores orders from 01.07.2016. To consider also these orders the period must be from 30.06.2016 to 31.07.2016.
2) When I filter 'shipped' orders, only, no data is displayed, although there ARE orders with status 'shipped'. At the same time 'confirmed' orders are displayed on days, where no ones are - there are the 'shipped' orders instead.
These issues seem to persist in v3.0.18.

Can anyone confirm these issues?

Kind regards,
Gerald
Title: Re: Wrong selection in revenue report
Post by: gba on December 01, 2016, 14:34:11 PM
Hi all!

Did anyone try that at all?

Kind regards,
Gerald
Title: Re: Wrong selection in revenue report
Post by: Studio 42 on December 01, 2016, 17:22:40 PM
The report do not give right total using periods.
Only using "product"  period give you the right report.
Title: Re: Wrong selection in revenue report
Post by: gba on December 05, 2016, 10:03:38 AM
Hi!

Thank you for replying!
Also with 'Product' as interval I have the same behaviour.

Kind regards,
Gerald
Title: Re: Wrong selection in revenue report
Post by: gba on December 05, 2016, 17:14:22 PM
Hi!

Solutions:
1) VM team fixed this.
2) The product items in my orders had another status than the orders itself due to a mean PHP related issue in VM core. The report is based on product data, not on order data. Therefore I got the results like I described above. I'll have to update the status of all products according to each order's status. SQL will do the trick.

Kind regards,
Gerald
Title: Re: [SOLVED] Wrong selection in revenue report
Post by: Milbo on December 06, 2016, 00:55:58 AM
Or in other words, the revenue report is based on the orderstatus of the order items!

gba wrote a small component to update the order status which worked not correct due a small bug in the core. This bug has no impact for the core function but people using the function.

The php error was that a 0 int losely compared (==) with a string results in a positive. So the order items were not updated.