mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Multi payment invoices with filtering of already paid invoices
This commit is contained in:
parent
accbbcf67b
commit
75b089fa19
@ -142,7 +142,7 @@ class InvoiceController extends Controller
|
||||
'invoices' => $invoices,
|
||||
'formatted_total' => $formatted_total,
|
||||
'payment_methods' => $payment_methods,
|
||||
'hashed_ids' => $ids,
|
||||
'hashed_ids' => $invoices->pluck('hashed_ids'),
|
||||
'total' => $total,
|
||||
];
|
||||
|
||||
|
@ -103,9 +103,14 @@ class PaymentController extends Controller
|
||||
|
||||
$amount = $invoices->sum('balance');
|
||||
|
||||
$invoices->filter(function ($invoice){
|
||||
$invoices = $invoices->filter(function ($invoice){
|
||||
return $invoice->isPayable();
|
||||
})->map(function ($invoice){
|
||||
});
|
||||
|
||||
if($invoices->count() == 0)
|
||||
return back()->with(['warning' => 'No payable invoices selected']);
|
||||
|
||||
$invoices->map(function ($invoice){
|
||||
$invoice->balance = Number::formatMoney($invoice->balance, $invoice->client);
|
||||
$invoice->due_date = $this->formatDate($invoice->due_date, $invoice->client->date_format());
|
||||
return $invoice;
|
||||
|
Loading…
Reference in New Issue
Block a user