mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 17:54:30 -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,10 +293,14 @@ class CSVImport implements ShouldQueue {
|
||||
],
|
||||
];
|
||||
|
||||
$payment_repository->save(
|
||||
$payment_data,
|
||||
PaymentFactory::create( $this->company->id, $invoice->user_id, $invoice->client_id )
|
||||
);
|
||||
/* 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 )
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user