From 509819c1191293c0fbc88097d6825ac3cbbaf72a Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Wed, 21 Oct 2020 23:19:29 +0200 Subject: [PATCH] FIX 12.0 - third party of object is not always fetched when initiating the e-mail presend action (e.g. from an order) --- htdocs/core/tpl/card_presend.tpl.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 24fcaa62afa..479b4b694aa 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -180,6 +180,9 @@ if ($action == 'presend') } else { + if (!empty($object->socid) && empty($object->thirdparty)) { + $object->fetch_thirdparty(); + } if (is_object($object->thirdparty)) { foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value) {