浏览代码

MMIDocuments : fix display right soc name in contact in propal

Mathieu Moulin 1 年之前
父节点
当前提交
128f24cde5
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php

+ 3 - 3
htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php

@@ -1742,13 +1742,13 @@ class pdf_eratosthene extends ModelePDFCommandes
 				}
 
 				// Recipient name
-				if ($usecontact && ($object->contact->socid == $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
+				if ($usecontact && ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
 					$thirdparty = $object->contact;
 				} else {
 					$thirdparty = $object->thirdparty;
 				}
 
-				$carac_client_name = $recipient_type != 'MGMT' ?pdfBuildThirdpartyName($thirdparty, $outputlangs) :'';
+				$carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
 
 				$mode =  'target';
 				$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object);
@@ -1797,7 +1797,7 @@ class pdf_eratosthene extends ModelePDFCommandes
 				}
 
 				// Recipient name
-				if ($usecontact && ($object->contact->socid == $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
+				if ($usecontact && ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
 					$thirdparty = $object->contact;
 				} else {
 					$thirdparty = $object->thirdparty;