From 6cccd77508d2c41c5860bfa9098a1e7bd4b090da Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Tue, 18 May 2021 17:57:23 +0200 Subject: [PATCH 01/10] FIX 13.0 - error message says MAIN_DISABLE_ALL_MAILS is set when it isn't + unhandled swiftmailer error (failed recipients due to RFC 2822 non-compliance) --- htdocs/core/actions_massactions.inc.php | 4 +++- htdocs/core/class/CMailFile.class.php | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 6b6d5854a1d..99f1271ff0b 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -559,8 +559,10 @@ if (!$error && $massaction == 'confirm_presend') { $resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto); $resaction .= '
'.$mailfile->error.'
'; - } else { + } elseif (!empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { $resaction .= '
No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS
'; + } else { + $resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto) . '
(unhandled error)
'; } } } diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index c942127aab3..67c3387fbc8 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -894,7 +894,7 @@ class CMailFile } // send mail try { - $result = $this->mailer->send($this->message); + $result = $this->mailer->send($this->message, $failedRecipients); } catch (Exception $e) { $this->error = $e->getMessage(); } @@ -902,6 +902,9 @@ class CMailFile $res = true; if (!empty($this->error) || !$result) { + if (!empty($failedRecipients)) { + $this->error = 'Transport failed for the following addresses: "' . join('", "', $failedRecipients) . '".'; + } dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); $res = false; } else { From 5fd02992c0b636cbc55e2daee9f67a8a846f516e Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 19 May 2021 10:26:04 +0200 Subject: [PATCH 02/10] Remove forgotten echo --- htdocs/product/price.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index b783ad5c002..7a758137133 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1477,7 +1477,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul } print ''.$langs->trans("PriceBase").''; - print $conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL; + if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) print ''.$langs->trans("DefaultTaxRate").''; print ''.$langs->trans("HT").''; print ''.$langs->trans("TTC").''; From 8a9c21c642b62d74d5d80645a4d7edd904a32856 Mon Sep 17 00:00:00 2001 From: Sylvain Legrand Date: Wed, 19 May 2021 18:47:07 +0200 Subject: [PATCH 03/10] Update societe.class.php --- htdocs/societe/class/societe.class.php | 61 ++++++++++++++++++++------ 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 011dd3dcce5..3c7d642c23f 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3112,20 +3112,55 @@ class Societe extends CommonObject { // phpcs:enable if ($this->id) { - $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; - $sql .= " SET parent = ".($id > 0 ? $id : "null"); - $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this).'::set_parent', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) { - $this->parent = $id; - return 1; - } else { + // InfraS change (to avoid infinite loop) + $sameparent = $this->get_parents($id, $this->id); + if ($sameparent < 0) return -1; + elseif ($sameparent == 1) + { + setEventMessages('la maison mère choisie est déjà filiale de ce tiers', null, 'warnings'); return -1; - } - } else { - return -1; - } + } // elseif ($sameparent == 1) + else + { + $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe SET parent = '.($id > 0 ? $id : 'null').' WHERE rowid = '.$this->id; + dol_syslog(get_class($this).'::set_parent', LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $this->parent = $id; + return 1; + } // if ($resql) + else return -1; + } // else // elseif ($sameparent == 1) + } // if ($this->id) + else return -1; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Search parent commany of current company + * + * @param int $idparent Id of thirdparty to check + * @param int $idchild Id of thirdparty to compare to + * @return int <0 if KO, 0 if OK or 1 if at some level a parent company was the child to compare to + */ + public function get_parents($idparent, $idchild) + { + // phpcs:enable + $sql = 'SELECT s.parent'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; + $sql .= ' WHERE rowid = '.$idparent; + $resql = $this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + + if ($obj->parent == '') return 0; + elseif ($obj->parent == $idchild) return 1; + else $sameparent = $this->get_parents($obj->parent, $idchild); + return $sameparent; + } // if ($resql) + else return -1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps From b5ac78d9a0532eac0961437adaf0ae05dc5a820f Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 19 May 2021 16:56:52 +0000 Subject: [PATCH 04/10] Fixing style errors. --- htdocs/societe/class/societe.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 3c7d642c23f..a1950bd5214 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3120,8 +3120,7 @@ class Societe extends CommonObject setEventMessages('la maison mère choisie est déjà filiale de ce tiers', null, 'warnings'); return -1; } // elseif ($sameparent == 1) - else - { + else { $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe SET parent = '.($id > 0 ? $id : 'null').' WHERE rowid = '.$this->id; dol_syslog(get_class($this).'::set_parent', LOG_DEBUG); $resql = $this->db->query($sql); @@ -3130,7 +3129,7 @@ class Societe extends CommonObject $this->parent = $id; return 1; } // if ($resql) - else return -1; + else return -1; } // else // elseif ($sameparent == 1) } // if ($this->id) else return -1; @@ -3157,10 +3156,10 @@ class Societe extends CommonObject if ($obj->parent == '') return 0; elseif ($obj->parent == $idchild) return 1; - else $sameparent = $this->get_parents($obj->parent, $idchild); + else $sameparent = $this->get_parents($obj->parent, $idchild); return $sameparent; } // if ($resql) - else return -1; + else return -1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps From a3d1b49c6588da6fef07b4c6da55d5c654350123 Mon Sep 17 00:00:00 2001 From: Sylvain Legrand Date: Wed, 19 May 2021 19:08:58 +0200 Subject: [PATCH 05/10] Error in list when using alias name of thirdparty --- htdocs/comm/propal/list.php | 3 ++- htdocs/commande/list.php | 3 ++- htdocs/compta/facture/list.php | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index fd6df13ae9e..f867f94a2d0 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -349,7 +349,7 @@ $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos' $sql = 'SELECT'; if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT'; -$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; // InfraS change $sql .= " typent.code as typent_code,"; $sql .= " ava.rowid as availability,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; @@ -949,6 +949,7 @@ if ($resql) $companystatic->id = $obj->socid; $companystatic->name = $obj->name; + $companystatic->name_alias = $obj->name_alias; // InfraS add $companystatic->client = $obj->client; $companystatic->code_client = $obj->code_client; $companystatic->email = $obj->email; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 9b3e865e459..1979d057f89 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -270,7 +270,7 @@ $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_P $sql = 'SELECT'; if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT'; -$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; // InfraS change $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; $sql .= ' c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client, c.fk_user_author,'; @@ -937,6 +937,7 @@ if ($resql) $companystatic->id = $obj->socid; $companystatic->code_client = $obj->code_client; $companystatic->name = $obj->name; + $companystatic->name_alias = $obj->name_alias; // InfraS add $companystatic->client = $obj->client; $companystatic->email = $obj->email; if (!isset($getNomUrl_cache[$obj->socid])) { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 6d4af64902d..57082ce5eee 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -422,7 +422,7 @@ $sql .= ' f.datef as df, f.date_valid, f.date_lim_reglement as datelimite, f.mod $sql .= ' f.paye as paye, f.fk_statut, f.close_code,'; $sql .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,'; $sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; -$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,'; +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,'; // InfraS change $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; $sql .= " country.code as country_code,"; @@ -1193,6 +1193,7 @@ if ($resql) } $thirdpartystatic->id = $obj->socid; $thirdpartystatic->name = $obj->name; + $thirdpartystatic->name_alias = $obj->name_alias; // InfraS add $thirdpartystatic->client = $obj->client; $thirdpartystatic->fournisseur = $obj->fournisseur; $thirdpartystatic->code_client = $obj->code_client; From 890d0f8040e648d6ff4542b6580efdaccc155869 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 May 2021 14:38:24 +0200 Subject: [PATCH 06/10] Update societe.class.php --- htdocs/societe/class/societe.class.php | 46 ++++++++++++++------------ 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index a1950bd5214..39524d18e63 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3113,26 +3113,26 @@ class Societe extends CommonObject // phpcs:enable if ($this->id) { // InfraS change (to avoid infinite loop) - $sameparent = $this->get_parents($id, $this->id); - if ($sameparent < 0) return -1; - elseif ($sameparent == 1) - { - setEventMessages('la maison mère choisie est déjà filiale de ce tiers', null, 'warnings'); + $sameparent = $this->get_parents($id, $this->id); + if ($sameparent < 0) { return -1; - } // elseif ($sameparent == 1) - else { + } elseif ($sameparent == 1) { + setEventMessages('ParentCompanyIsAlreadyAChild', null, 'warnings'); + return -1; + } else { $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe SET parent = '.($id > 0 ? $id : 'null').' WHERE rowid = '.$this->id; dol_syslog(get_class($this).'::set_parent', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->parent = $id; return 1; - } // if ($resql) - else return -1; - } // else // elseif ($sameparent == 1) - } // if ($this->id) - else return -1; + } else { + return -1; + } + } + } else { + return -1; + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -3150,16 +3150,20 @@ class Societe extends CommonObject $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE rowid = '.$idparent; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj->parent == '') return 0; - elseif ($obj->parent == $idchild) return 1; - else $sameparent = $this->get_parents($obj->parent, $idchild); + if ($obj->parent == '') { + return 0; + } elseif ($obj->parent == $idchild) { + return 1; + } else { + $sameparent = $this->get_parents($obj->parent, $idchild); + } return $sameparent; - } // if ($resql) - else return -1; + } else { + return -1; + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps From b64c3073586199e378d4ada177c92aae8dfaf58e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 May 2021 14:50:02 +0200 Subject: [PATCH 07/10] Update societe.class.php --- htdocs/societe/class/societe.class.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 39524d18e63..d7aa01e20cc 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3113,7 +3113,7 @@ class Societe extends CommonObject // phpcs:enable if ($this->id) { // InfraS change (to avoid infinite loop) - $sameparent = $this->get_parents($id, $this->id); + $sameparent = $this->validateFamilyTree($id, $this->id, 0); if ($sameparent < 0) { return -1; } elseif ($sameparent == 1) { @@ -3135,17 +3135,20 @@ class Societe extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Search parent commany of current company + * Check if a thirdparty $idchild is or not inside the parents (or grand parents) of another thirdparty id $idparent. * * @param int $idparent Id of thirdparty to check * @param int $idchild Id of thirdparty to compare to - * @return int <0 if KO, 0 if OK or 1 if at some level a parent company was the child to compare to + * @param int $counter Counter to protect against infinite loops + * @return int <0 if KO, 0 if OK or 1 if at some level a parent company was the child to compare to */ - public function get_parents($idparent, $idchild) + public function validateFamilyTree($idparent, $idchild, $counter = 0) { - // phpcs:enable + if ($counter > 100) { + dol_syslog("Too high level of parent - child for company. May be an infinite loop ?", LOG_WARNING); + } + $sql = 'SELECT s.parent'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE rowid = '.$idparent; @@ -3158,7 +3161,7 @@ class Societe extends CommonObject } elseif ($obj->parent == $idchild) { return 1; } else { - $sameparent = $this->get_parents($obj->parent, $idchild); + $sameparent = $this->validateFamilyTree($obj->parent, $idchild, ($counter + 1)); } return $sameparent; } else { From 94ca682cbf2c1473c1197f8cfb2280f3bacdc8d3 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 20 May 2021 12:51:53 +0000 Subject: [PATCH 08/10] Fixing style errors. --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index d7aa01e20cc..0310b9da79c 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3148,7 +3148,7 @@ class Societe extends CommonObject if ($counter > 100) { dol_syslog("Too high level of parent - child for company. May be an infinite loop ?", LOG_WARNING); } - + $sql = 'SELECT s.parent'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE rowid = '.$idparent; From 28487fac12585640eae947b3378059993a89e740 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 May 2021 14:53:50 +0200 Subject: [PATCH 09/10] Create societe.class.php --- htdocs/societe/class/societe.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 0310b9da79c..e85f3a6c5ee 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3112,15 +3112,15 @@ class Societe extends CommonObject { // phpcs:enable if ($this->id) { - // InfraS change (to avoid infinite loop) + // Check if the id we want to add as parent has not already one parent that is the current id we try to update $sameparent = $this->validateFamilyTree($id, $this->id, 0); if ($sameparent < 0) { return -1; } elseif ($sameparent == 1) { - setEventMessages('ParentCompanyIsAlreadyAChild', null, 'warnings'); + setEventMessages('ParentCompanyToAddIsAlreadyAChildOfModifiedCompany', null, 'warnings'); return -1; } else { - $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe SET parent = '.($id > 0 ? $id : 'null').' WHERE rowid = '.$this->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe SET parent = '.($id > 0 ? $id : 'null').' WHERE rowid = '.((int) $this->id); dol_syslog(get_class($this).'::set_parent', LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -3148,7 +3148,7 @@ class Societe extends CommonObject if ($counter > 100) { dol_syslog("Too high level of parent - child for company. May be an infinite loop ?", LOG_WARNING); } - + $sql = 'SELECT s.parent'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE rowid = '.$idparent; From 91f85abb7e0a25be2d447c33246a4baa9d4707ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 May 2021 14:55:37 +0200 Subject: [PATCH 10/10] Fix only comment to understand code are allowed --- htdocs/comm/propal/list.php | 4 ++-- htdocs/commande/list.php | 4 ++-- htdocs/compta/facture/list.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index f867f94a2d0..fcd8f067e01 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -349,7 +349,7 @@ $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos' $sql = 'SELECT'; if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT'; -$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; // InfraS change +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; $sql .= " typent.code as typent_code,"; $sql .= " ava.rowid as availability,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; @@ -949,7 +949,7 @@ if ($resql) $companystatic->id = $obj->socid; $companystatic->name = $obj->name; - $companystatic->name_alias = $obj->name_alias; // InfraS add + $companystatic->name_alias = $obj->name_alias; $companystatic->client = $obj->client; $companystatic->code_client = $obj->code_client; $companystatic->email = $obj->email; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 1979d057f89..987f975a47d 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -270,7 +270,7 @@ $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_P $sql = 'SELECT'; if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT'; -$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; // InfraS change +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; $sql .= ' c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client, c.fk_user_author,'; @@ -937,7 +937,7 @@ if ($resql) $companystatic->id = $obj->socid; $companystatic->code_client = $obj->code_client; $companystatic->name = $obj->name; - $companystatic->name_alias = $obj->name_alias; // InfraS add + $companystatic->name_alias = $obj->name_alias; $companystatic->client = $obj->client; $companystatic->email = $obj->email; if (!isset($getNomUrl_cache[$obj->socid])) { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 57082ce5eee..56404aed78b 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -422,7 +422,7 @@ $sql .= ' f.datef as df, f.date_valid, f.date_lim_reglement as datelimite, f.mod $sql .= ' f.paye as paye, f.fk_statut, f.close_code,'; $sql .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,'; $sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; -$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,'; // InfraS change +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,'; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; $sql .= " country.code as country_code,"; @@ -1193,7 +1193,7 @@ if ($resql) } $thirdpartystatic->id = $obj->socid; $thirdpartystatic->name = $obj->name; - $thirdpartystatic->name_alias = $obj->name_alias; // InfraS add + $thirdpartystatic->name_alias = $obj->name_alias; $thirdpartystatic->client = $obj->client; $thirdpartystatic->fournisseur = $obj->fournisseur; $thirdpartystatic->code_client = $obj->code_client;