mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2026-03-03 02:57:01 +00:00
Catch missing invoices not returned
This commit is contained in:
@@ -828,6 +828,11 @@ class TemplateService
|
|||||||
|
|
||||||
foreach ($refund['invoices'] as $refunded_invoice) {
|
foreach ($refund['invoices'] as $refunded_invoice) {
|
||||||
$invoice = Invoice::withTrashed()->find($refunded_invoice['invoice_id']);
|
$invoice = Invoice::withTrashed()->find($refunded_invoice['invoice_id']);
|
||||||
|
|
||||||
|
if (!$invoice) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$amount = Number::formatMoney($refunded_invoice['amount'], $payment->client);
|
$amount = Number::formatMoney($refunded_invoice['amount'], $payment->client);
|
||||||
$notes = ctrans('texts.status_partially_refunded_amount', ['amount' => $amount]);
|
$notes = ctrans('texts.status_partially_refunded_amount', ['amount' => $amount]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user