Merge pull request #15091 from ATM-Consulting/fix/12.0_object_thirdparty_not_always_fetched_on_presend_action_from_order

FIX 12.0 - third party of object is not always fetched when initiating an e-mail presend form
This commit is contained in:
Laurent Destailleur 2020-10-22 15:43:31 +02:00 committed by GitHub
commit 9775728b7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,6 +180,9 @@ if ($action == 'presend')
}
else
{
if (!empty($object->socid) && empty($object->thirdparty) && method_exists($object, 'fetch_thirdparty')) {
$object->fetch_thirdparty();
}
if (is_object($object->thirdparty))
{
foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value) {