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 transactions from Orders (or subscriptions) that are not Active, Completed or Refunded #2860

Open
brianhogg opened this issue Jan 24, 2025 · 1 comment
Assignees
Labels
Status: Has PR This issue has an open pull request

Comments

@brianhogg
Copy link
Contributor

brianhogg commented Jan 24, 2025

Reproduction Steps

  1. On a store with a subscription Order placed in the past that has been placed or renewed this month, go to LifterLMS > Reporting, "Sales" tab
  2. Click Toggle Filters and select the Membership or Course for the Order
  3. Choose a date range that covers one or more transactions for the Order and click Apply Filters
  4. In a separate tab, edit the Order and set the status to "Pending Cancellation"
  5. In the tab with Reporting, click Apply Filters again or refresh the page

Expected Behavior

"Net Sales" and "# of sales" amounts stays the same

Actual Behavior

"Net Sales" is reduced by the amount of the transaction(s) in the date range associated with that Order. If the original Order is in the date range, the "# of sales" is reduced by one.

Tech Notes

"# of sales" only gets orders with status "Active" (subscription) or "Completed" (one-time). If the order status gets set to Refunded even if the transaction(s) haven't been, they're not included.

"Net Sales" gets orders with status "Active" "Completed" or "Refunded"

Since transactions have the status llms-txn-succeeded and llms-txn-refunded I don't think we need to filter by status at all on Orders. We should include transactions with both llms-txn-succeeded and llms-txn-refunded since a partially refunded transaction currently has the status set to llms-txn-refunded

We may want to add a new "# of transactions" widget for the number of non-refunded transactions (including renewals) vs. new sales (when the subscription was set up) in a given period.

@ideadude ideadude moved this to Awaiting Triage in Development Jan 24, 2025
@ideadude ideadude self-assigned this Jan 24, 2025
@brianhogg
Copy link
Contributor Author

New ticket for the case when a transaction is partially refunded, but the entire amount of the transaction is removed from "Net Sales"?

@brianhogg brianhogg added the Status: Has PR This issue has an open pull request label Jan 24, 2025
@brianhogg brianhogg moved this from Awaiting Triage to Awaiting Review in Development 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 Review
Development

No branches or pull requests

2 participants