FIX 12.0 - third party of object is not always fetched when initiating the e-mail presend action (e.g. from an order)

This commit is contained in:
Florian Mortgat 2020-10-21 23:19:29 +02:00
parent 6bba249935
commit 509819c119

View File

@ -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) {