When resetting tax-related values we should set pre_tax_amount to
discounted_amount instead of 0. Since solidus_avatax doesn't support
included tax this is what the value should always be set to.
This had caused problems for us during an Avatax outage when tax
attributes had been reset but never got set to a new value since
Avatax was down.
Also, reset the tax amounts on shipments as well as line items when
resetting values.
Also, add a round(2) for consistency in one spot where it was
missing.
When resetting tax-related values we should set pre_tax_amount to discounted_amount instead of 0. Since solidus_avatax doesn't support included tax this is what the value should always be set to.
This had caused problems for us during an Avatax outage when tax attributes had been reset but never got set to a new value since Avatax was down.
Also, reset the tax amounts on shipments as well as line items when resetting values.
Also, add a
round(2)
for consistency in one spot where it was missing.