bonobos/spree_avatax — pull request #23 by jordan-brough (2014-08-04 19:44:19+00:00)
Title: [DO NOT MERGE] Return Invoices

[Don't merge yet -- Specs are still in the works]

We now support calculating return invoice taxes via Avatax and recording our return invoices in Avatax.
Also starts using the SOAP API, which has more functionality to allow us a better flow.

Note: We also now need to have a "2-2-dev" branch since this stuff isn't compatible with stock spree 2.2

Flow is like this:

- Reimbursement triggers this extension in SpreeAvatax::Reimbursement.generate
- We make a call to Avatax to calculate and store an uncommitted return invoice
- We save the result as a SpreeAvatax::ReturnInvoice in the db
- The reimbursement model performs all the reimbursements and then triggers SpreeAvatax::Reimbursement.finalize
- We make a call to Avatax to mark the return invoice as committed and then update our model with committed=true