-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
[vouchers] error moving between summary and cart pages #11117
Merged
mkllnk
merged 24 commits into
openfoodfoundation:master
from
rioug:10857-voucher-error-moving-between-summary-and-cart-take2
Aug 9, 2023
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
04bbea5
Move voucher processing out of checkout controller
Matt-Yorkley 60c0c54
Update create_adjustment to create with an amount of 0
rioug 87790b2
Fix VoucherAdjustmentsService.calculate so we can call it mutiple time
rioug 366cca7
Prevent voucher adjustment from bein updated when update is called
rioug ca7dcb8
Apply voucher after transitionning to the confirmation step
rioug edabc56
Add voucher calculation after updating an order
rioug a8062e9
Add a scenario to make sure voucher adjustment a recalculated
rioug 789ce39
Fixing Rubocop errors
rioug 751056b
As per review comment, spell out voucher code when entering a voucher
rioug 4127119
Per review, Makes quantity change more explicit
rioug 3d9542f
Per review, rename amount to adjustment_amount
rioug 5a59396
Remove call to VoucherAdjustmentService when creating a voucher
rioug 0e0850e
Add specs to cover re calculation
rioug a584f9a
Refactor VoucherAdjustmentsService
rioug a5b2bc6
Per review, Refactor VoucherAdjustmentsService
rioug 895f534
Remove unnecessary extra page load
dacook be1a727
Pending spec: vouchers should not require payment
dacook ef62fb8
Check if record actually saved
dacook f35001d
Update voucher adjustment and order total when adding a voucher
rioug 33ef8de
Update order total after removing a voucher
rioug 089d2b9
Clear any existing payment and payment fees when adding a voucher
rioug 2857930
Fix voucher adjustment request spec
rioug 85adb9f
Fix rubocop warning
rioug 6ed35f4
Per review, delete only incomplete payments
rioug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Sorry but I have to ask, is this potentially clearing records of actual payments?
I'm guessing at this point the payments (and indeed order) are in an "incomplete" state, so it's ok to delete. But perhaps we should add a scope just in case? Eg:
I looked at the Payment model and expected to see a
before_destroy
for this but didn't. Maybe it should be there..@mkllnk do you have any insights?