solidusio / solidus_avatax

Avatax integration with Solidus
BSD 3-Clause "New" or "Revised" License
5 stars 23 forks source link

Set pre_tax_amount to discounted_amount instead of 0 #17

Closed jordan-brough closed 8 years ago

jordan-brough commented 8 years ago

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.

richardnuno commented 8 years ago

:+1: