Merge pull request #4640 from beganovich/v5-fix-pay-now-button-on-invoices-page

(v5) Show the feedback message if invoice is unpayable
This commit is contained in:
David Bomba 2021-01-07 07:28:29 +11:00 committed by GitHub
commit 942bcb2e5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -77,7 +77,9 @@ class InvoiceController extends Controller
return $this->downloadInvoicePDF((array) $transformed_ids);
}
return redirect()->back();
return redirect()
->back()
->with('message', ctrans('texts.no_action_provided'));
}
private function makePayment(array $ids)
@ -93,7 +95,8 @@ class InvoiceController extends Controller
});
if ($invoices->count() == 0) {
return back()->with(['warning' => 'No payable invoices selected']);
return back()
->with('message', ctrans('texts.no_payable_invoices_selected'));
}
$invoices->map(function ($invoice) {

View File

@ -3363,4 +3363,7 @@ return [
'endless' => 'Endless',
'minimum_payment' => 'Minimum Payment',
'no_action_provided' => 'No action provided. If you believe this is wrong, please contact the support.',
'no_payable_invoices_selected' => 'No payable invoices selected. Make sure you are not trying to pay draft invoice or invoice with zero balance due.',
];