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,10 +293,14 @@ class CSVImport implements ShouldQueue {
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
$payment_repository->save(
|
/* Make sure we don't apply any payments to invoices with a Zero Amount*/
|
||||||
$payment_data,
|
if($invoice->amount > 0)
|
||||||
PaymentFactory::create( $this->company->id, $invoice->user_id, $invoice->client_id )
|
{
|
||||||
);
|
$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