Fix substitution of thirdparty
This commit is contained in:
parent
3f4d7dbce6
commit
46d28deee7
@ -5479,12 +5479,12 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
|
||||
$substitutionarray['__MEMBER_PHONEPRO__']=$msgishtml?dol_htmlentitiesbr($object->phone_perso):$object->phone_perso;
|
||||
$substitutionarray['__MEMBER_PHONEMOBILE__']=$msgishtml?dol_htmlentitiesbr($object->phone_mobile):$object->phone_mobile;
|
||||
|
||||
if ($object->element == 'societe')
|
||||
if (is_object($object) && $object->element == 'societe')
|
||||
{
|
||||
$substitutionarray['__THIRDPARTY_ID__'] = (is_object($object)?$object->id:'');
|
||||
$substitutionarray['__THIRDPARTY_NAME__'] = (is_object($object)?$object->name:'');
|
||||
}
|
||||
if (is_object($object->thirdparty) && $object->thirdparty->id > 0)
|
||||
elseif (is_object($object->thirdparty) && $object->thirdparty->id > 0)
|
||||
{
|
||||
$substitutionarray['__THIRDPARTY_ID__'] = (is_object($object->thirdparty)?$object->thirdparty->id:'');
|
||||
$substitutionarray['__THIRDPARTY_NAME__'] = (is_object($object->thirdparty)?$object->thirdparty->name:'');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user