-
-
Notifications
You must be signed in to change notification settings - Fork 707
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] Percentage rate #10821
[Vouchers] Percentage rate #10821
Commits on Aug 11, 2023
-
Add specs to cover re calculation
It is important that the calculated voucher adjustments don't change if they are recalculated and it is equally important that they are updated if the order has changed
Configuration menu - View commit details
-
Copy full SHA for 1be8daa - Browse repository at this point
Copy the full SHA 1be8daaView commit details -
And update related specs voucher_type doesn't do anything for now.
Configuration menu - View commit details
-
Copy full SHA for 619285a - Browse repository at this point
Copy the full SHA 619285aView commit details -
Configuration menu - View commit details
-
Copy full SHA for cc9069e - Browse repository at this point
Copy the full SHA cc9069eView commit details -
Add calculation for percentage voucher
It include calculation for order with taxes included in the price
Configuration menu - View commit details
-
Copy full SHA for cdb33aa - Browse repository at this point
Copy the full SHA cdb33aaView commit details -
Finish calculation for percentage voucher
Add calculation when tax is not included in price
Configuration menu - View commit details
-
Copy full SHA for 70bd714 - Browse repository at this point
Copy the full SHA 70bd714View commit details -
Add system specs for percentage based voucher
Similar to tax included in price scenario, adds a test for percentage based voucher to check the adjustments are recalculated when needed. Plus fix tax incluced in price specs to use new factory
Configuration menu - View commit details
-
Copy full SHA for 959e230 - Browse repository at this point
Copy the full SHA 959e230View commit details -
Refactor voucher: 1 base voucher class
Refactor voucher to use a single table inheritance. It will simplify the code and remove a bunch of conditional
Configuration menu - View commit details
-
Copy full SHA for 204f393 - Browse repository at this point
Copy the full SHA 204f393View commit details -
Configuration menu - View commit details
-
Copy full SHA for def594a - Browse repository at this point
Copy the full SHA def594aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 46e04ca - Browse repository at this point
Copy the full SHA 46e04caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 29a3846 - Browse repository at this point
Copy the full SHA 29a3846View commit details -
Refactor VoucherAdjustment service
We are taking advantage of having a FlatRate and a PercentageRate model to simplify the code a little
Configuration menu - View commit details
-
Copy full SHA for 2828bd0 - Browse repository at this point
Copy the full SHA 2828bd0View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8b374d - Browse repository at this point
Copy the full SHA e8b374dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f63cfb - Browse repository at this point
Copy the full SHA 3f63cfbView commit details -
Per review , Simplify creation of Voucher
We now check against known type to instanciate the correct voucher instead of using a case
Configuration menu - View commit details
-
Copy full SHA for e6b53c0 - Browse repository at this point
Copy the full SHA e6b53c0View commit details -
Co-authored-by: David Cook <david@redcliffs.net>
Configuration menu - View commit details
-
Copy full SHA for 054eac0 - Browse repository at this point
Copy the full SHA 054eac0View commit details -
Per review, clean up voucher specs
Add explicit 'order.item_total' to make specs more readable
Configuration menu - View commit details
-
Copy full SHA for 9c9a623 - Browse repository at this point
Copy the full SHA 9c9a623View commit details -
Add a comment around the use of safe_constantize
It triggers a Brakeman error that can be safely ignored
Configuration menu - View commit details
-
Copy full SHA for a2def24 - Browse repository at this point
Copy the full SHA a2def24View commit details