From 5bbee220a232a82ad702c5514f0835964dcea6e5 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 8 Aug 2024 09:58:19 +1000 Subject: [PATCH] Add payment balance as an accessible variable --- app/Utils/HtmlEngine.php | 2 ++ lang/en/texts.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 69a782ea02a3..2af143290827 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -507,7 +507,9 @@ class HtmlEngine $data['$client.lang_2'] = ['value' => optional($this->client->language())->locale, 'label' => '']; + $data['$client.balance'] = ['value' => Number::formatMoney($this->client->balance, $this->client), 'label' => ctrans('texts.account_balance')]; + $data['$client.payment_balance'] = ['value' => Number::formatMoney($this->client->payment_balance, $this->client), 'label' => ctrans('texts.payment_balance_on_file')]; $data['$client_balance'] = ['value' => Number::formatMoney($this->client->balance, $this->client), 'label' => ctrans('texts.account_balance')]; $data['$paid_to_date'] = ['value' => Number::formatMoney($this->entity->paid_to_date, $this->client), 'label' => ctrans('texts.paid_to_date')]; diff --git a/lang/en/texts.php b/lang/en/texts.php index 9df051a9cd38..6a1dcd6af06a 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -5312,6 +5312,8 @@ $lang = array( 'process_date' => 'Process Date', 'forever_free' => 'Forever Free', 'comments_only' => 'Comments Only', + 'payment_balance_on_file' => 'Payment Balance On File', + ); return $lang;