Log in
Model

CanInvoice

Magento\Sales\Model\Order\Validation\CanInvoice

What it does

This validator class determines whether an order can have an invoice created for it.

Developers use this class to check if an order's state allows invoicing (not canceled, complete, on hold, etc.) and if there are any items remaining that can be invoiced.

It returns validation messages if the order cannot be invoiced, helping prevent invalid invoice creation attempts.

Public Methods

  • validate()