Skip to content

Conversation

kidinov
Copy link
Contributor

@kidinov kidinov commented Oct 17, 2025

WOOMOB-1533

Description

Adds refund information to the historical orders details screen in Woo POS. The order details now display individual refund line items and calculate net payment (total paid minus refunds).

Changes:

  • Added WooPosGetOrderRefundsByOrderId utility to fetch refund data for orders
  • Updated OrderDetailsViewState.TotalsBreakdown to include refunds list and net payment
  • Modified WooPosOrdersViewModel to fetch and format refund amounts
  • Updated WooPosOrderDetails UI to display refunds and net payment sections
  • Added string resources for "Refunded" and "Net Payment" labels

Note: The UI layout is not final and will be refined in subsequent iterations.

Steps to reproduce

  1. Open Woo POS
  2. Navigate to Historical Orders
  3. Select an order that has refunds
  4. Observe the order details screen showing:
    • Total paid with payment method
    • Individual refund line items (if any)
    • Net payment calculation (if refunds exist)

Testing information

  • Verified orders without refunds display correctly (no refund section shown)
  • Verified orders with single refund show refund amount and net payment
  • Verified orders with multiple refunds show all refunds separately
  • Confirmed refund amounts are formatted with negative signs
  • Confirmed net payment calculation is correct (total - sum of refunds)

Images/gif

image
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@kidinov kidinov added this to the 23.6 milestone Oct 17, 2025
@kidinov kidinov requested a review from toupper October 17, 2025 15:09
@kidinov kidinov marked this pull request as ready for review October 17, 2025 15:09
@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App NameWooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit80eb57c
Direct Downloadwoocommerce-wear-prototype-build-pr14779-80eb57c.apk

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit80eb57c
Direct Downloadwoocommerce-prototype-build-pr14779-80eb57c.apk

private val refundStore: WCRefundStore,
private val selectedSite: SelectedSite
) {
suspend operator fun invoke(orderId: Long): List<Refund> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider to add tests to this one if necessary

Copy link
Contributor

@toupper toupper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @kidinov! LGTM 🚢 :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants