Workbench

Fix: refunds missing from the daily sales report

Fix: refunds missing from the daily sales report

SampleDone

Refunds made after midnight were counted on the wrong day. Fixed, tried on Test and merged.

GitHub Copilot Started 11/28/2026 4:39 AM Updated 3 h ago
5 of 5 steps

Report

Cause: the report grouped sales by the server's day, which runs on UTC, so a refund made after midnight in the store counted on the day before.

Fix: refunds are counted in the store's own time zone, and a new test makes a refund at 00:30 store time and checks the day it lands on.

CheckResult
All testsPassed
A refund after midnight on TestOn the right day
Production after the mergeUpdated

Steps

  1. Find the cause in Production's logsDone
  2. Write a test that fails without the fixDone
  3. Count refunds in the store's own time zoneDone
  4. Try it on the Test environmentYouDone
  5. Merge it and publish a new versionDone

Keep in mind

Done Production runs the fix. The test keeps the bug from coming back.

Activity

  1. Merged and published. Production is updated.
  2. Merge it into main and publish a new version? That updates Production. Yes
  3. Done: Try it on the Test environment
  4. On Test now. Try a refund after midnight.
  5. Found it: the report used the server's time zone, not the store's.
Agent is not connected Limited experience