-
Notifications
You must be signed in to change notification settings - Fork 132
[Woo POS] Calculate and Display Order Totals on Totals Screen #11720
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
Conversation
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
…-being-created' into 11694-woo-pos-totals-view
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #11720 +/- ##
============================================
- Coverage 40.24% 40.22% -0.02%
Complexity 5331 5331
============================================
Files 1132 1132
Lines 65288 65317 +29
Branches 9056 9057 +1
============================================
Hits 26273 26273
- Misses 36594 36623 +29
Partials 2421 2421 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good progress @backwardstruck! I added some improvement ideas. Let me know what you think.
...merce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsViewModel.kt
Outdated
Show resolved
Hide resolved
...merce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsViewModel.kt
Outdated
Show resolved
Hide resolved
...merce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsViewModel.kt
Outdated
Show resolved
Hide resolved
Thanks for the feedback @samiuelson This is now updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Looks good @backwardstruck! I proposed a few more improvements that you can consider implementing though.
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsState.kt
Outdated
Show resolved
Hide resolved
...merce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsViewModel.kt
Outdated
Show resolved
Hide resolved
…home/totals/WooPosTotalsState.kt Make immutable Co-authored-by: Samuel Urbanowicz <samiuelson@gmail.com>
…home/totals/WooPosTotalsViewModel.kt Use IllegalStateException Co-authored-by: Samuel Urbanowicz <samiuelson@gmail.com>
Closes: #11694
Description
Implements the calculation and display of order totals on the Totals screen. After order ID is passed from the cart screen to the totals screen, the relevant order data is retrieved from the database, and then the totals (subtotal and tax) are calculated and displayed.
PR is based on PR #11717, which should be merged first.Follow up work to clean up UI and formatting will be done in this ticket:
[Woo POS] Update Totals View UI with Subtotals from Cart Total
Steps to reproduce
Testing information
Scenarios to test:
Devices tested:
Images/gif
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.