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

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.
This commit is contained in:
MatthewHana 2023-09-01 00:20:38 +10:00 committed by GitHub
parent 28377fa730
commit 86258f17aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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')];