Use gross amount in return items#706
Conversation
I believe the opposite to be true, I'm 👍 and this looks good, but we'll need to be very clear in our release notes about what the behaviour change is as it will affect admin end-users. |
|
The reason I believe that What about this as a release notes approach: |
There was a problem hiding this comment.
do we need to be worried about included_tax_total ever being nil? I'd had to nullify pre_tax_amount from included_tax_total being nil. Should we switch to WHERE pre_tax_amount is null to be safe?
There was a problem hiding this comment.
I added a safeguard clause that sets included_tax_total to 0 if NULL. The pre_tax_amount/ amount column has a NOT NULL db constraint set, so no worries on that side of the plus.
|
I'm 👍 on this, sorry, missed the feedback to my migration question. Hope the rebase isn't too brutal... cough |
I believe the notion of `pre_tax_amount` is only in the return items because someone from a sales tax country wanted to use something with additional taxes. This leads to unfortunate behaviour in VAT stores: While every other price or amount is entered including VAT, for returns a store admin has to enter the return amount excluding VAT. For most normal people, that's a complex, error-prone op, and one we shouldn't make them do. Unfortunately, this entails a lot of naming changes.
Use gross amount in return items
This PR has a close relationship with solidusio#706, and solidusio#706 was still missing a changelog entry.
I believe the notion of
pre_tax_amountis only present in the return items becausesomeone from a sales tax country wanted to use something excluding sales (additional) taxes.
This leads to unfortunate behaviour in VAT stores: While every other price or amount
is entered including VAT, for returns a store admin has to enter the return amount
excluding VAT. For most normal people, that's a complex, error-prone op, and one we
shouldn't make them do.
This PR replaces the
pre_tax_amountwith one calledamountthat behaves like theamounton line items: including included taxes, but excluding sales taxes.Unfortunately, this entails a lot of naming changes.
This ports spree/spree#6852 to Solidus.
It's one large commit because all the naming changes affects everything :(