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

Ignore refunded amounts when calculating gross total. #2817

Merged
merged 1 commit into from Aug 21, 2019

Conversation

@jeffstieler
Copy link
Contributor

commented Aug 20, 2019

Fixes #2650

Ignore negative values for gross_total when SUM()ing for Orders and Revenue reports.

Screenshots

Before

Screen Shot 2019-08-20 at 11 57 15 AM

After

Screen Shot 2019-08-20 at 11 56 35 AM

Detailed test instructions:

  • Create a new order. Note the gross and net revenue amounts
  • Go to the revenue report, set date range to "Today"
  • Note the appropriate values in the Gross and Net summary numbers
  • Return to the order detail screen and refund the order in full
  • Go back to the revenue report, set date range to "Today"
  • Note the the appropriate value appearing in the refunds summary number
  • Note the appropriate net revenue value (should be zero)
  • Note that Gross revenue has not changed

Changelog Note:

Fix: gross order total calculation.

@jeffstieler jeffstieler requested a review from woocommerce/wc-admin Aug 20, 2019

@jeffstieler jeffstieler added this to In Progress PRs (for automation purposes) in wc-admin via automation Aug 20, 2019

@rrennick
Copy link
Collaborator

left a comment

@jeffstieler Nice work :shipit:

@jeffstieler jeffstieler merged commit 6509bb8 into master Aug 21, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

wc-admin automation moved this from In Progress PRs (for automation purposes) to Done Sprint 23 (August 13 - August 26) Aug 21, 2019

@LevinMedia

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

🎉 Thanks @jeffstieler !

@jeffstieler jeffstieler deleted the fix/2650-refunded-orders-gross-total branch Aug 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.