Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong refund total in createRefund method #890

Closed
chladog opened this issue May 24, 2021 · 2 comments
Closed

wrong refund total in createRefund method #890

chladog opened this issue May 24, 2021 · 2 comments
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@chladog
Copy link
Contributor

chladog commented May 24, 2021

Describe the bug
When modifying an order to lower amount with need of a refund then in UI in the preview change and later on in the history entry it shows correct refund amount but the actual value passed to createRefund function differs and doesn't match the calculated total which then results in wrong amount being refunded and impossibile transition from "Modifying" to PaymentSettled due to: "Cannot transition Order to the "PaymentSettled" state when the total is not covered by settled Payments"
I have console logged the "amount" parameter in the payment handler createRefund function and there is the wrong amount coming in.

pvp

Note to say that we have promotion on such order (though the preview window showed correct calculation of everything).

Environment (please complete the following information):

  • @vendure/core version: v1.0.0
@chladog chladog added the type: bug 🐛 Something isn't working label May 24, 2021
@chladog
Copy link
Contributor Author

chladog commented May 24, 2021

could it be related to this? (was the problem/update applied for refunds as well?) 1795f48

@michaelbromley
Copy link
Member

I can reproduce this class of error when the order has a promotion applied, and without a promotion it works as expected. Looks like I missed some code path on the modification logic. Fixing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants