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

fix(core): send the correct amount to refundOrder #2559

Merged

Conversation

alexisvigoureux
Copy link
Contributor

Description

Fix issue #2523 related to #2302

Issue: The amount received by the refundOrder function is 0
After investigation, orderPlacedQuantity is always 0 here

As explained in the documentation, the order is persisted later, and overrides the value set in each orderLine update.
So, this PR defines the correct value for orderPlacedQuantity of each orderLines when the order is placed to have the right value at persistence.

Work done in pairs with @ttournie 🙏

Screenshots

Capture d’écran 2023-11-30 à 17 59 33

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

⚡ Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Copy link

netlify bot commented Nov 30, 2023

Deploy Preview for effervescent-donut-4977b2 ready!

Name Link
🔨 Latest commit 1bf3a60
🔍 Latest deploy log https://app.netlify.com/sites/effervescent-donut-4977b2/deploys/6569c597a4c97f000890ce53
😎 Deploy Preview https://deploy-preview-2559--effervescent-donut-4977b2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@alexisvigoureux alexisvigoureux changed the title fix(core): send the correct amount to refundOrder on cancelled OrderLines fix(core): send the correct amount to refundOrder Dec 1, 2023
@michaelbromley
Copy link
Member

Hi, thanks for the PR!

It looks like this change is causing some e2e test failures though - can you look into that?

@alexisvigoureux
Copy link
Contributor Author

It should be good
The mysql e2e test is in error but a retry should fix it (I am not allowed to do it) because the error is not related to the fix Error: listen EADDRINUSE: address already in use :::3012

@michaelbromley michaelbromley merged commit b5a265f into vendure-ecommerce:master Dec 4, 2023
16 of 17 checks passed
@michaelbromley
Copy link
Member

Yeah the e2e tests flake out sometimes on port conflicts. Thanks for this impactful fix!

@alexisvigoureux alexisvigoureux deleted the fix-refund-qtt branch December 4, 2023 09:34
alexisvigoureux added a commit to alexisvigoureux/vendure that referenced this pull request Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants