mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 21:04:28 -04:00
Fixes for importing payments in CSVs, do not apply payments to Zero amount invoices
This commit is contained in:
parent
347f10caa6
commit
954692ce6d
@ -293,6 +293,9 @@ class CSVImport implements ShouldQueue {
|
||||
],
|
||||
];
|
||||
|
||||
/* Make sure we don't apply any payments to invoices with a Zero Amount*/
|
||||
if($invoice->amount > 0)
|
||||
{
|
||||
$payment_repository->save(
|
||||
$payment_data,
|
||||
PaymentFactory::create( $this->company->id, $invoice->user_id, $invoice->client_id )
|
||||
@ -300,6 +303,7 @@ class CSVImport implements ShouldQueue {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->actionInvoiceStatus( $invoice, $invoice_data, $invoice_repository );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user