AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
9.0.6 Commit-Tax-When-Paid not behaving properly
Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
Steps to reproduce:
1. Set tax settings to commit-when-paid and place a taxable order 2. Pay for the order 3. Check Avalara, order should now be showing as a transaction 4. Add something to the order (happens all the time to us)
At this point, the order is now 'unpaid' because adding to the order created an order balance that must be paid.
Add a payment to the order to pay it off.
This fires the commit-when-paid routine (again) which then calls the Commit() routine in Avalara (again).
The Avalara Commit(Order order) routine will try and create an uncommitted Avalara transaction. This fails with error 'DocType is invalid for the requested transaction."
The error handling sees the transaction failed, and bails out entirely.
This is what I've been trying to tell you guys. You can't just always call Commit() when an order is paid. Because there are plenty of ways for an order to become paid AFTER the order is already created as a transaction in Avalara. And Avalara is going throw back an error every single time.
The Taxes.TaxHelper.CommitTaxWhenOrderPaid(order) routine has to check to see if the order is already in Avalara as a transaction. If not, THEN do the commit because it's brand new. Otherwise you have to make the call to update the existing Avalara transaction.
The only workaround possible is using the Recalculate button. Except that's built to fire in the wrong sequence, so things get messed up a different way.
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
Thanks for pointing this out. I am also getting an error following the steps you have mentioned. I will register this issue to look for details.
|
1 user thanked shaharyar for this useful post.
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
9.0.6 Commit-Tax-When-Paid not behaving properly
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close