Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

Error when refunding to store credit #47

Closed
andrelundsett opened this issue Jan 6, 2017 · 5 comments
Closed

Error when refunding to store credit #47

andrelundsett opened this issue Jan 6, 2017 · 5 comments

Comments

@andrelundsett
Copy link

We sometimes create credit memos for orders paid with credit card, with the refund going to store credit. In this case the tax is successfully reported to Avatax, but the extension gets into trouble when updating the order after talking to Avatax, and we see this message in the queue:

"Record was sent to AvaTax, but error occurred after sending record: Could not save credit memo PREVIOUS ERROR: You can't use more store credit than the order amount.”

This seems like a bug, as it should be a legitimate use case to refund to store credit even if the order was not paid with store credit.

See screenshots:

image

image

@erikhansen
Copy link
Contributor

@andrelundsett I wanted to let you know that we are working on this issue. Unfortunately in order to solve this issue, we're having to rework how we're saving some data on invoices and credit memos, so it's taking a while to resolve. I don't have an ETA for you, but a fix is in the works.

In the meantime, if you need a workaround, let me know and we can provide a patch.

@erikhansen
Copy link
Contributor

erikhansen commented Apr 17, 2017

@andrelundsett I know it's been several months since you reported this issue, but we've finally refactored the module to avoid this situation from occurring. I just merged the fix (#55) into develop and am wondering whether you'd be willing to test it to confirm that your issues goes away when using code from the develop branch?

@Jazzercise
Copy link

The fix works perfectly in my testing!

I noticed 'avatax_is_unbalanced' and 'base_avatax_tax_amount' have been moved out from sales_invoice/sales_creditmemo tables to the new tables avatax_sales_invoice/avatax_sales_creditmemo. Was that done in this fix? We have a couple of custom reports which use those attributes, so I'll need to make sure I coordinate updates to those reports to when we deploy the avatax update to production.

@erikhansen
Copy link
Contributor

@Jazzercise Glad this works for you! Yes, those columns have been moved into their own tables. See the 0.4.0 release notes here for details on what has changed: https://github.com/classyllama/ClassyLlama_AvaTax/blob/develop/CHANGELOG.md

@erikhansen
Copy link
Contributor

@Jazzercise We just updated the documentation to cover how "unbalanced" information is being stored: https://www.classyllama.com/documentation/extensions/avatax-magento-2-module#avatax-queue-unbalanced Let me know if you have any questions.

Also, I officially tagged a 0.4.0 release, so closing this task.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants