Model
CanInvoice
Magento\Sales\Model\Order\Validation\CanInvoice
What it does
This validator checks whether an invoice can be created for a Magento order.
Developers use this class to validate that an order is in an appropriate state (not canceled, complete, on hold, etc.) and has items that can still be invoiced before allowing invoice creation.
It's commonly used before processing invoice operations to prevent invalid invoice generation.
Public Methods
- validate()