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:
Lars Bo Rasmussen 2015-02-09 03:16:21 +01:00
parent 2f80865cd4
commit 439edffe20

View File

@ -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) {