Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
The order is set to complete, even if one of the invoices isn't paid
Expected Behavior
The Order should not be complete yet
Steps To Reproduce
Have an Order with two Products:
Product A, and Product B
Then use a Payment method, that creates an Invoice, but doesn't directly pay it. (like Gateway methods?)
Create separate Invoices for A and for B.
Now mark one of the Invoices as Paid, but not the other.
Code piece from _checkState
:
magento-lts/app/code/core/Mage/Sales/Model/Order.php
Lines 2389 to 2397 in 394662b
Code piece from canCreditmemo
:
magento-lts/app/code/core/Mage/Sales/Model/Order.php
Lines 742 to 744 in 394662b
Because there are invoices for all Products A and B,
and getTotalPaid
is greater than 0.0001
,
the whole Order is complete, even if only one invoice is paid.
Environment
- OpenMage: 20.*
- php: 8.1
Anything else?
I'm not 100% sure if that is a bug or wanted behavior