DecimalQuantityNotSupportedException
extends RuntimeException
in package
FinalYes
Thrown by {@see \App\UI\Api\Invoicer\Models\Managers\CreditNoteLedger} when a line of the source invoice or credit note has a non-integer `quantity`.
The credit note ceiling ledger counts whole pieces. A silent (int) cast would undercount the
ceiling (2.5 becomes 2), the credit note would refund less and the rest would be locked forever;
an undercounted ceiling is the dangerous direction because it allows refunding twice. Until a
full decimal ledger exists, failing loudly is the only safe reaction.
A dedicated type (not a bare RuntimeException) lets callers such as
OrderCreditNoteManager::preview() catch exactly this
case and turn it into a readable Result without swallowing unrelated runtime errors.