mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
Fixes when importing invoices with associated payments. Ensure we use the correct applied amount
This commit is contained in:
parent
ff9539a1b8
commit
951e460c5a
@ -39,7 +39,7 @@ class StorePaymentRequest extends Request
|
||||
public function prepareForValidation()
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
nlog($input);
|
||||
$invoices_total = 0;
|
||||
$credits_total = 0;
|
||||
|
||||
|
@ -368,7 +368,7 @@ class BaseImport
|
||||
$payment_data['invoices'] = [
|
||||
[
|
||||
'invoice_id' => $invoice->id,
|
||||
'amount' => $payment_data['amount'] ?? null,
|
||||
'amount' => min($invoice->amount, $payment_data['amount']) ?? null,
|
||||
],
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user