Fix scrutinizer
This commit is contained in:
parent
b14c04a8f0
commit
2c2544d471
@ -135,8 +135,13 @@ class Proposals extends DolibarrApi
|
||||
}
|
||||
|
||||
// Add external contacts ids.
|
||||
$this->propal->contacts_ids = $this->propal->liste_contact(-1, 'external', $contact_list);
|
||||
$tmparray = $this->propal->liste_contact(-1, 'external', $contact_list);
|
||||
if (is_array($tmparray)) {
|
||||
$this->propal->contacts_ids = $tmparray;
|
||||
}
|
||||
|
||||
$this->propal->fetchObjectLinked();
|
||||
|
||||
return $this->_cleanObjectDatas($this->propal);
|
||||
}
|
||||
|
||||
@ -228,7 +233,10 @@ class Proposals extends DolibarrApi
|
||||
$proposal_static = new Propal($this->db);
|
||||
if ($proposal_static->fetch($obj->rowid)) {
|
||||
// Add external contacts ids
|
||||
$proposal_static->contacts_ids = $proposal_static->liste_contact(-1, 'external', 1);
|
||||
$tmparray = $proposal_static->liste_contact(-1, 'external', 1);
|
||||
if (is_array($tmparray)) {
|
||||
$proposal_static->contacts_ids = $tmparray;
|
||||
}
|
||||
$obj_ret[] = $this->_cleanObjectDatas($proposal_static);
|
||||
}
|
||||
$i++;
|
||||
|
||||
@ -133,7 +133,10 @@ class Orders extends DolibarrApi
|
||||
}
|
||||
|
||||
// Add external contacts ids
|
||||
$this->commande->contacts_ids = $this->commande->liste_contact(-1, 'external', $contact_list);
|
||||
$tmparray = $this->commande->liste_contact(-1, 'external', $contact_list);
|
||||
if (is_array($tmparray)) {
|
||||
$this->commande->contacts_ids = $tmparray;
|
||||
}
|
||||
$this->commande->fetchObjectLinked();
|
||||
|
||||
// Add online_payment_url, cf #20477
|
||||
@ -234,7 +237,10 @@ class Orders extends DolibarrApi
|
||||
$commande_static = new Commande($this->db);
|
||||
if ($commande_static->fetch($obj->rowid)) {
|
||||
// Add external contacts ids
|
||||
$commande_static->contacts_ids = $commande_static->liste_contact(-1, 'external', 1);
|
||||
$tmparray = $commande_static->liste_contact(-1, 'external', 1);
|
||||
if (is_array($tmparray)) {
|
||||
$commande_static->contacts_ids = $tmparray;
|
||||
}
|
||||
// Add online_payment_url, cf #20477
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||
$commande_static->online_payment_url = getOnlinePaymentUrl(0, 'order', $commande_static->ref);
|
||||
|
||||
@ -148,7 +148,10 @@ class Invoices extends DolibarrApi
|
||||
|
||||
// Add external contacts ids
|
||||
if ($contact_list > -1) {
|
||||
$this->invoice->contacts_ids = $this->invoice->liste_contact(-1, 'external', $contact_list);
|
||||
$tmparray = $this->invoice->liste_contact(-1, 'external', $contact_list);
|
||||
if(is_array($tmparray)) {
|
||||
$this->invoice->contacts_ids = $tmparray;
|
||||
}
|
||||
}
|
||||
|
||||
$this->invoice->fetchObjectLinked();
|
||||
@ -267,8 +270,10 @@ class Invoices extends DolibarrApi
|
||||
$invoice_static->remaintopay = price2num($invoice_static->total_ttc - $invoice_static->totalpaid - $invoice_static->totalcreditnotes - $invoice_static->totaldeposits, 'MT');
|
||||
|
||||
// Add external contacts ids
|
||||
$invoice_static->contacts_ids = $invoice_static->liste_contact(-1, 'external', 1);
|
||||
|
||||
$tmparray = $invoice_static->liste_contact(-1, 'external', 1);
|
||||
if (is_array($tmparray)) {
|
||||
$invoice_static->contacts_ids = $tmparray;
|
||||
}
|
||||
$obj_ret[] = $this->_cleanObjectDatas($invoice_static);
|
||||
}
|
||||
$i++;
|
||||
@ -1768,7 +1773,10 @@ class Invoices extends DolibarrApi
|
||||
|
||||
// Add external contacts ids
|
||||
if ($contact_list > -1) {
|
||||
$this->template_invoice->contacts_ids = $this->template_invoice->liste_contact(-1, 'external', $contact_list);
|
||||
$tmparray = $this->template_invoice->liste_contact(-1, 'external', $contact_list);
|
||||
if (is_array($tmparray)) {
|
||||
$this->template_invoice->contacts_ids = $tmparray;
|
||||
}
|
||||
}
|
||||
|
||||
$this->template_invoice->fetchObjectLinked();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user