Closed (fixed)
Project:
Ubercart
Version:
5.x-1.8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Aug 2009 at 15:26 UTC
Updated:
2 Nov 2009 at 20:30 UTC
Jump to comment: Most recent file
This patch: http://drupal.org/files/issues/uc_reports.fixups.1.x.3.patch, attached to this issue: http://drupal.org/node/344890 (Timezone causes off-by-one error in reports) breaks the Sales Summary Report.
It causes the Sales data for Month to date, Daily average and Projected totals to be calculated on a month which starts today, instead of a month which starts on the first of this month.
Sorry, I don't have CVS, but the error is in uc_reports_sales_summary():
// Get the sales report for the month.
$month = _uc_reports_get_sales($today_start, 'month');
$month_title = format_date($today_start, 'custom', 'M Y');
now needs to be:
// Get the sales report for the month.
$month = _uc_reports_get_sales($month_start, 'month');
$month_title = format_date($month_start, 'custom', 'M Y');
...because the code in _uc_reports_get_sales() has changed.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | sales_summary_month_fix.patch | 603 bytes | rszrama |
Comments
Comment #1
kingandyConfirmed, we were experiencing the behaviour described above and this change fixes it.
FWIW, I don't have CVS either, but the fix applies to lines 759 and 760 of uc_reports.module (as of version 5.x-1.8).
Comment #2
rszrama commentedLooks like this was fixed in the D6 branch and never back-ported. Patch attached, thanks!