Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLD-6851: dashboard "year to date" #71

Closed
cpaschen opened this issue Oct 21, 2012 · 1 comment
Closed

OLD-6851: dashboard "year to date" #71

cpaschen opened this issue Oct 21, 2012 · 1 comment

Comments

@cpaschen
Copy link
Member

Description

dashboard "year to date"

Dashboard.patch (1 kB) Alessandro Manfré, 03/06/2012 12:56 pm
Dashboard_2.patch (803 Bytes) Alessandro Manfré, 03/07/2012 01:25 am

History

#9 Updated by Chris DioscouriChris Paschen. 8 months ago

Target version changed from Version 0.9.0 - Major Core Fixes to Version 0.9.3 - Admin Interface Cleanup

I'm not sure where this stands; however, I'm going to move this to the admin-clean-up round so that it can be addressed more directly.

If it gets resolved before then we can included it, but I think it might be good to wait until then to address with all the other admin-side stuff.

#8 Updated by Chris DioscouriChris Paschen. 8 months ago

Status changed from Needs Testing to Requires Feedback
Assignee changed from Chris DioscouriChris Paschen. to Lukas Polak

#7 Updated by Alessandro Manfré 8 months ago

Sorry Lukas, but doesn't work fine as you fixed

$model->setState( 'filter_date_to', $database->loadResult().' 00:00:00' );

I tried also the following format, but doesn't work

$model->setState( 'filter_date_to', $database->loadResult().' 00:00:00' );

My solution works fine, beacuse $start_ts is already setted to "00:00:00" and when you add 1 mounth with ADDATE your final date is shifted correctly, then adjusting time to current time zone is done in the model.

$model->setState( 'filter_date_to', $database->loadResult() );

#6 Updated by Lukas Polak 8 months ago

Status changed from Requires Feedback to Needs Testing
Assignee changed from Lukas Polak to Chris DioscouriChris Paschen.

Good catch! I overlooked that. But, I still need to append " 00:00:00" at the end of end_ts because SQL function ADDDATE strips time from $start_ts.

Lukas

#5 Updated by Alessandro Manfré 8 months ago

Assignee changed from Alessandro Manfré to Lukas Polak

#4 Updated by Alessandro Manfré 8 months ago

File Dashboard_2.patch added

Sorry Chris for may missing

the problem was double adjusting the time to current time zone

I investigated and found that the adjusting is already done in the TiendaModel Order ( function _buildQueryWhere(&$query))

Please Luck have a look my last patch updated

#3 Updated by Lukas Polak 8 months ago

Resolution set to Fixed
Documentation Status set to Unnecessary

Alessandro, i investigated your code and found out that both versions of the code have bugs - our current code and your patch as well. So i fixed them, but your code gave me the idea to fix it :) Since sql function ADDDATE returns only date, I needed to add a time at end of its result and adjust the time to your current time zone. Thanks for the hint on this :)

Cheers!
Lukas

#2 Updated by Chris DioscouriChris Paschen. 8 months ago

Category set to Admin - Configuration
Status changed from New to Requires Feedback
Assignee set to Alessandro Manfré
Target version set to Version 0.9.0 - Major Core Fixes

Alesssandro,

I'm not sure I understand why you made these changes?

Esp. why you removed the variable and 'hard coded' the data.
It would appear to be much easier to maintain (and more efficient, considering you're using this twice) to keep the variable.

Please explain what the problem was and what your fix does.

#1 Updated by Alessandro Manfré 8 months ago

File Dashboard.patch added

Alessandro Manfré wrote:

dashboard "year to date"

Associated revisions

Revision 2464

Added by Lukas Polak 8 months ago

small adjustment on dashboard view in back-end -refs #6851

Revision 2459

Added by Lukas Polak 8 months ago

fixed marginal dates in dashboard in this year statistics - refs #6851

@ChrisFrench
Copy link
Member

as far as I can tell Rafael fixed this when the removed fusion charts in favor of highroller charts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants