1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for refunded payment

This commit is contained in:
David Bomba 2022-03-14 15:22:19 +11:00
parent c1bf578658
commit 172e5be31e
2 changed files with 2 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class EmailRefundPayment implements ShouldQueue
App::setLocale($this->contact->preferredLocale());
$t->replace(Ninja::transformTranslations($this->settings));
$template_data['body'] = ctrans('texts.refunded_payment') . ' $amount <br><br>$invoices';
$template_data['body'] = ctrans('texts.refunded_payment') . ' $payment.refunded <br><br>$invoices';
$template_data['subject'] = ctrans('texts.refunded_payment');
$email_builder = (new PaymentEmailEngine($this->payment, $this->contact, $template_data))->build();

View File

@ -143,6 +143,7 @@ class PaymentEmailEngine extends BaseEmailEngine
$data['$payment.number'] = &$data['$number'];
$data['$entity'] = ['value' => '', 'label' => ctrans('texts.payment')];
$data['$payment.amount'] = ['value' => Number::formatMoney($this->payment->amount, $this->client) ?: '&nbsp;', 'label' => ctrans('texts.amount')];
$data['$payment.refunded'] = ['value' => Number::formatMoney($this->payment->refunded, $this->client) ?: '&nbsp;', 'label' => ctrans('texts.refund')];
$data['$amount'] = &$data['$payment.amount'];
$data['$payment.date'] = ['value' => $this->translateDate($this->payment->date, $this->client->date_format(), $this->client->locale()), 'label' => ctrans('texts.payment_date')];
$data['$transaction_reference'] = ['value' => $this->payment->transaction_reference, 'label' => ctrans('texts.transaction_reference')];