From 0b7f474dd37fbbbeeb0efc2ad54e1c0af75db6d0 Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Mon, 17 May 2021 18:04:21 +0200
Subject: [PATCH 1/8] look_feel user author in list
---
htdocs/comm/propal/list.php | 10 +++++-----
htdocs/commande/list.php | 7 +++----
htdocs/compta/facture/list.php | 7 +++----
htdocs/projet/list.php | 4 +++-
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index 43c83117457..7f738f84ebe 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -1705,14 +1705,13 @@ if ($resql) {
}
}
- $userstatic->id = $obj->fk_user_author;
- $userstatic->login = $obj->login;
+ $userstatic->fetch($obj->fk_user_author);
// Author
if (!empty($arrayfields['u.login']['checked'])) {
- print '
':
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 3747b2107b2..d14fe1ae460 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -1668,14 +1668,13 @@ if ($resql) {
}
}
- $userstatic->id = $obj->fk_user_author;
- $userstatic->login = $obj->login;
+ $userstatic->fetch($obj->fk_user_author);
// Author
if (!empty($arrayfields['u.login']['checked'])) {
- print '
';
+ print ' | ';
if ($userstatic->id) {
- print $userstatic->getLoginUrl(1);
+ print $userstatic->getNomUrl(-1);
} else {
print ' ';
}
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 14b0383fa8d..e5c08993b9f 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -1880,11 +1880,10 @@ if ($resql) {
// Author
if (!empty($arrayfields['u.login']['checked'])) {
- $userstatic->id = $obj->fk_user_author;
- $userstatic->login = $obj->login;
- print ' | ';
+ $userstatic->fetch($obj->fk_user_author);
+ print ' | ';
if ($userstatic->id) {
- print $userstatic->getLoginUrl(1);
+ print $userstatic->getNomUrl(-1);
} else {
print ' ';
}
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index a9f17f5439b..1edeb0816c2 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -1041,7 +1041,9 @@ while ($i < min($num, $limit)) {
$userstatic->entity = $val['entity'];
$userstatic->photo = $val['photo'];
$userstatic->login = $val['login'];
- $userstatic->phone = $val['phone'];
+ $userstatic->office_phone = $val['office_phone'];
+ $userstatic->office_fax = $val['office_fax'];
+ $userstatic->user_mobile = $val['user_mobile'];
$userstatic->job = $val['job'];
$userstatic->gender = $val['gender'];
print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
From 9dcf2044a96c755a8bb54dfe61163c1703b466b7 Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Mon, 17 May 2021 18:33:27 +0200
Subject: [PATCH 2/8] Update list.php
---
htdocs/comm/propal/list.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index 7f738f84ebe..0f277dad14c 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -1743,7 +1743,8 @@ if ($resql) {
$userstatic->entity = $val['entity'];
$userstatic->photo = $val['photo'];
$userstatic->login = $val['login'];
- $userstatic->user_mobile = $val['user_mobile'];
+ $userstatic->office_phone = $val['office_phone'];
+ $userstatic->office_fax = $val['office_fax'];
$userstatic->user_mobile = $val['user_mobile'];
$userstatic->job = $val['job'];
$userstatic->gender = $val['gender'];
From 4236471a6f0efd9d8269837ddcdb494aeed05ee1 Mon Sep 17 00:00:00 2001
From: Alexandre SPANGARO
Date: Mon, 17 May 2021 22:12:01 +0200
Subject: [PATCH 3/8] Fix Title salary card
---
htdocs/salaries/card.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php
index 8e2188123db..aff3e4cce92 100755
--- a/htdocs/salaries/card.php
+++ b/htdocs/salaries/card.php
@@ -359,7 +359,9 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->salaries-
* View
*/
-llxHeader("", $langs->trans("Salary"));
+$title = $langs->trans('Salary')." - ".$langs->trans('Card');
+$help_url = "";
+llxHeader("", $title, $help_url);
$form = new Form($db);
if (!empty($conf->projet->enabled)) $formproject = new FormProjets($db);
From c3c760c26915af4ef39671fb0af23c31d1172901 Mon Sep 17 00:00:00 2001
From: Alexandre SPANGARO
Date: Mon, 17 May 2021 22:18:46 +0200
Subject: [PATCH 4/8] Fix Title salary document card
---
htdocs/salaries/document.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/htdocs/salaries/document.php b/htdocs/salaries/document.php
index 4c88cefb8de..5950fc88798 100644
--- a/htdocs/salaries/document.php
+++ b/htdocs/salaries/document.php
@@ -91,7 +91,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
$form = new Form($db);
-llxHeader("", $langs->trans("SalaryPayment"));
+$title = $langs->trans('Salary')." - ".$langs->trans('Documents');
+$help_url = "";
+llxHeader("", $title, $help_url);
if ($object->id) {
$object->fetch_thirdparty();
From 91b8b6a6003ac730612abb607fc9a0c8b53ccb89 Mon Sep 17 00:00:00 2001
From: Alexandre SPANGARO
Date: Mon, 17 May 2021 22:41:00 +0200
Subject: [PATCH 5/8] Fix Title salary info card
---
htdocs/salaries/info.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/htdocs/salaries/info.php b/htdocs/salaries/info.php
index 1b81a80189f..0f94f405fa1 100644
--- a/htdocs/salaries/info.php
+++ b/htdocs/salaries/info.php
@@ -53,7 +53,9 @@ restrictedArea($user, 'salaries', $object->id, 'salary', '');
* View
*/
-llxHeader("", $langs->trans("SalaryPayment"));
+$title = $langs->trans('Salary')." - ".$langs->trans('Info');
+$help_url = "";
+llxHeader("", $title, $help_url);
$object = new Salary($db);
$object->fetch($id);
From 58db723502a58d054ffd45749ab151551026890d Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Mon, 17 May 2021 23:27:33 +0200
Subject: [PATCH 6/8] thirdparty info popup list
---
htdocs/comm/propal/list.php | 9 +++++++-
htdocs/commande/list.php | 11 ++++++++--
htdocs/compta/facture/list.php | 40 +++++++++++++++++++---------------
htdocs/projet/list.php | 38 ++++++++++++++++++++------------
4 files changed, 64 insertions(+), 34 deletions(-)
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index e1ec555837f..c8173967770 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -460,9 +460,10 @@ $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 as alias, 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 as alias, s.email, s.phone, s.fax , s.address, s.town, s.zip, s.fk_pays, s.client, s.code_client, ';
$sql .= " typent.code as typent_code,";
$sql .= " ava.rowid as availability,";
+$sql .= " country.code as country_code,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";
$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.total_tva, p.total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
$sql .= ' p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc,';
@@ -1335,9 +1336,15 @@ if ($resql) {
$companystatic->id = $obj->socid;
$companystatic->name = $obj->name;
+ $companystatic->name_alias = $obj->alias;
$companystatic->client = $obj->client;
$companystatic->code_client = $obj->code_client;
$companystatic->email = $obj->email;
+ $companystatic->phone = $obj->phone;
+ $companystatic->address = $obj->address;
+ $companystatic->zip = $obj->zip;
+ $companystatic->town = $obj->town;
+ $companystatic->country_code = $obj->country_code;
$projectstatic->id = $obj->project_id;
$projectstatic->ref = $obj->project_ref;
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 5bb8e6ccb0c..81b15623adf 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -417,9 +417,10 @@ $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 as name_alias, 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 as alias, s.email, s.phone, s.fax, s.address, 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 .= " country.code as country_code,";
$sql .= ' c.rowid, c.ref, c.total_ht, c.total_tva, c.total_ttc, c.ref_client, c.fk_user_author,';
$sql .= ' c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva as multicurrency_total_vat, c.multicurrency_total_ttc,';
$sql .= ' c.date_valid, c.date_commande, c.note_public, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,';
@@ -1383,10 +1384,16 @@ if ($resql) {
$nbprod = 0;
$companystatic->id = $obj->socid;
- $companystatic->code_client = $obj->code_client;
$companystatic->name = $obj->name;
+ $companystatic->name_alias = $obj->alias;
$companystatic->client = $obj->client;
+ $companystatic->code_client = $obj->code_client;
$companystatic->email = $obj->email;
+ $companystatic->phone = $obj->phone;
+ $companystatic->address = $obj->address;
+ $companystatic->zip = $obj->zip;
+ $companystatic->town = $obj->town;
+ $companystatic->country_code = $obj->country_code;
if (!isset($getNomUrl_cache[$obj->socid])) {
$getNomUrl_cache[$obj->socid] = $companystatic->getNomUrl(1, 'customer');
}
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 1ac8765171d..2a474d00fae 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -467,7 +467,7 @@ if (!empty($conf->margin->enabled)) {
$bankaccountstatic = new Account($db);
$facturestatic = new Facture($db);
$formcompany = new FormCompany($db);
-$thirdpartystatic = new Societe($db);
+$companystatic = new Societe($db);
$sql = 'SELECT';
if ($sall || $search_product_category > 0 || $search_user > 0) {
@@ -481,7 +481,7 @@ $sql .= ' f.datef, f.date_valid, f.date_lim_reglement as datelimite, f.module_so
$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 as 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 .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, 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,";
@@ -714,7 +714,7 @@ if (!$sall) {
$sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,';
$sql .= ' f.fk_user_author, f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva,';
$sql .= ' f.multicurrency_total_tva, f.multicurrency_total_ttc,';
- $sql .= ' s.rowid, s.nom, 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, s.code_compta_fournisseur,';
+ $sql .= ' s.rowid, s.nom, s.name_alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,';
$sql .= ' typent.code,';
$sql .= ' state.code_departement, state.nom,';
$sql .= ' country.code,';
@@ -1539,16 +1539,22 @@ if ($resql) {
$facturestatic->situation_cycle_ref = $obj->situation_cycle_ref;
$facturestatic->situation_counter = $obj->situation_counter;
}
- $thirdpartystatic->id = $obj->socid;
- $thirdpartystatic->name = $obj->name;
- $thirdpartystatic->client = $obj->client;
- $thirdpartystatic->fournisseur = $obj->fournisseur;
- $thirdpartystatic->code_client = $obj->code_client;
- $thirdpartystatic->code_compta_client = $obj->code_compta_client;
- $thirdpartystatic->code_fournisseur = $obj->code_fournisseur;
- $thirdpartystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
- $thirdpartystatic->email = $obj->email;
- $thirdpartystatic->country_code = $obj->country_code;
+ $companystatic->id = $obj->socid;
+ $companystatic->name = $obj->name;
+ $companystatic->name_alias = $obj->alias;
+ $companystatic->client = $obj->client;
+ $companystatic->fournisseur = $obj->fournisseur;
+ $companystatic->code_client = $obj->code_client;
+ $companystatic->code_compta_client = $obj->code_compta_client;
+ $companystatic->code_fournisseur = $obj->code_fournisseur;
+ $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
+ $companystatic->email = $obj->email;
+ $companystatic->phone = $obj->phone;
+ $companystatic->fax = $obj->fax;
+ $companystatic->address = $obj->address;
+ $companystatic->zip = $obj->zip;
+ $companystatic->town = $obj->town;
+ $companystatic->country_code = $obj->country_code;
$projectstatic->id = $obj->project_id;
$projectstatic->ref = $obj->project_ref;
@@ -1570,10 +1576,10 @@ if ($resql) {
$multicurrency_remaintopay = 0;
}
if ($facturestatic->type == Facture::TYPE_CREDIT_NOTE && $obj->paye == 1) { // If credit note closed, we take into account the amount not yet consummed
- $remaincreditnote = $discount->getAvailableDiscounts($thirdpartystatic, '', 'rc.fk_facture_source='.$facturestatic->id);
+ $remaincreditnote = $discount->getAvailableDiscounts($companystatic, '', 'rc.fk_facture_source='.$facturestatic->id);
$remaintopay = -$remaincreditnote;
$totalpay = price2num($facturestatic->total_ttc - $remaintopay);
- $multicurrency_remaincreditnote = $discount->getAvailableDiscounts($thirdpartystatic, '', 'rc.fk_facture_source='.$facturestatic->id, 0, 0, 1);
+ $multicurrency_remaincreditnote = $discount->getAvailableDiscounts($companystatic, '', 'rc.fk_facture_source='.$facturestatic->id, 0, 0, 1);
$multicurrency_remaintopay = -$multicurrency_remaincreditnote;
$multicurrency_totalpay = price2num($facturestatic->multicurrency_total_ttc - $multicurrency_remaintopay);
}
@@ -1704,9 +1710,9 @@ if ($resql) {
if (!empty($arrayfields['s.nom']['checked'])) {
print '| ';
if ($contextpage == 'poslist') {
- print $thirdpartystatic->name;
+ print $companystatic->name;
} else {
- print $thirdpartystatic->getNomUrl(1, 'customer');
+ print $companystatic->getNomUrl(1, 'customer');
}
print ' | ';
if (!$i) {
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index a9f17f5439b..7edc94a0a8c 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -297,7 +297,7 @@ if (empty($reshook)) {
* View
*/
-$socstatic = new Societe($db);
+$companystatic = new Societe($db);
$form = new Form($db);
$formother = new FormOther($db);
$formproject = new FormProjets($db);
@@ -330,12 +330,13 @@ if (count($listofprojectcontacttype) == 0) {
}
$distinct = 'DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once.
-$sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut as status, p.fk_opp_status, p.public, p.fk_user_creat";
-$sql .= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_update, p.budget_amount ";
-$sql .= ", p.usage_opportunity, p.usage_task, p.usage_bill_time, p.usage_organize_event";
-$sql .= ", accept_conference_suggestions, accept_booth_suggestions, price_registration, price_booth";
-$sql .= ", s.rowid as socid, s.nom as name, s.email";
-$sql .= ", cls.code as opp_status_code";
+$sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut as status, p.fk_opp_status, p.public, p.fk_user_creat,";
+$sql .= " p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_update, p.budget_amount,";
+$sql .= " p.usage_opportunity, p.usage_task, p.usage_bill_time, p.usage_organize_event,";
+$sql .= " accept_conference_suggestions, accept_booth_suggestions, price_registration, price_booth,";
+$sql .= " s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.code_client,";
+$sql .= " country.code as country_code,";
+$sql .= " cls.code as opp_status_code";
// Add fields from extrafields
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
@@ -355,6 +356,7 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)";
}
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls on p.fk_opp_status = cls.rowid";
// We'll need this table joined to the select in order to filter by sale
// No check is done on company permission because readability is managed by public status of project and assignement.
@@ -978,9 +980,17 @@ while ($i < min($num, $limit)) {
$userAccess = $object->restrictedProjectArea($user); // why this ?
if ($userAccess >= 0) {
- $socstatic->id = $obj->socid;
- $socstatic->name = $obj->name;
- $socstatic->email = $obj->email;
+ $companystatic->id = $obj->socid;
+ $companystatic->name = $obj->name;
+ $companystatic->name_alias = $obj->alias;
+ $companystatic->client = $obj->client;
+ $companystatic->code_client = $obj->code_client;
+ $companystatic->email = $obj->email;
+ $companystatic->phone = $obj->phone;
+ $companystatic->address = $obj->address;
+ $companystatic->zip = $obj->zip;
+ $companystatic->town = $obj->town;
+ $companystatic->country_code = $obj->country_code;
print '';
@@ -1009,7 +1019,7 @@ while ($i < min($num, $limit)) {
if (!empty($arrayfields['s.nom']['checked'])) {
print '| ';
if ($obj->socid) {
- print $socstatic->getNomUrl(1);
+ print $companystatic->getNomUrl(1);
} else {
print ' ';
}
@@ -1022,9 +1032,9 @@ while ($i < min($num, $limit)) {
if (!empty($arrayfields['commercial']['checked'])) {
print ' | ';
if ($obj->socid) {
- $socstatic->id = $obj->socid;
- $socstatic->name = $obj->name;
- $listsalesrepresentatives = $socstatic->getSalesRepresentatives($user);
+ $companystatic->id = $obj->socid;
+ $companystatic->name = $obj->name;
+ $listsalesrepresentatives = $companystatic->getSalesRepresentatives($user);
$nbofsalesrepresentative = count($listsalesrepresentatives);
if ($nbofsalesrepresentative > 6) {
// We print only number
From 6fe9fe330d8a2618801910e7c1f056fee10edfa3 Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Mon, 17 May 2021 23:54:31 +0200
Subject: [PATCH 7/8] delete fetch
---
htdocs/comm/propal/list.php | 16 ++++++++++++++--
htdocs/commande/list.php | 22 +++++++++++++++++-----
htdocs/compta/facture/list.php | 25 +++++++++++++++++++------
3 files changed, 50 insertions(+), 13 deletions(-)
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index f086616cada..656d15114b9 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -470,7 +470,7 @@ $sql .= ' p.datec as date_creation, p.tms as date_update, p.date_cloture as date
$sql .= ' p.note_public, p.note_private,';
$sql .= ' p.fk_cond_reglement,p.fk_mode_reglement,p.fk_shipping_method,p.fk_input_reason,';
$sql .= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,";
-$sql .= ' u.login';
+$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
if (!$user->rights->societe->client->voir && !$socid) {
$sql .= ", sc.fk_soc, sc.fk_user";
}
@@ -1692,7 +1692,19 @@ if ($resql) {
}
}
- $userstatic->fetch($obj->fk_user_author);
+ $userstatic->id = $obj->fk_user_author;
+ $userstatic->login = $obj->login;
+ $userstatic->lastname = $obj->lastname;
+ $userstatic->firstname = $obj->firstname;
+ $userstatic->email = $obj->email;
+ $userstatic->statut = $obj->statut;
+ $userstatic->entity = $obj->entity;
+ $userstatic->photo = $obj->photo;
+ $userstatic->office_phone = $obj->office_phone;
+ $userstatic->office_fax = $obj->office_fax;
+ $userstatic->user_mobile = $obj->user_mobile;
+ $userstatic->job = $obj->job;
+ $userstatic->gender = $obj->gender;
// Author
if (!empty($arrayfields['u.login']['checked'])) {
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index e441f4e2a57..64d41039e93 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -424,10 +424,10 @@ $sql .= ' c.rowid, c.ref, c.total_ht, c.total_tva, c.total_ttc, c.ref_client, c.
$sql .= ' c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva as multicurrency_total_vat, c.multicurrency_total_ttc,';
$sql .= ' c.date_valid, c.date_commande, c.note_public, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,';
$sql .= ' c.date_creation as date_creation, c.tms as date_update, c.date_cloture as date_cloture,';
-$sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,";
-$sql .= " u.login,";
-$sql .= ' c.fk_cond_reglement,c.fk_mode_reglement,c.fk_shipping_method';
-$sql .= ' ,c.fk_input_reason';
+$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,';
+$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender,';
+$sql .= ' c.fk_cond_reglement,c.fk_mode_reglement,c.fk_shipping_method,';
+$sql .= ' c.fk_input_reason';
if ($search_categ_cus) {
$sql .= ", cc.fk_categorie, cc.fk_soc";
}
@@ -1667,7 +1667,19 @@ if ($resql) {
}
}
- $userstatic->fetch($obj->fk_user_author);
+ $userstatic->id = $obj->fk_user_author;
+ $userstatic->login = $obj->login;
+ $userstatic->lastname = $obj->lastname;
+ $userstatic->firstname = $obj->firstname;
+ $userstatic->email = $obj->email;
+ $userstatic->statut = $obj->statut;
+ $userstatic->entity = $obj->entity;
+ $userstatic->photo = $obj->photo;
+ $userstatic->office_phone = $obj->office_phone;
+ $userstatic->office_fax = $obj->office_fax;
+ $userstatic->user_mobile = $obj->user_mobile;
+ $userstatic->job = $obj->job;
+ $userstatic->gender = $obj->gender;
// Author
if (!empty($arrayfields['u.login']['checked'])) {
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index f60cec54cbb..fa703336a84 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -482,11 +482,11 @@ $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 as 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,";
-$sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,";
-$sql .= " u.login";
+$sql .= ' typent.code as typent_code,';
+$sql .= ' state.code_departement as state_code, state.nom as state_name,';
+$sql .= ' country.code as country_code,';
+$sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,';
+$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
// We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0)
// TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
if (!$sall) {
@@ -1878,9 +1878,22 @@ if ($resql) {
$totalarray['val']['f.total_ttc'] += $obj->total_ttc;
}
+ $userstatic->id = $obj->fk_user_author;
+ $userstatic->login = $obj->login;
+ $userstatic->lastname = $obj->lastname;
+ $userstatic->firstname = $obj->firstname;
+ $userstatic->email = $obj->email;
+ $userstatic->statut = $obj->statut;
+ $userstatic->entity = $obj->entity;
+ $userstatic->photo = $obj->photo;
+ $userstatic->office_phone = $obj->office_phone;
+ $userstatic->office_fax = $obj->office_fax;
+ $userstatic->user_mobile = $obj->user_mobile;
+ $userstatic->job = $obj->job;
+ $userstatic->gender = $obj->gender;
+
// Author
if (!empty($arrayfields['u.login']['checked'])) {
- $userstatic->fetch($obj->fk_user_author);
print ' | ';
if ($userstatic->id) {
print $userstatic->getNomUrl(-1);
From 9b0988e7bed846e947a0ff48abc016ee091445dc Mon Sep 17 00:00:00 2001
From: Alexandre SPANGARO
Date: Tue, 18 May 2021 08:40:28 +0200
Subject: [PATCH 8/8] FIX Social contrib. - Missing language file
---
htdocs/compta/sociales/list.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php
index 2b0c3961759..db754390e5e 100644
--- a/htdocs/compta/sociales/list.php
+++ b/htdocs/compta/sociales/list.php
@@ -38,7 +38,7 @@ if (!empty($conf->projet->enabled)) {
}
// Load translation files required by the page
-$langs->loadLangs(array('compta', 'banks', 'bills', 'hrm'));
+$langs->loadLangs(array('compta', 'banks', 'bills', 'hrm', 'projects'));
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
| |