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.

CommentFileSizeAuthor
#2 sales_summary_month_fix.patch603 bytesrszrama

Comments

kingandy’s picture

Version: 5.x-1.7 » 5.x-1.8

Confirmed, 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).

rszrama’s picture

Status: Active » Fixed
StatusFileSize
new603 bytes

Looks like this was fixed in the D6 branch and never back-ported. Patch attached, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.