mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Made it possible to add negative payments.
Needed when making an invoice with a negative amount. The usecase for this is that in denmark you are not allowed to change an invoice once it has been filed. So to change an invoice or cancel it, it is required to create a creditnote. The system allows this but does not let you enter a negative payment for an invoice(creditnote in this case) which is a mistake.
This commit is contained in:
parent
2f80865cd4
commit
439edffe20
@ -68,7 +68,7 @@ class PaymentRepository
|
|||||||
$rules = array(
|
$rules = array(
|
||||||
'client' => 'required',
|
'client' => 'required',
|
||||||
'invoice' => 'required',
|
'invoice' => 'required',
|
||||||
'amount' => 'required|positive',
|
'amount' => 'required',
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($input['payment_type_id'] == PAYMENT_TYPE_CREDIT) {
|
if ($input['payment_type_id'] == PAYMENT_TYPE_CREDIT) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user