From 86258f17aa65dd5920558f190ec9a47ea429da2a Mon Sep 17 00:00:00 2001 From: MatthewHana Date: Fri, 1 Sep 2023 00:20:38 +1000 Subject: [PATCH] Added 3 client address payment variables Added payment variables: $city / $client.city $state / $client.state $postal_code / $client.postal_code These we're available as one combined variable with either $postal_city_state or $city_state_postal, but this also makes them available separately. --- app/Mail/Engine/PaymentEmailEngine.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Mail/Engine/PaymentEmailEngine.php b/app/Mail/Engine/PaymentEmailEngine.php index d60fa8939f..e33e86f0d6 100644 --- a/app/Mail/Engine/PaymentEmailEngine.php +++ b/app/Mail/Engine/PaymentEmailEngine.php @@ -198,6 +198,12 @@ class PaymentEmailEngine extends BaseEmailEngine $data['$client.vat_number'] = &$data['$vat_number']; $data['$client.website'] = &$data['$website']; $data['$client.phone'] = &$data['$phone']; + $data['$city'] = ['value' => $this->client->city ?: ' ', 'label' => ctrans('texts.city')]; + $data['$client.city'] = &$data['$city']; + $data['$state'] = ['value' => $this->client->state ?: ' ', 'label' => ctrans('texts.state')]; + $data['$client.state'] = &$data['$state']; + $data['$postal_code'] = ['value' => $this->client->postal_code ?: ' ', 'label' => ctrans('texts.postal_code')]; + $data['$client.postal_code'] = &$data['$postal_code']; $data['$city_state_postal'] = ['value' => $this->client->present()->cityStateZip($this->client->city, $this->client->state, $this->client->postal_code, false) ?: ' ', 'label' => ctrans('texts.city_state_postal')]; $data['$client.city_state_postal'] = &$data['$city_state_postal']; $data['$postal_city_state'] = ['value' => $this->client->present()->cityStateZip($this->client->city, $this->client->state, $this->client->postal_code, true) ?: ' ', 'label' => ctrans('texts.postal_city_state')];