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

Prevent second invoice creation when order is fully invoiced #6

Open
dudzio12 opened this issue Jul 8, 2021 · 1 comment
Open

Prevent second invoice creation when order is fully invoiced #6

dudzio12 opened this issue Jul 8, 2021 · 1 comment

Comments

@dudzio12
Copy link
Contributor

dudzio12 commented Jul 8, 2021

I have an issue with two invoices inside one order.
The first one created is correct - it invoiced two items and shipping amount.
The second one invoiced same two items, but without shipping amount.

In the result of this, total_due in order is the amount of shipping amount. (total_paid does not include shipping amount).

The second invoice was created 1 minute after first one.

In the first try of PayU request, Magento returned error 500 with deadlock found in Magento DB, but the invoice was created correctly.

The second try was fully successfull, but it duplicated the invoice as described above.

To fix this issue, you should add canInvoice method to prevent duplicate invoice creation and if the invoice is already created - use that one to finish request. Magento should also prevent from invoicing same items.

I'm working on this now.

@dudzio12 dudzio12 changed the title Prevent second invoice creation when order is fully invoice Prevent second invoice creation when order is fully invoiced Jul 8, 2021
@agnnow1
Copy link

agnnow1 commented May 22, 2024

How is the work progressing on this? We have a problem on the store where Magento sometimes issues two invoices in the manner described above.

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

No branches or pull requests

2 participants