Get external contacts ids instead of BILLING contacts ids.
This commit is contained in:
parent
4ad1f81ea9
commit
748be12da2
@ -77,8 +77,8 @@ class Proposals extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
// Add billing contacts ids
|
||||
$this->propal->billing_contacts_ids = $this->propal->liste_contact(-1,'external',1,'BILLING');
|
||||
// Add external contacts ids
|
||||
$this->propal->contacts_ids = $this->propal->liste_contact(-1,'external',1);
|
||||
|
||||
$this->propal->fetchObjectLinked();
|
||||
return $this->_cleanObjectDatas($this->propal);
|
||||
@ -159,8 +159,8 @@ class Proposals extends DolibarrApi
|
||||
$obj = $db->fetch_object($result);
|
||||
$proposal_static = new Propal($db);
|
||||
if($proposal_static->fetch($obj->rowid)) {
|
||||
// Add billing contacts ids
|
||||
$proposal_static->billing_contacts_ids = $proposal_static->liste_contact(-1,'external',1,'BILLING');
|
||||
// Add external contacts ids
|
||||
$proposal_static->contacts_ids = $proposal_static->liste_contact(-1,'external',1);
|
||||
$obj_ret[] = $this->_cleanObjectDatas($proposal_static);
|
||||
}
|
||||
$i++;
|
||||
|
||||
@ -76,8 +76,8 @@ class Orders extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
// Add billing contacts ids
|
||||
$this->commande->billing_contacts_ids = $this->commande->liste_contact(-1,'external',1,'BILLING');
|
||||
// Add external contacts ids
|
||||
$this->commande->contacts_ids = $this->commande->liste_contact(-1,'external',1);
|
||||
$this->commande->fetchObjectLinked();
|
||||
return $this->_cleanObjectDatas($this->commande);
|
||||
}
|
||||
@ -161,8 +161,8 @@ class Orders extends DolibarrApi
|
||||
$obj = $db->fetch_object($result);
|
||||
$commande_static = new Commande($db);
|
||||
if($commande_static->fetch($obj->rowid)) {
|
||||
// Add billing contacts ids
|
||||
$commande_static->billing_contacts_ids = $commande_static->liste_contact(-1,'external',1,'BILLING');
|
||||
// Add external contacts ids
|
||||
$commande_static->contacts_ids = $commande_static->liste_contact(-1,'external',1);
|
||||
$obj_ret[] = $this->_cleanObjectDatas($commande_static);
|
||||
}
|
||||
$i++;
|
||||
|
||||
@ -81,8 +81,8 @@ class Invoices extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
// Add billing contacts ids
|
||||
$this->invoice->billing_contacts_ids = $this->invoice->liste_contact(-1,'external',1,'BILLING');
|
||||
// Add external contacts ids
|
||||
$this->invoice->contacts_ids = $this->invoice->liste_contact(-1,'external',1);
|
||||
$this->invoice->fetchObjectLinked();
|
||||
return $this->_cleanObjectDatas($this->invoice);
|
||||
}
|
||||
@ -178,8 +178,8 @@ class Invoices extends DolibarrApi
|
||||
$invoice_static->totaldeposits = $invoice_static->getSumDepositsUsed();
|
||||
$invoice_static->remaintopay = price2num($invoice_static->total_ttc - $invoice_static->totalpaid - $invoice_static->totalcreditnotes - $invoice_static->totaldeposits, 'MT');
|
||||
|
||||
// Add billing contacts ids
|
||||
$invoice_static->billing_contacts_ids = $invoice_static->liste_contact(-1,'external',1,'BILLING');
|
||||
// Add external contacts ids
|
||||
$invoice_static->contacts_ids = $invoice_static->liste_contact(-1,'external',1);
|
||||
|
||||
$obj_ret[] = $this->_cleanObjectDatas($invoice_static);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user