From d76edb0fce8bd4a372e7b763b05fe6c275711c31 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 31 Jan 2017 14:27:43 +0200 Subject: [PATCH] Fix for custom fields in invoice templates --- app/Services/TemplateService.php | 8 ++++---- .../views/accounts/templates_and_reminders.blade.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Services/TemplateService.php b/app/Services/TemplateService.php index e250e9a35ece..1644ea95aced 100644 --- a/app/Services/TemplateService.php +++ b/app/Services/TemplateService.php @@ -61,10 +61,10 @@ class TemplateService '$viewButton' => Form::emailViewButton($invitation->getLink(), $invoice->getEntityType()).'$password', '$paymentLink' => $invitation->getLink('payment').'$password', '$paymentButton' => Form::emailPaymentButton($invitation->getLink('payment')).'$password', - '$customClient1' => $account->custom_client_label1, - '$customClient2' => $account->custom_client_label2, - '$customInvoice1' => $account->custom_invoice_text_label1, - '$customInvoice2' => $account->custom_invoice_text_label2, + '$customClient1' => $client->custom_value1, + '$customClient2' => $client->custom_value2, + '$customInvoice1' => $invoice->custom_text_value1, + '$customInvoice2' => $invoice->custom_text_value2, '$documents' => $documentsHTML, '$autoBill' => empty($data['autobill']) ? '' : $data['autobill'], '$portalLink' => $invitation->contact->link, diff --git a/resources/views/accounts/templates_and_reminders.blade.php b/resources/views/accounts/templates_and_reminders.blade.php index 752ec7e21bab..71affd4a6e7d 100644 --- a/resources/views/accounts/templates_and_reminders.blade.php +++ b/resources/views/accounts/templates_and_reminders.blade.php @@ -148,7 +148,7 @@
  • $customInvoice1
  • @endif @if ($account->custom_invoice_text_label2) -
  • $customInvoice1
  • +
  • $customInvoice2
  • @endif @if (count($account->account_gateways) > 0) @foreach (\App\Models\Gateway::$gatewayTypes as $type)