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

Sales report does not include events after 23:23:59 on the last day of a date range #2858

Open
brianhogg opened this issue Jan 23, 2025 · 0 comments
Assignees
Labels
Status: Has PR This issue has an open pull request

Comments

@brianhogg
Copy link
Contributor

brianhogg commented Jan 23, 2025

Reproduction Steps

  1. Place an order at 23:30 (or anytime after 23:23:59)
  2. Under LifterLMS > Reporting, "Sales" tab, enter a from date in the past, and to date of today

Expected Behavior

Things like "Net Sales" and "# of sales" includes the transaction

Actual Behavior

The transaction is not included.

Tech notes

We're setting the date to "23:23:59" instead of "23:59:59" in our query

protected function format_date( $date, $type ) {
switch ( $type ) {
case 'start':
$date .= ' 00:00:00';
break;
case 'end':
$date .= ' 23:23:59';
break;
}
return $date;
}

We likely want to query for less than 00:00:00 on the day after as per this thread.

@ideadude ideadude moved this to Awaiting Triage in Development Jan 23, 2025
@ideadude ideadude self-assigned this Jan 23, 2025
@brianhogg brianhogg added the Status: Has PR This issue has an open pull request label Jan 24, 2025
@brianhogg brianhogg assigned brianhogg and unassigned ideadude Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Has PR This issue has an open pull request
Projects
Status: Awaiting Triage
Development

No branches or pull requests

2 participants