From 733dc773a1054728b7ef6f81860e03dc8069ad19 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Fri, 24 Feb 2023 16:50:48 +0100 Subject: [PATCH] Small changes to int billing email layout --- .../default/Emailtemplates/order/int_billing_info.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Layout/default/Emailtemplates/order/int_billing_info.php b/Layout/default/Emailtemplates/order/int_billing_info.php index 42f431b35..4c5bbd447 100644 --- a/Layout/default/Emailtemplates/order/int_billing_info.php +++ b/Layout/default/Emailtemplates/order/int_billing_info.php @@ -23,9 +23,13 @@ .$order->owner->customer_number." - " .str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName())); */ - $subject .= $order->terminations[0]->building->network->name." - " - .$order->owner->customer_number." - " - .str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName())); + + if(is_array($order->terminations) && count($order->terminations)) { + $subject .= $order->terminations[0]->building->network->name." - "; + } + + $subject .= $order->owner->customer_number." - " + .str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName())); $this->setReturnValue([ 'subject' => $subject,