Merge pull request #198 from mchev/invoice_cancellation

Support for Zero and Negative Item Quantities on Invoices
This commit is contained in:
mchev
2024-11-02 11:24:09 +01:00
committed by Darko Gjorgjijoski
parent e1a0a2d8e4
commit 967c225df9
7 changed files with 148 additions and 23 deletions

View File

@@ -374,7 +374,7 @@ class Invoice extends Model implements HasMedia
return 'customer_cannot_be_changed_after_payment_is_added';
}
if ($request->total < $total_paid_amount) {
if ($request->total >= 0 && $request->total < $total_paid_amount) {
return 'total_invoice_amount_must_be_more_than_paid_amount';
}