Fix bad contact used
This commit is contained in:
parent
12409e944c
commit
f2e24ed96e
@ -1192,7 +1192,7 @@ abstract class CommonObject
|
|||||||
$sql.= " AND ec.fk_c_type_contact = tc.rowid";
|
$sql.= " AND ec.fk_c_type_contact = tc.rowid";
|
||||||
$sql.= " AND tc.element = '".$element."'";
|
$sql.= " AND tc.element = '".$element."'";
|
||||||
$sql.= " AND tc.source = '".$source."'";
|
$sql.= " AND tc.source = '".$source."'";
|
||||||
$sql.= " AND tc.code = '".$code."'";
|
if ($code) $sql.= " AND tc.code = '".$code."'";
|
||||||
$sql.= " AND tc.active = 1";
|
$sql.= " AND tc.active = 1";
|
||||||
if ($status) $sql.= " AND ec.statut = ".$status;
|
if ($status) $sql.= " AND ec.statut = ".$status;
|
||||||
|
|
||||||
|
|||||||
@ -110,7 +110,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Issuer
|
* Issuer
|
||||||
* @var Company object that emits
|
* @var Societe object that emits
|
||||||
*/
|
*/
|
||||||
public $emetteur;
|
public $emetteur;
|
||||||
|
|
||||||
@ -1306,9 +1306,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// If BILLING contact defined on order, we use it
|
// If CUSTOMER contact defined on order, we use it. Note: Even if this is a supplier object, the code for external contat that follow object is 'CUSTOMER'
|
||||||
$usecontact=false;
|
$usecontact=false;
|
||||||
$arrayidcontact=$object->getIdContact('external','BILLING');
|
$arrayidcontact=$object->getIdContact('external','CUSTOMER');
|
||||||
if (count($arrayidcontact) > 0)
|
if (count($arrayidcontact) > 0)
|
||||||
{
|
{
|
||||||
$usecontact=true;
|
$usecontact=true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user