| '.$langs->trans("Visibility").' | ';
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index d4b5bf89bbf..d266d659da7 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -459,7 +459,7 @@ if ($id > 0 || !empty($ref)) {
print '';
print ' ';
- print ' ';
+ print '';
// Usage
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) {
@@ -532,7 +532,7 @@ if ($id > 0 || !empty($ref)) {
print '';
print ' ';
- print ' ';
+ print '';
// Description
print '| '.$langs->trans("Description").' | ';
@@ -541,7 +541,7 @@ if ($id > 0 || !empty($ref)) {
// Categories
if ($conf->categorie->enabled) {
- print ' | | '.$langs->trans("Categories").' | ';
+ print ' | | '.$langs->trans("Categories").' | ';
print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
print " | ";
}
From b09c4166b30f11de03541011b03fc8a96dc173e7 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Fri, 24 Sep 2021 02:24:04 +0200
Subject: [PATCH 19/77] Fix set position of lines in tasks of a project
---
htdocs/core/ajax/row.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/htdocs/core/ajax/row.php b/htdocs/core/ajax/row.php
index 7b271fafdf2..6047d8d289c 100644
--- a/htdocs/core/ajax/row.php
+++ b/htdocs/core/ajax/row.php
@@ -99,6 +99,8 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
$perm = 1;
} elseif ($table_element_line == 'ecm_files' && $fk_element == 'fk_ticket' && !empty($user->rights->ticket->write)) {
$perm = 1;
+ } elseif ($table_element_line == 'projet_task' && $fk_element == 'fk_projet' && $user->rights->projet->creer) {
+ $perm = 1;
} else {
$tmparray = explode('_', $table_element_line);
$tmpmodule = $tmparray[0]; $tmpobject = preg_replace('/line$/', '', $tmparray[1]);
@@ -111,7 +113,7 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
// We should not be here. If we are not allowed to reorder rows, feature should not be visible on script.
// If we are here, it is a hack attempt, so we report a warning.
print 'Bad permission to modify position of lines for object in table '.$table_element_line;
- dol_syslog('Bad permission to modify position of lines for object in table '.$table_element_line.', fk_element '.$fk_element, LOG_WARNING);
+ dol_syslog('Bad permission to modify position of lines for object in table='.$table_element_line.', fk_element='.$fk_element, LOG_WARNING);
accessforbidden('Bad permission to modify position of lines for object in table '.$table_element_line);
}
From cd46ccdb669b48c3d505e00b0ae86d1a96b26172 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Fri, 24 Sep 2021 02:31:15 +0200
Subject: [PATCH 20/77] Code comment
---
htdocs/core/lib/project.lib.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 2467baa034a..c293b7c47ae 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -977,6 +977,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
}
}
+ // Computed progress
if (count($arrayfields) > 0 && !empty($arrayfields['t.progress_calculated']['checked'])) {
print '';
if ($total_projectlinesa_planned) {
@@ -984,6 +985,8 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
}
print ' | ';
}
+
+ // Declared progress
if (count($arrayfields) > 0 && !empty($arrayfields['t.progress']['checked'])) {
print '';
if ($total_projectlinesa_planned) {
From 15313b8d374392641c957d4b7b2e9386728592b8 Mon Sep 17 00:00:00 2001
From: Alexandre SPANGARO
Date: Fri, 24 Sep 2021 06:03:01 +0200
Subject: [PATCH 21/77] FIX Accountancy - Missing specific filename for export
on format FEC2
---
htdocs/accountancy/tpl/export_journal.tpl.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/htdocs/accountancy/tpl/export_journal.tpl.php b/htdocs/accountancy/tpl/export_journal.tpl.php
index ecb0f7a6b09..93215b9b8db 100644
--- a/htdocs/accountancy/tpl/export_journal.tpl.php
+++ b/htdocs/accountancy/tpl/export_journal.tpl.php
@@ -38,7 +38,9 @@ header('Content-Type: text/csv');
include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php';
$accountancyexport = new AccountancyExport($db);
-if ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$EXPORT_TYPE_FEC && $type_export == "general_ledger") { // Specific filename for FEC model export into the general ledger
+// Specific filename for FEC model export into the general ledger
+if ($accountancyexport->getFormatCode($formatexportset) == ($accountancyexport::$EXPORT_TYPE_FEC || $accountancyexport::$EXPORT_TYPE_FEC2)
+ && $type_export == "general_ledger") {
// FEC format is defined here: https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000027804775&cidTexte=LEGITEXT000006069583&dateTexte=20130802&oldAction=rechCodeArticle
if (empty($search_date_end)) {
// TODO Get the max date into bookeeping table
From 3e485dcb4142a87db4eb3b2a8937edb08194f5a5 Mon Sep 17 00:00:00 2001
From: Alexandre SPANGARO
Date: Fri, 24 Sep 2021 06:38:43 +0200
Subject: [PATCH 22/77] FIX Accountancy - Option of export popup are inverted
---
htdocs/accountancy/bookkeeping/list.php | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index bc260c77ed3..ec01d9c697c 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -591,7 +591,7 @@ if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->ex
if (!empty($accountancyexport->errors)) {
setEventMessages('', $accountancyexport->errors, 'errors');
- } elseif (!$notifiedexportdate || !$notifiedvalidationdate) {
+ } elseif (!empty($notifiedexportdate) || !empty($notifiedvalidationdate)) {
// Specify as export : update field date_export or date_validated
$error = 0;
$db->begin();
@@ -602,17 +602,17 @@ if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->ex
$sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping";
$sql .= " SET";
- if (!$notifiedexportdate && !$notifiedvalidationdate) {
+ if (!empty($notifiedexportdate) && !empty($notifiedvalidationdate)) {
$sql .= " date_export = '".$db->idate($now)."'";
$sql .= ", date_validated = '".$db->idate($now)."'";
- } elseif (!$notifiedexportdate) {
+ } elseif (!empty($notifiedexportdate)) {
$sql .= " date_export = '".$db->idate($now)."'";
- } elseif (!$notifiedvalidationdate) {
+ } elseif (!empty($notifiedvalidationdate)) {
$sql .= " date_validated = '".$db->idate($now)."'";
}
$sql .= " WHERE rowid = ".((int) $movement->id);
- dol_syslog("/accountancy/bookeeping/list.php Function export_file Specify movements as exported sql=".$sql, LOG_DEBUG);
+ dol_syslog("/accountancy/bookkeeping/list.php Function export_file Specify movements as exported sql=".$sql, LOG_DEBUG);
$result = $db->query($sql);
if (!$result) {
$error++;
From f88d12f55d79900b739b5c69f976738834f564af Mon Sep 17 00:00:00 2001
From: lmarcouiller
Date: Fri, 24 Sep 2021 11:16:34 +0200
Subject: [PATCH 23/77] Fix #18809 : error on client tooltip
---
htdocs/comm/propal/list.php | 6 +++---
htdocs/commande/list.php | 6 +++---
htdocs/compta/facture/list.php | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index 75b5f5eb633..dcba8a63ed8 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -471,7 +471,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, u.lastname, u.firstname, u.email, u.statut, u.entity as user_entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
+$sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity as user_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";
}
@@ -1708,8 +1708,8 @@ if ($resql) {
$userstatic->login = $obj->login;
$userstatic->lastname = $obj->lastname;
$userstatic->firstname = $obj->firstname;
- $userstatic->email = $obj->email;
- $userstatic->statut = $obj->statut;
+ $userstatic->email = $obj->user_email;
+ $userstatic->statut = $obj->user_statut;
$userstatic->entity = $obj->user_entity;
$userstatic->photo = $obj->photo;
$userstatic->office_phone = $obj->office_phone;
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index e0208d3cdcc..b3a0ec37167 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -426,7 +426,7 @@ $sql .= ' c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multic
$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, 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 .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_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 > 0) || ($search_categ_cus == -2)) {
@@ -1682,8 +1682,8 @@ if ($resql) {
$userstatic->login = $obj->login;
$userstatic->lastname = $obj->lastname;
$userstatic->firstname = $obj->firstname;
- $userstatic->email = $obj->email;
- $userstatic->statut = $obj->statut;
+ $userstatic->email = $obj->user_email;
+ $userstatic->statut = $obj->user_statut;
$userstatic->entity = $obj->entity;
$userstatic->photo = $obj->photo;
$userstatic->office_phone = $obj->office_phone;
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 117db3f0485..0cdd2140b5d 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -497,7 +497,7 @@ $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';
+$sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_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) {
@@ -1915,8 +1915,8 @@ if ($resql) {
$userstatic->login = $obj->login;
$userstatic->lastname = $obj->lastname;
$userstatic->firstname = $obj->firstname;
- $userstatic->email = $obj->email;
- $userstatic->statut = $obj->statut;
+ $userstatic->email = $obj->user_email;
+ $userstatic->statut = $obj->user_statut;
$userstatic->entity = $obj->entity;
$userstatic->photo = $obj->photo;
$userstatic->office_phone = $obj->office_phone;
From dbf7a9a0d063b86db324fe115be58ebeb5f02ae9 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Fri, 24 Sep 2021 11:48:43 +0200
Subject: [PATCH 24/77] FIX payment using wrong type in takepos when too many
payment mode
---
htdocs/takepos/pay.php | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php
index 6e22f27f7ff..60a4840471e 100644
--- a/htdocs/takepos/pay.php
+++ b/htdocs/takepos/pay.php
@@ -329,7 +329,7 @@ print '';
+ print '';
} else {
print '';
}
@@ -355,7 +355,7 @@ print '';
+ print '';
} else {
$button = array_pop($action_buttons);
print '';
@@ -382,7 +382,7 @@ print '';
+ print '';
} else {
$button = array_pop($action_buttons);
print '';
@@ -394,7 +394,23 @@ print '';
+ $paycode = $arrayOfValidPaymentModes[$i]->code;
+ $payIcon = '';
+ if ($paycode == 'LIQ') {
+ if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) {
+ $payIcon = 'coins';
+ }
+ } elseif ($paycode == 'CB') {
+ if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) {
+ $payIcon = 'credit-card';
+ }
+ } elseif ($paycode == 'CHQ') {
+ if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) {
+ $payIcon = 'money-check';
+ }
+ }
+
+ print '';
$i = $i + 1;
}
From 128bba1d9b798c67b5a0ef477893f8efce39a4b9 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Fri, 24 Sep 2021 13:29:03 +0200
Subject: [PATCH 25/77] Fix GETPOST
---
htdocs/reception/card.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php
index 57ef8981393..40b605bbe17 100644
--- a/htdocs/reception/card.php
+++ b/htdocs/reception/card.php
@@ -914,7 +914,7 @@ if ($action == 'create') {
$ent = "entrepot_".$reg[1].'_'.$reg[2];
$pu = "pu_".$reg[1].'_'.$reg[2]; // This is unit price including discount
$fk_commandefourndet = "fk_commandefourndet_".$reg[1].'_'.$reg[2];
- $dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' =>GETPOST($qty), 'ent' =>GETPOST($ent, 'int'), 'pu' =>GETPOST($pu), 'comment' =>GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'));
+ $dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' => GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' => GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'));
}
// with batch module enabled
@@ -929,13 +929,13 @@ if ($action == 'create') {
$ent = 'entrepot_'.$reg[1].'_'.$reg[2];
$pu = 'pu_'.$reg[1].'_'.$reg[2];
$lot = 'lot_number_'.$reg[1].'_'.$reg[2];
- $dDLUO = dol_mktime(12, 0, 0, $_POST['dluo_'.$reg[1].'_'.$reg[2].'month'], $_POST['dluo_'.$reg[1].'_'.$reg[2].'day'], $_POST['dluo_'.$reg[1].'_'.$reg[2].'year']);
- $dDLC = dol_mktime(12, 0, 0, $_POST['dlc_'.$reg[1].'_'.$reg[2].'month'], $_POST['dlc_'.$reg[1].'_'.$reg[2].'day'], $_POST['dlc_'.$reg[1].'_'.$reg[2].'year']);
+ $dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo_'.$reg[1].'_'.$reg[2].'month', 'int'), GETPOST('dluo_'.$reg[1].'_'.$reg[2].'day', 'int'), GETPOST('dluo_'.$reg[1].'_'.$reg[2].'year', 'int'));
+ $dDLC = dol_mktime(12, 0, 0, GETPOST('dlc_'.$reg[1].'_'.$reg[2].'month', 'int'), GETPOST('dlc_'.$reg[1].'_'.$reg[2].'day', 'int'), GETPOST('dlc_'.$reg[1].'_'.$reg[2].'year', 'int'));
$fk_commandefourndet = 'fk_commandefourndet_'.$reg[1].'_'.$reg[2];
- $dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' =>GETPOST($qty), 'ent' =>GETPOST($ent, 'int'), 'pu' =>GETPOST($pu), 'comment' =>GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'), 'DLC'=> $dDLC, 'DLUO'=> $dDLUO, 'lot'=> GETPOST($lot, 'alpha'));
+ $dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' =>GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' =>GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'), 'DLC'=> $dDLC, 'DLUO'=> $dDLUO, 'lot'=> GETPOST($lot, 'alpha'));
}
- // If create form is coming from same page post was sent but an error occured
+ // If create form is coming from same page, it means that post was sent but an error occured
if (preg_match('/^productid([0-9]+)$/i', $key, $reg)) {
$numAsked++;
@@ -951,7 +951,7 @@ if ($action == 'create') {
$dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo'.$reg[1].'month', 'int'), GETPOST('dluo'.$reg[1].'day', 'int'), GETPOST('dluo'.$reg[1].'year', 'int'));
$dDLC = dol_mktime(12, 0, 0, GETPOST('dlc'.$reg[1].'month', 'int'), GETPOST('dlc'.$reg[1].'day', 'int'), GETPOST('dlc'.$reg[1].'year', 'int'));
$fk_commandefourndet = 'fk_commandefournisseurdet'.$reg[1];
- $dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' =>GETPOST($qty), 'ent' =>GETPOST($ent, 'int'), 'pu' =>GETPOST($pu), 'comment' =>GETPOST($comment), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'), 'DLC'=> $dDLC, 'DLUO'=> $dDLUO, 'lot'=> GETPOST($lot, 'alpha'));
+ $dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' =>GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' =>GETPOST($comment), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'), 'DLC'=> $dDLC, 'DLUO'=> $dDLUO, 'lot'=> GETPOST($lot, 'alpha'));
}
}
From 8f5f657e4dcda80443599ed7c233a64a48a58e0f Mon Sep 17 00:00:00 2001
From: Alexandre SPANGARO
Date: Sat, 25 Sep 2021 07:12:33 +0200
Subject: [PATCH 26/77] FIX Accountancy - Missing specific filename for export
on format FEC2, Ciel & repare it
---
htdocs/accountancy/tpl/export_journal.tpl.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/htdocs/accountancy/tpl/export_journal.tpl.php b/htdocs/accountancy/tpl/export_journal.tpl.php
index 93215b9b8db..b595402228e 100644
--- a/htdocs/accountancy/tpl/export_journal.tpl.php
+++ b/htdocs/accountancy/tpl/export_journal.tpl.php
@@ -39,11 +39,11 @@ include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php';
$accountancyexport = new AccountancyExport($db);
// Specific filename for FEC model export into the general ledger
-if ($accountancyexport->getFormatCode($formatexportset) == ($accountancyexport::$EXPORT_TYPE_FEC || $accountancyexport::$EXPORT_TYPE_FEC2)
+if (($accountancyexport->getFormatCode($formatexportset) == 'fec' || $accountancyexport->getFormatCode($formatexportset) == 'fec2')
&& $type_export == "general_ledger") {
// FEC format is defined here: https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticle=LEGIARTI000027804775&cidTexte=LEGITEXT000006069583&dateTexte=20130802&oldAction=rechCodeArticle
if (empty($search_date_end)) {
- // TODO Get the max date into bookeeping table
+ // TODO Get the max date into bookkeeping table
$search_date_end = dol_now();
}
$datetouseforfilename = $search_date_end;
@@ -60,7 +60,7 @@ if ($accountancyexport->getFormatCode($formatexportset) == ($accountancyexport::
$endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard');
$completefilename = $siren."FEC".$endaccountingperiod.".txt";
-} elseif ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$EXPORT_TYPE_CIEL && $type_export == "general_ledger" && !empty($conf->global->ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME)) {
+} elseif ($accountancyexport->getFormatCode($formatexportset) == 'ciel' && $type_export == "general_ledger" && !empty($conf->global->ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME)) {
$completefilename = "XIMPORT.TXT";
} else {
$completefilename = ($code ? $code."_" : "").($prefix ? $prefix."_" : "").$filename.($nodateexport ? "" : $date_export).".".$format;
From 567334318aca2d7c5659aafdb23a6f1fcc1a07f1 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sat, 25 Sep 2021 21:13:55 +0200
Subject: [PATCH 27/77] Fix sql eventorganization
---
htdocs/core/actions_addupdatedelete.inc.php | 1 +
.../class/conferenceorboothattendee.class.php | 11 +++++++----
htdocs/install/mysql/migration/13.0.0-14.0.0.sql | 11 +++++++++--
...ventorganization_conferenceorboothattendee.key.sql | 6 +-----
4 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php
index f871ed73de8..44a0f159143 100644
--- a/htdocs/core/actions_addupdatedelete.inc.php
+++ b/htdocs/core/actions_addupdatedelete.inc.php
@@ -117,6 +117,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
if (!$error) {
$result = $object->create($user);
+ var_dump($object);exit;
if ($result > 0) {
// Creation OK
$urltogo = $backtopage ? str_replace('__ID__', $result, $backtopage) : $backurlforlist;
diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
index 572d6f13856..4d44bc13287 100644
--- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php
+++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
@@ -248,9 +248,9 @@ class ConferenceOrBoothAttendee extends CommonObject
}
$result = $this->createCommon($user, $notrigger);
- if ($result>0) {
- $result =$this->fetch($result);
- if ($result>0) {
+ if ($result > 0) {
+ $result = $this->fetch($result);
+ if ($result > 0) {
$this->ref = $this->id;
$result = $this->update($user);
}
@@ -293,7 +293,7 @@ class ConferenceOrBoothAttendee extends CommonObject
// Clear fields
if (property_exists($object, 'ref')) {
- $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default'];
+ $object->ref = empty($this->fields['ref']['default']) ? "(PROV)" : $this->fields['ref']['default'];
}
if (property_exists($object, 'label')) {
$object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default'];
@@ -327,6 +327,9 @@ class ConferenceOrBoothAttendee extends CommonObject
$error++;
$this->error = $object->error;
$this->errors = $object->errors;
+ } else {
+ $object->ref = $object->id;
+ $result = $object->update($user);
}
if (!$error) {
diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
index 63f20198658..ac9da2b1092 100644
--- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
+++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
@@ -425,14 +425,21 @@ CREATE TABLE llx_eventorganization_conferenceorboothattendee(
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_project integer NOT NULL;
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_invoice integer NULL;
+ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_soc;
+ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_actioncomm;
+ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_project;
+
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_rowid (rowid);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_ref (ref);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_soc (fk_soc);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_actioncomm (fk_actioncomm);
-ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_actioncomm FOREIGN KEY (fk_actioncomm) REFERENCES llx_actioncomm(id);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_email (email);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_status (status);
-ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_conferenceorboothattendee(fk_soc, fk_actioncomm, email);
+
+-- VMYSQL4.1 DROP INDEX uk_eventorganization_conferenceorboothattendee on llx_eventorganization_conferenceorboothattendee;
+-- VPGSQL8.2 DROP INDEX uk_eventorganization_conferenceorboothattendee;
+
+ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_conferenceorboothattendee(fk_project, email, fk_actioncomm);
create table llx_eventorganization_conferenceorboothattendee_extrafields
(
diff --git a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.key.sql b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.key.sql
index 0633e3cc2a2..9e1bbcde191 100644
--- a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.key.sql
+++ b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.key.sql
@@ -18,15 +18,11 @@
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_rowid (rowid);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_ref (ref);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_soc (fk_soc);
-ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_actioncomm (fk_actioncomm);
-ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_actioncomm FOREIGN KEY (fk_actioncomm) REFERENCES llx_actioncomm(id);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_project (fk_project);
-ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_project FOREIGN KEY (fk_project) REFERENCES llx_projet(rowid);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_email (email);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_status (status);
-- END MODULEBUILDER INDEXES
-ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_conferenceorboothattendee(fk_soc, fk_project, fk_actioncomm, email);
-
+ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_conferenceorboothattendee(fk_project, email, fk_actioncomm);
From a47cd224500a7ef53259385f34a8f7be9dea2191 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sat, 25 Sep 2021 21:15:53 +0200
Subject: [PATCH 28/77] Fix sql
---
htdocs/install/mysql/migration/13.0.0-14.0.0.sql | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
index ac9da2b1092..e6578a1bc66 100644
--- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
+++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
@@ -425,9 +425,9 @@ CREATE TABLE llx_eventorganization_conferenceorboothattendee(
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_project integer NOT NULL;
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_invoice integer NULL;
-ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_soc;
-ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_actioncomm;
-ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_project;
+ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP FOREIGN KEY fx_eventorganization_conferenceorboothattendee_fk_soc;
+ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP FOREIGN KEY fx_eventorganization_conferenceorboothattendee_fk_actioncomm;
+ALTER TABLE llx_eventorganization_conferenceorboothattendee DROP FOREIGN KEY fx_eventorganization_conferenceorboothattendee_fk_project;
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_rowid (rowid);
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_ref (ref);
From c02b5b08eaebe788deb10c98762153928d4d71f1 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sun, 26 Sep 2021 12:58:34 +0200
Subject: [PATCH 29/77] Fix trans
---
htdocs/eventorganization/conferenceorbooth_list.php | 2 +-
htdocs/eventorganization/conferenceorboothattendee_card.php | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index 5f6e2820591..9c086528120 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -41,7 +41,7 @@ global $dolibarr_main_url_root;
//dol_include_once('/othermodule/class/otherobject.class.php');
// Load translation files required by the page
-$langs->loadLangs(array("eventorganization", "other", "projects"));
+$langs->loadLangs(array("eventorganization", "other", "projects", "companies"));
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php
index 84f99182192..09cc8a12b57 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_card.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_card.php
@@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
// Load translation files required by the page
-$langs->loadLangs(array("eventorganization", "other"));
+$langs->loadLangs(array("eventorganization", "other", "projects", "companies"));
// Get parameters
$id = GETPOST('id', 'int');
@@ -110,6 +110,7 @@ $permissionnote = $user->rights->eventorganization->write; // Used by the includ
$permissiondellink = $user->rights->eventorganization->write; // Used by the include of actions_dellink.inc.php
$upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1];
+
/*
* Actions
*/
From cb964a3ab3fe62fa3050896822abf9f62d89f982 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sun, 26 Sep 2021 13:55:19 +0200
Subject: [PATCH 30/77] Fix cancel button
---
htdocs/eventorganization/conferenceorboothattendee_card.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php
index 09cc8a12b57..e6c03b0a74a 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_card.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_card.php
@@ -135,7 +135,7 @@ if (empty($reshook)) {
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
$backtopage = $backurlforlist;
} else {
- $backtopage = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?id='.($id > 0 ? $id : '__ID__');
+ $backtopage = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?fk_project='.((int) $fk_project).'&id='.($id > 0 ? $id : '__ID__');
}
}
}
From d5d4b8d8e09994a3f31e97870d6b61e409211eff Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sun, 26 Sep 2021 14:21:23 +0200
Subject: [PATCH 31/77] Fix escape the undescore on search in website module
---
htdocs/core/db/Database.interface.php | 8 ++++++++
htdocs/core/db/mysqli.class.php | 11 +++++++++++
htdocs/core/db/pgsql.class.php | 11 +++++++++++
htdocs/core/db/sqlite3.class.php | 11 +++++++++++
htdocs/core/lib/website.lib.php | 7 ++++---
htdocs/debugbar/class/TraceableDB.php | 11 +++++++++++
6 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/htdocs/core/db/Database.interface.php b/htdocs/core/db/Database.interface.php
index 898421978db..f3e5d45afef 100644
--- a/htdocs/core/db/Database.interface.php
+++ b/htdocs/core/db/Database.interface.php
@@ -177,6 +177,14 @@ interface Database
*/
public function escape($stringtoencode);
+ /**
+ * Escape a string to insert data
+ *
+ * @param string $stringtoencode String to escape
+ * @return string String escaped
+ */
+ public function escapeunderscore($stringtoencode);
+
/**
* Sanitize a string for SQL forging
*
diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php
index 343f4c8cc3e..3a8aabd3bf9 100644
--- a/htdocs/core/db/mysqli.class.php
+++ b/htdocs/core/db/mysqli.class.php
@@ -430,6 +430,17 @@ class DoliDBMysqli extends DoliDB
return $this->db->real_escape_string($stringtoencode);
}
+ /**
+ * Escape a string to insert data
+ *
+ * @param string $stringtoencode String to escape
+ * @return string String escaped
+ */
+ public function escapeunderscore($stringtoencode)
+ {
+ return str_replace('_', '\_', $stringtoencode);
+ }
+
/**
* Return generic error code of last operation.
*
diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php
index 5a9d47dc40c..543e24a1b12 100644
--- a/htdocs/core/db/pgsql.class.php
+++ b/htdocs/core/db/pgsql.class.php
@@ -700,6 +700,17 @@ class DoliDBPgsql extends DoliDB
return pg_escape_string($stringtoencode);
}
+ /**
+ * Escape a string to insert data
+ *
+ * @param string $stringtoencode String to escape
+ * @return string String escaped
+ */
+ public function escapeunderscore($stringtoencode)
+ {
+ return str_replace('_', '\_', $stringtoencode);
+ }
+
/**
* Format a SQL IF
*
diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php
index 563ccb19aac..008c7311ac8 100644
--- a/htdocs/core/db/sqlite3.class.php
+++ b/htdocs/core/db/sqlite3.class.php
@@ -635,6 +635,17 @@ class DoliDBSqlite3 extends DoliDB
return Sqlite3::escapeString($stringtoencode);
}
+ /**
+ * Escape a string to insert data
+ *
+ * @param string $stringtoencode String to escape
+ * @return string String escaped
+ */
+ public function escapeunderscore($stringtoencode)
+ {
+ return str_replace('_', '\_', $stringtoencode);
+ }
+
/**
* Renvoie le code erreur generique de l'operation precedente.
*
diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php
index 89fd777cd20..20380e02aab 100644
--- a/htdocs/core/lib/website.lib.php
+++ b/htdocs/core/lib/website.lib.php
@@ -866,11 +866,11 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so
$sql .= " AND (";
$searchalgo = '';
if (preg_match('/meta/', $algo)) {
- $searchalgo .= ($searchalgo ? ' OR ' : '')."wp.title LIKE '%".$db->escape($searchstring)."%' OR wp.description LIKE '%".$db->escape($searchstring)."%'";
- $searchalgo .= ($searchalgo ? ' OR ' : '')."wp.keywords LIKE '".$db->escape($searchstring).",%' OR wp.keywords LIKE '% ".$db->escape($searchstring)."%'"; // TODO Use a better way to scan keywords
+ $searchalgo .= ($searchalgo ? ' OR ' : '')."wp.title LIKE '%".$db->escapeunderscore($db->escape($searchstring))."%' OR wp.description LIKE '%".$db->escapeunderscore($db->escape($searchstring))."%'";
+ $searchalgo .= ($searchalgo ? ' OR ' : '')."wp.keywords LIKE '".$db->escapeunderscore($db->escape($searchstring)).",%' OR wp.keywords LIKE '% ".$db->escapeunderscore($db->escape($searchstring))."%'"; // TODO Use a better way to scan keywords
}
if (preg_match('/content/', $algo)) {
- $searchalgo .= ($searchalgo ? ' OR ' : '')."wp.content LIKE '%".$db->escape($searchstring)."%'";
+ $searchalgo .= ($searchalgo ? ' OR ' : '')."wp.content LIKE '%".$db->escapeunderscore($db->escape($searchstring))."%'";
}
$sql .= $searchalgo;
if (is_array($otherfilters) && !empty($otherfilters['category'])) {
@@ -879,6 +879,7 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so
$sql .= ")";
$sql .= $db->order($sortfield, $sortorder);
$sql .= $db->plimit($max);
+ //print $sql;
$resql = $db->query($sql);
if ($resql) {
diff --git a/htdocs/debugbar/class/TraceableDB.php b/htdocs/debugbar/class/TraceableDB.php
index af11f4c1d67..093e9b36280 100644
--- a/htdocs/debugbar/class/TraceableDB.php
+++ b/htdocs/debugbar/class/TraceableDB.php
@@ -250,6 +250,17 @@ class TraceableDB extends DoliDB
return $this->db->escape($stringtoencode);
}
+ /**
+ * Escape a string to insert data
+ *
+ * @param string $stringtoencode String to escape
+ * @return string String escaped
+ */
+ public function escapeunderscore($stringtoencode)
+ {
+ return $this->db->escapeunderscore($stringtoencode);
+ }
+
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Get last ID after an insert INSERT
From 6d92591358fb9974559397a00095b7cbb36d39d8 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sun, 26 Sep 2021 20:23:15 +0200
Subject: [PATCH 32/77] Fix look and feel v15
---
htdocs/admin/translation.php | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php
index 8d77e009cb3..7d78297b30d 100644
--- a/htdocs/admin/translation.php
+++ b/htdocs/admin/translation.php
@@ -37,6 +37,7 @@ if (!$user->admin) {
$id = GETPOST('rowid', 'int');
$action = GETPOST('action', 'aZ09');
$optioncss = GETPOST('optionscss', 'aZ09');
+$contextpage = GETPOST('contextpage', 'aZ09');
$langcode = GETPOST('langcode', 'alphanohtml');
$transkey = GETPOST('transkey', 'alphanohtml');
@@ -458,18 +459,8 @@ if ($mode == 'searchkey') {
print '';
print ' ';
- print '';
- print_liste_field_titre("Language_en_US_es_MX_etc", $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder);
- print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder);
- print_liste_field_titre("CurrentTranslationString", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder);
- //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,transkey', '', $param, '', $sortfield, $sortorder);
- print ' | ';
- print " \n";
- // Line to search new record
- print "\n";
-
- print '| ';
+ print ' | | ';
//print $formadmin->select_language($langcode,'langcode',0,null,$langs->trans("All"),0,0,'',1);
print $formadmin->select_language($langcode, 'langcode', 0, null, 0, 0, 0, 'maxwidth250', 1);
print ' | '."\n";
@@ -495,6 +486,15 @@ if ($mode == 'searchkey') {
print '';
print ' ';
+ print '';
+ print_liste_field_titre("Language_en_US_es_MX_etc", $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder);
+ print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder);
+ print_liste_field_titre("CurrentTranslationString", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder);
+ //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,transkey', '', $param, '', $sortfield, $sortorder);
+ print ' | ';
+ print " \n";
+
+
if ($sortfield == 'transkey' && strtolower($sortorder) == 'asc') {
ksort($recordtoshow);
}
From c9ae46db50f4aee2775ca0839f86b9ad08b00a44 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sun, 26 Sep 2021 20:56:17 +0200
Subject: [PATCH 33/77] FIX Filter on categories
---
htdocs/comm/propal/list.php | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index dcba8a63ed8..a0877a50028 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -475,7 +475,7 @@ $sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as u
if (!$user->rights->societe->client->voir && !$socid) {
$sql .= ", sc.fk_soc, sc.fk_user";
}
-if ($search_categ_cus) {
+if (!empty($search_categ_cus) && $search_categ_cus != '-1') {
$sql .= ", cc.fk_categorie, cc.fk_soc";
}
// Add fields from extrafields
@@ -493,7 +493,7 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
-if (!empty($search_categ_cus)) {
+if (!empty($search_categ_cus) && $search_categ_cus != '-1') {
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
}
$sql .= ', '.MAIN_DB_PREFIX.'propal as p';
@@ -592,6 +592,7 @@ if ($search_multicurrency_montant_ttc != '') {
if ($sall) {
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
}
+
if ($search_categ_cus > 0) {
$sql .= " AND cc.fk_categorie = ".((int) $search_categ_cus);
}
From 9b825df158852f81e9c03486d8b377c3f2b65644 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Mon, 27 Sep 2021 11:36:40 +0200
Subject: [PATCH 34/77] Clean code
---
htdocs/compta/facture/list.php | 2 +-
htdocs/societe/list.php | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 0cdd2140b5d..5023d818f78 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -520,7 +520,7 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
-if (!empty($search_categ_cus) && $search_categ_cus!=-1) {
+if (!empty($search_categ_cus) && $search_categ_cus != '-1') {
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
}
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 15c5e47cc99..988b2aad33e 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -89,9 +89,9 @@ $search_idprof4 = trim(GETPOST('search_idprof4', 'alpha'));
$search_idprof5 = trim(GETPOST('search_idprof5', 'alpha'));
$search_idprof6 = trim(GETPOST('search_idprof6', 'alpha'));
$search_vat = trim(GETPOST('search_vat', 'alpha'));
-$search_sale = trim(GETPOST("search_sale", 'int'));
-$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
-$search_categ_sup = trim(GETPOST("search_categ_sup", 'int'));
+$search_sale = GETPOST("search_sale", 'int');
+$search_categ_cus = GETPOST("search_categ_cus", 'int');
+$search_categ_sup = GETPOST("search_categ_sup", 'int');
$search_country = GETPOST("search_country", 'intcomma');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$search_price_level = GETPOST('search_price_level', 'int');
@@ -100,8 +100,8 @@ $search_status = GETPOST("search_status", 'int');
$search_type = GETPOST('search_type', 'alpha');
$search_level = GETPOST("search_level", "array");
$search_stcomm = GETPOST('search_stcomm', 'int');
-$search_import_key = GETPOST("search_import_key", "alpha");
-$search_parent_name = GETPOST('search_parent_name', 'alpha');
+$search_import_key = trim(GETPOST("search_import_key", "alpha"));
+$search_parent_name = trim(GETPOST('search_parent_name', 'alpha'));
$type = GETPOST('type', 'alpha');
$optioncss = GETPOST('optioncss', 'alpha');
@@ -494,7 +494,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_effectif as staff on (staff.id = s.fk_ef
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as region on (region. code_region = state.fk_region)";
// We'll need this table joined to the select in order to filter by categ
-if (!empty($search_categ_cus) && $search_categ_cus!=-1) {
+if (!empty($search_categ_cus) && $search_categ_cus != '-1') {
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
}
if (!empty($search_categ_sup) && $search_categ_sup!=-1) {
From b77cadf39ac87aef4124327b6e792f9cde661c4e Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Mon, 27 Sep 2021 11:38:34 +0200
Subject: [PATCH 35/77] Fix filter
---
htdocs/contact/list.php | 6 +++---
htdocs/fourn/facture/list.php | 2 +-
htdocs/societe/list.php | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index a63a1bf7e49..27c6208ad0d 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -570,13 +570,13 @@ if ($limit > 0 && $limit != $conf->liste_limit) {
}
$param .= '&begin='.urlencode($begin).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
$param .= '&type='.urlencode($type).'&view='.urlencode($view);
-if (!empty($search_categ)) {
+if (!empty($search_categ) && $search_categ != '-1') {
$param .= '&search_categ='.urlencode($search_categ);
}
-if (!empty($search_categ_thirdparty)) {
+if (!empty($search_categ_thirdparty) && $search_categ_thirdparty != '-1') {
$param .= '&search_categ_thirdparty='.urlencode($search_categ_thirdparty);
}
-if (!empty($search_categ_supplier)) {
+if (!empty($search_categ_supplier) && $search_categ_supplier != '-1') {
$param .= '&search_categ_supplier='.urlencode($search_categ_supplier);
}
if ($sall != '') {
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index ac64a9af82e..6c81904b794 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -441,7 +441,7 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
-if (!empty($search_categ_sup)) {
+if (!empty($search_categ_sup) && $search_categ_supplier != '-1') {
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs ON s.rowid = cs.fk_soc";
}
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 988b2aad33e..8b2236cd484 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -497,7 +497,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as region on (region. code_regio
if (!empty($search_categ_cus) && $search_categ_cus != '-1') {
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
}
-if (!empty($search_categ_sup) && $search_categ_sup!=-1) {
+if (!empty($search_categ_sup) && $search_categ_sup != '-1') {
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs ON s.rowid = cs.fk_soc"; // We'll need this table joined to the select in order to filter by categ
}
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."c_stcomm as st ON s.fk_stcomm = st.id";
From 6abe6462e6c1dde1f9e1cba2ba2049e52723e512 Mon Sep 17 00:00:00 2001
From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com>
Date: Mon, 27 Sep 2021 14:33:57 +0200
Subject: [PATCH 36/77] FIX: products/services card: hidden extrafields were
overridden
---
htdocs/product/card.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index d74cab0ada4..542c66dee25 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -487,7 +487,7 @@ if (empty($reshook))
if ($accountancy_code_buy_export <= 0) { $object->accountancy_code_buy_export = ''; } else { $object->accountancy_code_buy_export = $accountancy_code_buy_export; }
// Fill array 'array_options' with data from add form
- $ret = $extrafields->setOptionalsFromPost(null, $object);
+ $ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
if ($ret < 0) $error++;
if (!$error && $object->check())
From 0e1cc2b0965c79c787afe51f29fd621eb2f96a53 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Mon, 27 Sep 2021 18:46:27 +0200
Subject: [PATCH 37/77] Fix cost price is 0.
---
htdocs/bom/bom_card.php | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php
index ab6112c0fed..4396dd36e92 100644
--- a/htdocs/bom/bom_card.php
+++ b/htdocs/bom/bom_card.php
@@ -75,6 +75,7 @@ if ($object->id > 0) {
$object->calculateCosts();
}
+
// Security check - Protection if external user
//if ($user->socid > 0) accessforbidden();
//if ($user->socid > 0) $socid = $user->socid;
@@ -115,8 +116,13 @@ if (empty($reshook)) {
$triggermodname = 'BOM_MODIFY'; // Name of trigger action code to execute when we modify record
+
// Actions cancel, add, update, delete or clone
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
+ // The fetch/fetch_lines was redone into the inc.php so we must recall the calculateCosts()
+ if ($action == 'confirm_validate' && $object->id > 0) {
+ $object->calculateCosts();
+ }
// Actions when linking object each other
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
From ec3154075a71a7514a6778a86bc22f747afb59ec Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Mon, 27 Sep 2021 22:16:08 +0200
Subject: [PATCH 38/77] Comment
---
htdocs/install/mysql/migration/13.0.0-14.0.0.sql | 1 +
1 file changed, 1 insertion(+)
diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
index e6578a1bc66..db0e40790dc 100644
--- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
+++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
@@ -441,6 +441,7 @@ ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_evento
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_conferenceorboothattendee(fk_project, email, fk_actioncomm);
+
create table llx_eventorganization_conferenceorboothattendee_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
From 43ed88f056eb5f89b46b994d16deeb7944e5cb67 Mon Sep 17 00:00:00 2001
From: Alexandre SPANGARO
Date: Mon, 27 Sep 2021 23:02:19 +0200
Subject: [PATCH 39/77] FIX Propal list - Problem of pagination on date
---
htdocs/comm/propal/list.php | 144 ++++++++++++++++++++++++++++--------
1 file changed, 114 insertions(+), 30 deletions(-)
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index a0877a50028..692468b8485 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -13,9 +13,9 @@
* Copyright (C) 2016-2021 Ferran Marcet
* Copyright (C) 2017-2018 Charlene Benke
* Copyright (C) 2018 Nicolas ZABOURI
- * Copyright (C) 2019 Alexandre Spangaro
+ * Copyright (C) 2019-2021 Alexandre Spangaro
* Copyright (C) 2021 Anthony Berton
- * Copyright (C) 2021 Frédéric France
+ * Copyright (C) 2021 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -88,12 +88,30 @@ $search_zip = GETPOST('search_zip', 'alpha');
$search_state = GETPOST("search_state");
$search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
-$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
-$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
-$search_dateend_start = dol_mktime(0, 0, 0, GETPOST('search_dateend_startmonth', 'int'), GETPOST('search_dateend_startday', 'int'), GETPOST('search_dateend_startyear', 'int'));
-$search_dateend_end = dol_mktime(23, 59, 59, GETPOST('search_dateend_endmonth', 'int'), GETPOST('search_dateend_endday', 'int'), GETPOST('search_dateend_endyear', 'int'));
-$search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_startmonth', 'int'), GETPOST('search_datedelivery_startday', 'int'), GETPOST('search_datedelivery_startyear', 'int'));
-$search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_endmonth', 'int'), GETPOST('search_datedelivery_endday', 'int'), GETPOST('search_datedelivery_endyear', 'int'));
+$search_date_startday = GETPOST('search_date_startday', 'int');
+$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
+$search_date_startyear = GETPOST('search_date_startyear', 'int');
+$search_date_endday = GETPOST('search_date_endday', 'int');
+$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
+$search_date_endyear = GETPOST('search_date_endyear', 'int');
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
+$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
+$search_date_end_startday = GETPOST('search_date_end_startday', 'int');
+$search_date_end_startmonth = GETPOST('search_date_end_startmonth', 'int');
+$search_date_end_startyear = GETPOST('search_date_end_startyear', 'int');
+$search_date_end_endday = GETPOST('search_date_end_endday', 'int');
+$search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int');
+$search_date_end_endyear = GETPOST('search_date_end_endyear', 'int');
+$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver
+$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear);
+$search_date_delivery_startday = GETPOST('search_date_delivery_startday', 'int');
+$search_date_delivery_startmonth = GETPOST('search_date_delivery_startmonth', 'int');
+$search_date_delivery_startyear = GETPOST('search_date_delivery_startyear', 'int');
+$search_date_delivery_endday = GETPOST('search_date_delivery_endday', 'int');
+$search_date_delivery_endmonth = GETPOST('search_date_delivery_endmonth', 'int');
+$search_date_delivery_endyear = GETPOST('search_date_delivery_endyear', 'int');
+$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear);
+$search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear);
$search_availability = GETPOST('search_availability', 'int');
$search_categ_cus = GETPOST("search_categ_cus", 'int');
$search_fk_cond_reglement = GETPOST("search_fk_cond_reglement", 'int');
@@ -278,12 +296,30 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$search_type = '';
$search_country = '';
$search_type_thirdparty = '';
+ $search_date_startday = '';
+ $search_date_startmonth = '';
+ $search_date_startyear = '';
+ $search_date_endday = '';
+ $search_date_endmonth = '';
+ $search_date_endyear = '';
$search_date_start = '';
$search_date_end = '';
- $search_dateend_start = '';
- $search_dateend_end = '';
- $search_datedelivery_start = '';
- $search_datedelivery_end = '';
+ $search_date_end_startday = '';
+ $search_date_end_startmonth = '';
+ $search_date_end_startyear = '';
+ $search_date_end_endday = '';
+ $search_date_end_endmonth = '';
+ $search_date_end_endyear = '';
+ $search_date_end_start = '';
+ $search_date_end_end = '';
+ $search_date_delivery_startday = '';
+ $search_date_delivery_startmonth = '';
+ $search_date_delivery_startyear = '';
+ $search_date_delivery_endday = '';
+ $search_date_delivery_endmonth = '';
+ $search_date_delivery_endyear = '';
+ $search_date_delivery_start = '';
+ $search_date_delivery_end = '';
$search_availability = '';
$search_status = '';
$object_statut = '';
@@ -628,17 +664,17 @@ if ($search_date_start) {
if ($search_date_end) {
$sql .= " AND p.datep <= '".$db->idate($search_date_end)."'";
}
-if ($search_dateend_start) {
- $sql .= " AND p.fin_validite >= '".$db->idate($search_dateend_start)."'";
+if ($search_date_end_start) {
+ $sql .= " AND p.fin_validite >= '".$db->idate($search_date_end_start)."'";
}
-if ($search_dateend_end) {
- $sql .= " AND p.fin_validite <= '".$db->idate($search_dateend_end)."'";
+if ($search_date_end_end) {
+ $sql .= " AND p.fin_validite <= '".$db->idate($search_date_end_end)."'";
}
-if ($search_datedelivery_start) {
- $sql .= " AND p.date_livraison >= '".$db->idate($search_datedelivery_start)."'";
+if ($search_date_delivery_start) {
+ $sql .= " AND p.date_livraison >= '".$db->idate($search_date_delivery_start)."'";
}
-if ($search_datedelivery_end) {
- $sql .= " AND p.date_livraison <= '".$db->idate($search_datedelivery_end)."'";
+if ($search_date_delivery_end) {
+ $sql .= " AND p.date_livraison <= '".$db->idate($search_date_delivery_end)."'";
}
if ($search_sale > 0) {
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale);
@@ -713,12 +749,60 @@ if ($resql) {
if ($sall) {
$param .= '&sall='.urlencode($sall);
}
- if ($search_date_start) $param .= '&search_date_startday='.urlencode(dol_print_date($search_date_start, '%d')).'&search_date_startmonth='.urlencode(dol_print_date($search_date_start, '%m')).'&search_date_startyear='.urlencode(dol_print_date($search_date_start, '%Y'));
- if ($search_date_end) $param .= '&search_date_endday='.urlencode(dol_print_date($search_date_end, '%d')).'&search_date_endmonth='.urlencode(dol_print_date($search_date_end, '%m')).'&search_date_endyear='.urlencode(dol_print_date($search_date_end, '%Y'));
- if ($search_dateend_start) $param .= '&search_dateend_startday='.urlencode(dol_print_date($search_dateend_start, '%d')).'&search_dateend_startmonth='.urlencode(dol_print_date($search_dateend_start, '%m')).'&search_dateend_startyear='.urlencode(dol_print_date($search_dateend_start, '%Y'));
- if ($search_dateend_end) $param .= '&search_dateend_endday='.urlencode(dol_print_date($search_dateend_end, '%d')).'&search_dateend_endmonth='.urlencode(dol_print_date($search_dateend_end, '%m')).'&search_dateend_endyear='.urlencode(dol_print_date($search_dateend_end, '%Y'));
- if ($search_datedelivery_start) $param .= '&search_datedelivery_startday='.urlencode(dol_print_date($search_datedelivery_start, '%d')).'&search_datedelivery_startmonth='.urlencode(dol_print_date($search_datedelivery_start, '%m')).'&search_datedelivery_startyear='.urlencode(dol_print_date($search_datedelivery_start, '%Y'));
- if ($search_datedelivery_end) $param .= '&search_datedelivery_endday='.urlencode(dol_print_date($search_datedelivery_end, '%d')).'&search_datedelivery_endmonth='.urlencode(dol_print_date($search_datedelivery_end, '%m')).'&search_datedelivery_endyear='.urlencode(dol_print_date($search_datedelivery_end, '%Y'));
+ if ($search_date_startday) {
+ $param .= '&search_date_startday='.urlencode($search_date_startday);
+ }
+ if ($search_date_startmonth) {
+ $param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
+ }
+ if ($search_date_startyear) {
+ $param .= '&search_date_startyear='.urlencode($search_date_startyear);
+ }
+ if ($search_date_endday) {
+ $param .= '&search_date_endday='.urlencode($search_date_endday);
+ }
+ if ($search_date_endmonth) {
+ $param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
+ }
+ if ($search_date_endyear) {
+ $param .= '&search_date_endyear='.urlencode($search_date_endyear);
+ }
+ if ($search_date_end_startday) {
+ $param .= '&search_date_end_startday='.urlencode($search_date_end_startday);
+ }
+ if ($search_date_end_startmonth) {
+ $param .= '&search_date_end_startmonth='.urlencode($search_date_end_startmonth);
+ }
+ if ($search_date_end_startyear) {
+ $param .= '&search_date_end_startyear='.urlencode($search_date_end_startyear);
+ }
+ if ($search_date_end_endday) {
+ $param .= '&search_date_end_endday='.urlencode($search_date_end_endday);
+ }
+ if ($search_date_end_endmonth) {
+ $param .= '&search_date_end_endmonth='.urlencode($search_date_end_endmonth);
+ }
+ if ($search_date_end_endyear) {
+ $param .= '&search_date_end_endyear='.urlencode($search_date_end_endyear);
+ }
+ if ($search_date_delivery_startday) {
+ $param .= '&search_date_delivery_startday='.urlencode($search_date_delivery_startday);
+ }
+ if ($search_date_delivery_startmonth) {
+ $param .= '&search_date_delivery_startmonth='.urlencode($search_date_delivery_startmonth);
+ }
+ if ($search_date_delivery_startyear) {
+ $param .= '&search_date_delivery_startyear='.urlencode($search_date_delivery_startyear);
+ }
+ if ($search_date_delivery_endday) {
+ $param .= '&search_date_delivery_endday='.urlencode($search_date_delivery_endday);
+ }
+ if ($search_date_delivery_endmonth) {
+ $param .= '&search_date_delivery_endmonth='.urlencode($search_date_delivery_endmonth);
+ }
+ if ($search_date_delivery_endyear) {
+ $param .= '&search_date_delivery_endyear='.urlencode($search_date_delivery_endyear);
+ }
if ($search_ref) {
$param .= '&search_ref='.urlencode($search_ref);
}
@@ -1018,10 +1102,10 @@ if ($resql) {
if (!empty($arrayfields['p.fin_validite']['checked'])) {
print '';
print ' ';
- print $form->selectDate($search_dateend_start ? $search_dateend_start : -1, 'search_dateend_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
+ print $form->selectDate($search_date_end_start ? $search_date_end_start : -1, 'search_date_end_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
print ' ';
print '';
- print $form->selectDate($search_dateend_end ? $search_dateend_end : -1, 'search_dateend_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
+ print $form->selectDate($search_date_end_end ? $search_date_end_end : -1, 'search_date_end_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
print ' ';
print ' | ';
}
@@ -1029,10 +1113,10 @@ if ($resql) {
if (!empty($arrayfields['p.date_livraison']['checked'])) {
print '';
print ' ';
- print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
+ print $form->selectDate($search_date_delivery_start ? $search_date_delivery_start : -1, 'search_date_delivery_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
print ' ';
print '';
- print $form->selectDate($search_datedelivery_end ? $search_datedelivery_end : -1, 'search_datedelivery_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
+ print $form->selectDate($search_date_delivery_end ? $search_date_delivery_end : -1, 'search_date_delivery_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
print ' ';
print ' | ';
}
From 0750d4bb6e8fccaf568e235fae240eec5b25dcab Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Tue, 28 Sep 2021 00:21:54 +0200
Subject: [PATCH 40/77] Look and feel v14
---
htdocs/compta/prelevement/line.php | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php
index 5aa7344eea5..05bbb547102 100644
--- a/htdocs/compta/prelevement/line.php
+++ b/htdocs/compta/prelevement/line.php
@@ -151,7 +151,9 @@ if ($id) {
print $bon->getNomUrl(1).'';
print '| '.$langs->trans("Date").' | '.dol_print_date($bon->datec, 'day').' | ';
- print '| '.$langs->trans("Amount").' | '.price($lipre->amount).' | ';
+
+ print '| '.$langs->trans("Amount").' | '.price($lipre->amount).' | ';
+
print '| '.$langs->trans("Status").' | '.$lipre->LibStatut($lipre->statut, 1).' | ';
if ($lipre->statut == 3) {
@@ -159,6 +161,7 @@ if ($id) {
$resf = $rej->fetch($lipre->id);
if ($resf == 0) {
print '| '.$langs->trans("RefusedReason").' | '.$rej->motif.' | ';
+
print '| '.$langs->trans("RefusedData").' | ';
if ($rej->date_rejet == 0) {
/* Historique pour certaines install */
@@ -167,6 +170,7 @@ if ($id) {
print dol_print_date($rej->date_rejet, 'day');
}
print ' | ';
+
print '| '.$langs->trans("RefusedInvoicing").' | '.$rej->invoicing.' | ';
} else {
print '| '.$resf.' | ';
@@ -229,7 +233,7 @@ if ($id) {
/*
* Action bar
*/
- print "";
+ print ' ';
if ($action == '') {
if ($bon->statut == BonPrelevement::STATUS_CREDITED) {
@@ -245,7 +249,7 @@ if ($id) {
}
}
- print " ";
+ print ' ';
/*
* List of invoices
@@ -267,7 +271,7 @@ if ($id) {
if ($socid) {
$sql .= " AND s.rowid = ".((int) $socid);
}
- $sql .= " ORDER BY $sortfield $sortorder ";
+ $sql .= $db->order($sortfield, $sortorder);
$sql .= $db->plimit($conf->liste_limit + 1, $offset);
$result = $db->query($sql);
From e6e224f33cdaf0222cf06bb9ad167c310133a9c6 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Tue, 28 Sep 2021 11:53:00 +0200
Subject: [PATCH 41/77] Better translation
---
htdocs/admin/mails_templates.php | 9 +++++----
htdocs/langs/en_US/admin.lang | 2 +-
htdocs/user/group/card.php | 2 +-
htdocs/user/home.php | 4 ++--
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php
index 3545892d486..7d8bc2f22b1 100644
--- a/htdocs/admin/mails_templates.php
+++ b/htdocs/admin/mails_templates.php
@@ -160,6 +160,7 @@ if (empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) {
$tabhelp = array();
$tabhelp[25] = array(
+ 'label'=>$langs->trans('EnterAnyCode'),
'topic'=>''.$helpsubstit.'',
'joinfiles'=>$langs->trans('AttachMainDocByDefault'),
'content'=>''.$helpsubstit.'',
@@ -683,8 +684,8 @@ if ($action == 'view') {
$tmpaction = 'create';
$parameters = array(
- 'fieldlist' => $fieldlist,
- 'tabname' => $tabname[$id]
+ 'fieldlist' => $fieldlist,
+ 'tabname' => $tabname[$id]
);
$reshook = $hookmanager->executeHooks('createEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error;
@@ -822,7 +823,7 @@ if ($resql) {
print '';
} elseif ($value == 'fk_user') {
print '';
- print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 1, '', 0, '', 'maxwidth150');
+ print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 0, '', 0, '', 'maxwidth150');
print ' | ';
} elseif ($value == 'topic') {
print ' | ';
@@ -1187,7 +1188,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
if ($value == 'fk_user') {
print '';
if ($user->admin) {
- print $form->select_dolusers(empty($obj->{$value}) ? '' : $obj->{$value}, 'fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 1, '', 0, '', 'maxwidth200');
+ print $form->select_dolusers(empty($obj->{$value}) ? '' : $obj->{$value}, 'fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 0, '', 0, '', 'minwidth150 maxwidth300');
} else {
if ($context == 'add') { // I am not admin and we show the add form
print $user->getNomUrl(1); // Me
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 367f68e6a9b..d446e076dc3 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1921,7 +1921,7 @@ SellTaxRate=Sales tax rate
RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases.
UrlTrackingDesc=If the provider or transport service offers a page or web site to check the status of your shipments, you may enter it here. You can use the key {TRACKID} in the URL parameters so the system will replace it with the tracking number the user entered into the shipment card.
OpportunityPercent=When you create a lead, you will define an estimated amount of project/lead. According to status of the lead, this amount may be multiplied by this rate to evaluate a total amount all your leads may generate. Value is a percentage (between 0 and 100).
-TemplateForElement=This template record is dedicated to which element
+TemplateForElement=This mail template is related to what type of object? An email template is available only when using the "Send Email" button from the related object.
TypeOfTemplate=Type of template
TemplateIsVisibleByOwnerOnly=Template is visible to owner only
VisibleEverywhere=Visible everywhere
diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php
index 5c1e16e4a0c..56af96740d4 100644
--- a/htdocs/user/group/card.php
+++ b/htdocs/user/group/card.php
@@ -415,7 +415,7 @@ if ($action == 'create') {
print ''."\n";
print '| '.$langs->trans("NonAffectedUsers").' | '."\n";
print '';
- print $form->select_dolusers('', 'user', 1, $exclude, 0, '', '', $object->entity, 0, 0, '', 0, '', 'maxwidth300');
+ print $form->select_dolusers('', 'user', 1, $exclude, 0, '', '', $object->entity, 0, 0, '', 0, '', 'minwidth200 maxwidth500');
print ' ';
print '';
print '';
diff --git a/htdocs/user/home.php b/htdocs/user/home.php
index fbfe4638bd5..924dceb14ab 100644
--- a/htdocs/user/home.php
+++ b/htdocs/user/home.php
@@ -89,12 +89,12 @@ $searchbox .= '';
$searchbox .= '';
$searchbox .= '| '.$langs->trans("Search").' | ';
$searchbox .= '| ';
-$searchbox .= $langs->trans("User").': | | ';
+$searchbox .= $langs->trans("User").': | ';
// Search Group
if ($canreadperms) {
$searchbox .= '| ';
- $searchbox .= $langs->trans("Group").': | | ';
+ $searchbox .= $langs->trans("Group").': | ';
}
$searchbox .= ' | ';
From 0e3ec3ea2d82ea5e095d4d1cf06000e611858938 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Tue, 28 Sep 2021 11:56:43 +0200
Subject: [PATCH 42/77] Trans
---
htdocs/core/lib/functions.lib.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 370b10da626..f26b18152b9 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -6944,7 +6944,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$substitutionarray['__SECUREKEYPAYMENT_MEMBER__'] = 'Security key for payment on a member subscription (one key per member)';
$substitutionarray['__SECUREKEYPAYMENT_ORDER__'] = 'Security key for payment on an order';
$substitutionarray['__SECUREKEYPAYMENT_INVOICE__'] = 'Security key for payment on an invoice';
- $substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = 'Security key for payment on a a service';
+ $substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = 'Security key for payment on a service of a contract';
$substitutionarray['__DIRECTDOWNLOAD_URL_PROPOSAL__'] = 'Direct download url of a proposal';
$substitutionarray['__DIRECTDOWNLOAD_URL_ORDER__'] = 'Direct download url of an order';
From 2472dff67bd84284d36a121c4e5f832b19c51272 Mon Sep 17 00:00:00 2001
From: Indelog
Date: Tue, 28 Sep 2021 12:08:45 +0200
Subject: [PATCH 43/77] Fix FormFile::list_of_autoecmfiles object_instance
classname after hook
FormFile::list_of_autoecmfiles() can instantiate object with parameters
resulting of hook `addSectionECMAuto` but for do this,
it use `${$hookmanager->resArray['classname']}` which return a
`null`. Instead we should do this
`$hookmanager->resArray['classname']`.
---
htdocs/core/class/html.formfile.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 60054ecf5ad..71d8c02b5f2 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1672,7 +1672,7 @@ class FormFile
dol_include_once($hookmanager->resArray['classpath']);
if (array_key_exists('classname', $hookmanager->resArray) && !empty($hookmanager->resArray['classname'])) {
if (class_exists($hookmanager->resArray['classname'])) {
- $object_instance = new ${$hookmanager->resArray['classname']}($this->db);
+ $object_instance = new $hookmanager->resArray['classname']($this->db);
}
}
}
From a70f5dd90e89e87468ca5403fbe2fda940d3c734 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Tue, 28 Sep 2021 12:12:11 +0200
Subject: [PATCH 44/77] Doc
---
htdocs/core/class/extrafields.class.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 5c9401fca35..5b6fbf1ab9d 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -2047,9 +2047,9 @@ class ExtraFields
*
* @param array $extralabels Deprecated (old $array of extrafields, now set this to null)
* @param object $object Object
- * @param string $onlykey Only some keys are filled:$this
- * 'string' => When we make update of only one extrafield ($action = 'update_extras'), calling page can set this to avoid to have other extrafields being reset.
- * '@GETPOSTISSET' => When we make update of extrafields ($action = 'update'), calling page can set this to avoid to have fields not into POST being reset.
+ * @param string $onlykey Only some keys are filled:
+ * 'string' => When we make update of only one extrafield ($action = 'update_extras'), calling page can set this to avoid to have other extrafields being reset.
+ * '@GETPOSTISSET' => When we make update of several extrafields ($action = 'update'), calling page can set this to avoid to have fields not into POST being reset.
* @return int 1 if array_options set, 0 if no value, -1 if error (field required missing for example)
*/
public function setOptionalsFromPost($extralabels, &$object, $onlykey = '')
From 9426af8f6a1ea5f15b71f28a9b525043919c78d3 Mon Sep 17 00:00:00 2001
From: Alexandre SPANGARO
Date: Sat, 25 Sep 2021 07:49:08 +0200
Subject: [PATCH 45/77] NEW #18820 Accountancy - Add product account in
import/export of thirdparty (level 3)
---
htdocs/core/modules/modSociete.class.php | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index af4fb9e64b8..7c3d93499e4 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -281,6 +281,9 @@ class modSociete extends DolibarrModules
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
$this->export_fields_array[$r]['s.price_level'] = 'PriceLevel';
}
+ if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
+ $this->export_fields_array[$r] += array('s.accountancy_code_sell'=>'ProductAccountancySellCode', 's.accountancy_code_buy'=>'ProductAccountancyBuyCode');
+ }
// Add multicompany field
if (!empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) {
$nbofallowedentities = count(explode(',', getEntity('societe'))); // If project are shared, nb will be > 1
@@ -317,7 +320,8 @@ class modSociete extends DolibarrModules
'payterm.libelle'=>'Text', 'paymode.libelle'=>'Text',
's.outstanding_limit'=>'Numeric', 'pbacc.ref'=>'Text', 'incoterm.code'=>'Text',
'u.login'=>'Text', 'u.firstname'=>'Text', 'u.lastname'=>'Text',
- 's.entity'=>'Numeric', 's.price_level'=>'Numeric'
+ 's.entity'=>'Numeric', 's.price_level'=>'Numeric',
+ 's.accountancy_code_sell'=>'Text', 's.accountancy_code_buy'=>'Text'
);
$this->export_entities_array[$r] = array('u.login'=>'user', 'u.firstname'=>'user', 'u.lastname'=>'user'); // We define here only fields that use another picto
@@ -488,6 +492,9 @@ class modSociete extends DolibarrModules
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
$this->import_fields_array[$r]['s.price_level'] = 'PriceLevel';
}
+ if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
+ $this->import_fields_array[$r] += array('s.accountancy_code_sell'=>'ProductAccountancySellCode', 's.accountancy_code_buy'=>'ProductAccountancyBuyCode');
+ }
// Add extra fields
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
$resql = $this->db->query($sql);
@@ -621,7 +628,9 @@ class modSociete extends DolibarrModules
's.canvas' => "empty / a custom canvas form layout url e.g. mycanvas@mymodule",
's.datec' => 'formatted as '.dol_print_date(dol_now(), '%Y-%m-%d'),
's.fk_multicurrency' => '0 (use system default currency) / 1 (use local currency)',
- 's.multicurrency_code' => 'GBP/USD etc... matches field "code_iso" in table "'.MAIN_DB_PREFIX.'c_currencies"'
+ 's.multicurrency_code' => 'GBP/USD etc... matches field "code_iso" in table "'.MAIN_DB_PREFIX.'c_currencies"',
+ 's.accountancy_code_sell' => '707',
+ 's.accountancy_code_buy' => '607',
);
$this->import_updatekeys_array[$r] = array(
's.nom' => 'Name',
From fc56b88a1f7c5cbd6d3f0fcdcd9f8508c3b8c05d Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Tue, 28 Sep 2021 13:44:42 +0200
Subject: [PATCH 46/77] FIX select list of orders not complete when field type
of company is on
---
htdocs/commande/class/commande.class.php | 12 ++++++------
htdocs/commande/list.php | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 050b7251898..f02e74687af 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -299,13 +299,9 @@ class Commande extends CommonOrder
'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>28),
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20),
'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>1, 'visible'=>-1, 'position'=>25),
- 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
- 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>56),
- 'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
+ 'date_commande' =>array('type'=>'date', 'label'=>'Date', 'enabled'=>1, 'visible'=>1, 'position'=>60),
+ 'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>62),
'date_cloture' =>array('type'=>'datetime', 'label'=>'DateClosing', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
- 'date_commande' =>array('type'=>'date', 'label'=>'Date', 'enabled'=>1, 'visible'=>-1, 'position'=>70),
- 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
- 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>80),
'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
'fk_user_cloture' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserClosing', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
'source' =>array('type'=>'smallint(6)', 'label'=>'Source', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
@@ -344,6 +340,10 @@ class Commande extends CommonOrder
'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>270),
'module_source' =>array('type'=>'varchar(32)', 'label'=>'POSModule', 'enabled'=>1, 'visible'=>-1, 'position'=>275),
'pos_source' =>array('type'=>'varchar(32)', 'label'=>'POSTerminal', 'enabled'=>1, 'visible'=>-1, 'position'=>280),
+ 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'position'=>300),
+ 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>302),
+ 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>304),
+ 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>306),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>400),
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'position'=>500),
);
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index b3a0ec37167..e2ea9b2222c 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -545,7 +545,7 @@ if ($search_state) {
if ($search_country) {
$sql .= " AND s.fk_pays IN (".$db->sanitize($search_country).')';
}
-if ($search_type_thirdparty) {
+if ($search_type_thirdparty && $search_type_thirdparty != '-1') {
$sql .= " AND s.fk_typent IN (".$db->sanitize($search_type_thirdparty).')';
}
if ($search_company) {
@@ -787,7 +787,7 @@ if ($resql) {
if ($search_country != '') {
$param .= '&search_country='.urlencode($search_country);
}
- if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) {
+ if ($search_type_thirdparty && $search_type_thirdparty != '-1') {
$param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
}
if ($search_product_category != '') {
From 5b8b55cfba0e9459126fcffb6f2923b472cea8ba Mon Sep 17 00:00:00 2001
From: Indelog
Date: Tue, 28 Sep 2021 15:26:08 +0200
Subject: [PATCH 47/77] Fix append module suffix on src_object_type when create
ecm file
Files added to `llx_ecm_files` for externals modules never be removed on
object deletion.
When `CommonObject::deleteEcmFiles()` is called with `mode=1`, it use
this sql filter to find the file related to the object which is removed
:
```
$sql .= " WHERE fk_object IN (SELECT rowid FROM ".MAIN_DB_PREFIX."ecm_files WHERE src_object_type = '".$this->db->escape($this->table_element.(empty($this->module) ? '' : '@'.$this->module))."' AND src_object_id = ".((int) $this->id).")";
```
We see it append `'@'.$this->module` to `$this->table_element` but when
file is add to the `llx_ecm_files` by
`CommonObject::commonGenerateDocument()` , it added whiteout the
`'@'.$this->module` suffix. So the file is never remove from
`llx_ecm_files` when object is deleted.
This fix it by appending module suffix on `src_object_type` if object
has `module` property when add document to the `llx_ecm_files`.
---
htdocs/core/class/commonobject.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index d53b8829686..858d21d5e4d 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -5297,7 +5297,7 @@ abstract class CommonObject
$ecmfile->gen_or_uploaded = 'generated';
$ecmfile->description = ''; // indexed content
$ecmfile->keywords = ''; // keyword content
- $ecmfile->src_object_type = $this->table_element;
+ $ecmfile->src_object_type = $this->table_element.(empty($this->module) ? '' : '@'.$this->module);
$ecmfile->src_object_id = $this->id;
$result = $ecmfile->create($user);
From fae0337b3e58cc160afdd2bc20343a6563af47c2 Mon Sep 17 00:00:00 2001
From: Indelog
Date: Tue, 28 Sep 2021 16:22:28 +0200
Subject: [PATCH 48/77] Fix show for external module in ecm index auto page
This set the correct `modulepart` parameter for link generated to
`document.php` of ecm auto index page if `src_object_type` for
ecm document has a module suffix (`@modulename`).
---
htdocs/core/class/html.formfile.class.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 60054ecf5ad..55460c587d8 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1811,9 +1811,11 @@ class FormFile
print '';
// File
+ // Check if document source has external module part, if it the case use it for module part on document.php
+ preg_match('/^[^@]*@([^@]*)$/', $modulepart.'@expertisemedical', $modulesuffix);
print '';
//print "XX".$file['name']; //$file['name'] must be utf8
- print 'getDocumentsLink($modulepart, $modulesubdir, $filedir, '^'.preg_quote($file['name'],'/').'$');
- print $this->showPreview($file, $modulepart, $file['relativename']);
+ print $this->showPreview($file, (empty($modulesuffix) ? $modulepart : $modulesuffix[1]), $file['relativename']);
print " | \n";
From 43a47999d7261f60430bcb64a76e3aa8fd575fb6 Mon Sep 17 00:00:00 2001
From: Regis Houssin
Date: Tue, 28 Sep 2021 16:35:01 +0200
Subject: [PATCH 49/77] FIX avoid warning if $categories is an id
---
htdocs/core/class/commonobject.class.php | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index d53b8829686..ee1d9b51ede 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -9135,6 +9135,11 @@ abstract class CommonObject
*/
public function setCategoriesCommon($categories, $type_categ = '', $remove_existing = true)
{
+ // Handle single category
+ if (!is_array($categories)) {
+ $categories = array($categories);
+ }
+
dol_syslog(get_class($this)."::setCategoriesCommon Oject Id:".$this->id.' type_categ:'.$type_categ.' nb tag add:'.count($categories), LOG_DEBUG);
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
@@ -9144,11 +9149,6 @@ abstract class CommonObject
return -1;
}
- // Handle single category
- if (!is_array($categories)) {
- $categories = array($categories);
- }
-
// Get current categories
$c = new Categorie($this->db);
$existing = $c->containing($this->id, $type_categ, 'id');
From 1e840fe7ed17ea100906452a433a520a17952a38 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Tue, 28 Sep 2021 18:07:04 +0200
Subject: [PATCH 50/77] Code comment
---
htdocs/core/class/extrafields.class.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 5b6fbf1ab9d..abc2cd2bd49 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -2048,8 +2048,8 @@ class ExtraFields
* @param array $extralabels Deprecated (old $array of extrafields, now set this to null)
* @param object $object Object
* @param string $onlykey Only some keys are filled:
- * 'string' => When we make update of only one extrafield ($action = 'update_extras'), calling page can set this to avoid to have other extrafields being reset.
- * '@GETPOSTISSET' => When we make update of several extrafields ($action = 'update'), calling page can set this to avoid to have fields not into POST being reset.
+ * 'string' => When we make update of only one extrafield ($action = 'update_extras'), calling page can set this to avoid to have other extrafields being reset.
+ * '@GETPOSTISSET' => When we make update of several extrafields ($action = 'update'), calling page can set this to avoid to have fields not into POST being reset.
* @return int 1 if array_options set, 0 if no value, -1 if error (field required missing for example)
*/
public function setOptionalsFromPost($extralabels, &$object, $onlykey = '')
From baadf2dc6c7de60b7ba97ff608eaa1f8a8f82d9b Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Sep 2021 01:51:34 +0200
Subject: [PATCH 51/77] Fix reposition
---
htdocs/core/class/html.formfile.class.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 60054ecf5ad..61c6ff3b310 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -136,6 +136,7 @@ class FormFile
$out .= ''."\n";
$out .= ''."\n";
$out .= ''."\n";
+ $out .= ''."\n";
}
$out .= '';
@@ -215,13 +216,13 @@ class FormFile
$langs->load('link');
$out .= '';
}
- $out .= 'trans("Upload").'"';
$out .= (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm) ? ' disabled' : '');
$out .= '>';
if ($addcancel) {
$out .= ' ';
- $out .= '';
+ $out .= '';
}
if (!empty($conf->global->MAIN_UPLOAD_DOC)) {
@@ -275,6 +276,7 @@ class FormFile
$out .= ''."\n";
$out .= ''."\n";
$out .= ''."\n";
+ $out .= ''."\n";
}
$out .= '';
@@ -293,7 +295,7 @@ class FormFile
$out .= '';
$out .= ' ';
$out .= '';
- $out .= 'trans("ToLink").'"';
$out .= (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm) ? ' disabled' : '');
$out .= '>';
$out .= ' ';
From 6e08ecde0488c3defd398ab0a25f8970792431a1 Mon Sep 17 00:00:00 2001
From: Regis Houssin
Date: Wed, 29 Sep 2021 08:47:22 +0200
Subject: [PATCH 52/77] FIX indentation
---
htdocs/core/class/commonobject.class.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index ee1d9b51ede..1eb661471ae 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -9135,10 +9135,10 @@ abstract class CommonObject
*/
public function setCategoriesCommon($categories, $type_categ = '', $remove_existing = true)
{
- // Handle single category
- if (!is_array($categories)) {
- $categories = array($categories);
- }
+ // Handle single category
+ if (!is_array($categories)) {
+ $categories = array($categories);
+ }
dol_syslog(get_class($this)."::setCategoriesCommon Oject Id:".$this->id.' type_categ:'.$type_categ.' nb tag add:'.count($categories), LOG_DEBUG);
From 10ea7ddeef9058119a9d149b1ea2b04646f90ce5 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Sep 2021 12:31:25 +0200
Subject: [PATCH 53/77] Fix link param
---
htdocs/contrat/list.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index 2438505a13c..bdbdb27331e 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -421,16 +421,16 @@ if ($search_dfyear != '') {
if ($search_dfmonth != '') {
$param .= '&search_dfmonth='.urlencode($search_dfmonth);
}
-if ($search_sale != '') {
+if ($search_sale > 0) {
$param .= '&search_sale='.urlencode($search_sale);
}
-if ($search_user != '') {
+if ($search_user > 0) {
$param .= '&search_user='.urlencode($search_user);
}
-if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) {
+if ($search_type_thirdparty > 0) {
$param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
}
-if ($search_product_category != '') {
+if ($search_product_category > 0) {
$param .= '&search_product_category='.urlencode($search_product_category);
}
if ($show_files) {
From a395ff5ee394dfa445356fd8b3ac1b7536b31fc5 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Sep 2021 16:19:47 +0200
Subject: [PATCH 54/77] Css
---
htdocs/admin/system/perf.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php
index 758a93a765d..bbfa4b85c41 100644
--- a/htdocs/admin/system/perf.php
+++ b/htdocs/admin/system/perf.php
@@ -63,7 +63,7 @@ print ' ';
print ''.$langs->trans("XDebug").': ';
$test = !function_exists('xdebug_is_enabled');
if ($test) {
- print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotSlowedDownByThis");
+ print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' '.$langs->trans("NotSlowedDownByThis").'';
} else {
print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("XDebug"));
print ' - '.$langs->trans("MoreInformation").' XDebug admin page';
From 34dacca77c8241e97b6b0f5559a0b87b7fd04005 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Sep 2021 16:31:40 +0200
Subject: [PATCH 55/77] Css
---
htdocs/core/lib/functions.lib.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index f26b18152b9..e0dcc51917b 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3704,7 +3704,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'action'=>'infobox-action', 'account'=>'infobox-bank_account', 'accountline'=>'infobox-bank_account', 'accountancy'=>'infobox-bank_account', 'asset'=>'infobox-bank_account',
'bank_account'=>'bg-infobox-bank_account',
'bill'=>'infobox-commande', 'billa'=>'infobox-commande', 'billr'=>'infobox-commande', 'billd'=>'infobox-commande',
- 'conferenceorbooth'=>'infobox-project',
+ 'margin'=>'infobox-bank_account', 'conferenceorbooth'=>'infobox-project',
'cash-register'=>'infobox-bank_account', 'contract'=>'infobox-contrat', 'check'=>'font-status4', 'collab'=>'infobox-action', 'conversation'=>'infobox-contrat',
'donation'=>'infobox-commande', 'dolly'=>'infobox-commande', 'dollyrevert'=>'flip infobox-order_supplier',
'ecm'=>'infobox-action', 'eventorganization'=>'infobox-project',
From 1d35d8fd2d679c6beccc13fb034de2c4de02fe90 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Sep 2021 16:42:52 +0200
Subject: [PATCH 56/77] CSS popup company
---
htdocs/societe/class/societe.class.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index e7597b311c2..818d5249a6c 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2575,13 +2575,13 @@ class Societe extends CommonObject
$label .= ' '.$this->getLibStatut(5);
}
- if (!empty($this->name)) {
- $label .= ' '.$langs->trans('Name').': '.dol_escape_htmltag($this->name);
- if (!empty($this->name_alias)) {
- $label .= ' ('.dol_escape_htmltag($this->name_alias).')';
- }
+ $label .= ' '.$langs->trans('Name').': '.dol_escape_htmltag($this->name);
+ if (!empty($this->name_alias)) {
+ $label .= ' ('.dol_escape_htmltag($this->name_alias).')';
+ }
+ if ($this->email) {
+ $label .= ' '.img_picto('', 'email', 'class="pictofixedwidth"').$this->email;
}
- $label .= ' '.img_picto('', 'email', 'class="pictofixedwidth"').$this->email;
if (!empty($this->phone) || !empty($this->fax)) {
$phonelist = array();
if ($this->phone) {
From 52fb627a64501c9d3f099450403f4bb46f9463c6 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Sep 2021 16:45:48 +0200
Subject: [PATCH 57/77] Look and feel v14
---
htdocs/adherents/type.php | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php
index 10560d38648..76099ff7d66 100644
--- a/htdocs/adherents/type.php
+++ b/htdocs/adherents/type.php
@@ -318,6 +318,19 @@ if (!$rowid && $action != 'create' && $action != 'edit') {
print "";
$i++;
}
+
+ // If no record found
+ if ($num == 0) {
+ /*$colspan = 1;
+ foreach ($arrayfields as $key => $val) {
+ if (!empty($val['checked'])) {
+ $colspan++;
+ }
+ }*/
+ $colspan = 8;
+ print '| '.$langs->trans("NoRecordFound").' | ';
+ }
+
print " ";
print '';
From 2dd55301deb1e41310893bbb292ea17466b3201e Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Sep 2021 17:06:51 +0200
Subject: [PATCH 58/77] Fix duplicate field and look and feel
---
htdocs/opensurvey/card.php | 20 ++++++--------------
htdocs/opensurvey/wizard/create_survey.php | 6 +++---
2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php
index fd9fa3e0456..40e9d14adca 100644
--- a/htdocs/opensurvey/card.php
+++ b/htdocs/opensurvey/card.php
@@ -251,18 +251,6 @@ if ($action == 'edit') {
}
print '';
-// EMail
-//If linked user, then emails are going to be sent to users' email
-if (!$object->fk_user_creat) {
- print '| '.$langs->trans("EMail").' | ';
- if ($action == 'edit') {
- print '';
- } else {
- print dol_print_email($object->mail_admin, 0, 0, 1);
- }
- print ' | ';
-}
-
// Receive an email with each vote
print '| '.$langs->trans('ToReceiveEMailForEachVote').' | ';
if ($action == 'edit') {
@@ -312,10 +300,14 @@ print ' | ';
// Author
print '| ';
print $langs->trans("Author").' | ';
-if ($object->fk_user_creat) {
+if ($object->fk_user_creat > 0) {
print $userstatic->getLoginUrl(1);
} else {
- print dol_htmlentities($object->nom_admin);
+ if ($action == 'edit') {
+ print '';
+ } else {
+ print dol_print_email($object->mail_admin, 0, 0, 1);
+ }
}
print ' | ';
diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php
index 30e662be7ea..6ed1f2073d2 100644
--- a/htdocs/opensurvey/wizard/create_survey.php
+++ b/htdocs/opensurvey/wizard/create_survey.php
@@ -170,7 +170,7 @@ if ($_SESSION["mailsonde"]) {
$cochemail = "checked";
}
-print ' '.$langs->trans("ToReceiveEMailForEachVote").' '."\n";
+print ' '."\n";
if ($_SESSION['allow_comments']) {
$allow_comments = 'checked';
@@ -178,7 +178,7 @@ if ($_SESSION['allow_comments']) {
if (GETPOSTISSET('allow_comments')) {
$allow_comments = GETPOST('allow_comments') ? 'checked' : '';
}
-print ' '.$langs->trans('CanComment').' '."\n";
+print ' '."\n";
if ($_SESSION['allow_spy']) {
$allow_spy = 'checked';
@@ -186,7 +186,7 @@ if ($_SESSION['allow_spy']) {
if (GETPOSTISSET('allow_spy')) {
$allow_spy = GETPOST('allow_spy') ? 'checked' : '';
}
-print ' '.$langs->trans('CanSeeOthersVote').' '."\n";
+print ' '."\n";
if (GETPOST('choix_sondage')) {
if (GETPOST('choix_sondage') == 'date') {
From a495d5e9824458b7620551c508fb0da50026723f Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Sep 2021 17:14:37 +0200
Subject: [PATCH 59/77] Fix translation
---
htdocs/index.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/htdocs/index.php b/htdocs/index.php
index 0f457b0f40b..c4d3e5e4d78 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -336,6 +336,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
),
'supplier_proposal' =>
array(
+ 'lang' => 'supplier_proposal',
'groupName' => 'SupplierProposals',
'globalStatsKey' => 'askprice',
'stats' =>
@@ -485,6 +486,9 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
}
if (!empty($boards)) {
+ if (!empty($groupElement['lang'])) {
+ $langs->load($groupElement['lang']);
+ }
$groupName = $langs->trans($groupElement['groupName']);
$groupKeyLowerCase = strtolower($groupKey);
$nbTotalForGroup = 0;
From 11c48a53a5cfac791d4be3c03c4d53eddcd979d3 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Sep 2021 17:20:59 +0200
Subject: [PATCH 60/77] Fix name of file
---
...n_user_group.sql => llx_workstation_workstation_usergroup.sql} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename htdocs/install/mysql/tables/{llx_workstation_workstation_user_group.sql => llx_workstation_workstation_usergroup.sql} (100%)
diff --git a/htdocs/install/mysql/tables/llx_workstation_workstation_user_group.sql b/htdocs/install/mysql/tables/llx_workstation_workstation_usergroup.sql
similarity index 100%
rename from htdocs/install/mysql/tables/llx_workstation_workstation_user_group.sql
rename to htdocs/install/mysql/tables/llx_workstation_workstation_usergroup.sql
From 3d239e75288bb8ed97e1aca6cb5c7dd958efc74a Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Sep 2021 17:28:06 +0200
Subject: [PATCH 61/77] Trans
---
htdocs/admin/tools/purge.php | 2 +-
htdocs/langs/en_US/admin.lang | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php
index 09647549c8b..eb274163697 100644
--- a/htdocs/admin/tools/purge.php
+++ b/htdocs/admin/tools/purge.php
@@ -110,7 +110,7 @@ if (!empty($conf->syslog->enabled)) {
print '
';
+print '>
';
print '%s directory). Using this feature is not normally necessary. It is provided as a workaround for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files generated by the web server.
PurgeDeleteLogFile=Delete log files, including %s defined for Syslog module (no risk of losing data)
PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago.
-PurgeDeleteTemporaryFilesShort=Delete log and temporary files
+PurgeDeleteTemporaryFilesShort=Delete log and temporary files (no risk of losing data)
PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: %s. This will delete all generated documents related to elements (third parties, invoices etc...), files uploaded into the ECM module, database backup dumps and temporary files.
PurgeRunNow=Purge now
PurgeNothingToDelete=No directory or files to delete.
From fca39d91792ce0cb443704c84d8af3f9f71c0739 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Thu, 30 Sep 2021 01:15:36 +0200
Subject: [PATCH 62/77] css
---
htdocs/compta/index.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index ca7cd08a6fe..9cb9bca667b 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -206,6 +206,7 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
print '';
print '';
+
print '| ';
print $tmpinvoice->getNomUrl(1, '');
print ' | ';
@@ -222,15 +223,19 @@ if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) {
print ' ';
print ' | ';
- print '';
+
+ print ' | ';
print $thirdpartystatic->getNomUrl(1, 'customer', 44);
print ' | ';
if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) {
print ''.price($obj->total_ht).' | ';
}
print ''.price($obj->total_ttc).' | ';
+
print ''.dol_print_date($db->jdate($obj->tms), 'day').' | ';
+
print ''.$tmpinvoice->getLibStatut(3, $obj->am).' | ';
+
print '';
$total_ttc += $obj->total_ttc;
From 04fa5ff70b5d3d7d7526a81479e02acc67406472 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Thu, 30 Sep 2021 01:50:11 +0200
Subject: [PATCH 63/77] css
---
htdocs/holiday/define_holiday.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php
index fdcdb5f88e6..621443fb408 100644
--- a/htdocs/holiday/define_holiday.php
+++ b/htdocs/holiday/define_holiday.php
@@ -358,7 +358,7 @@ if (count($typeleaves) == 0) {
//var_dump($users['rowid'].' - '.$val['rowid']);
print '';
if ($canedit) {
- print '';
+ print '';
} else {
print $nbtoshow;
}
From 4e86f872ca3b0634433fbe12a5798c880c86dab7 Mon Sep 17 00:00:00 2001
From: Norbert Penel
Date: Tue, 28 Sep 2021 13:46:03 +0200
Subject: [PATCH 64/77] it was impossible to update a task
after some investigation i saw those errors but they are maybe some more around here
---
htdocs/projet/class/api_tasks.class.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/htdocs/projet/class/api_tasks.class.php b/htdocs/projet/class/api_tasks.class.php
index e3d6af2de53..9366422002d 100644
--- a/htdocs/projet/class/api_tasks.class.php
+++ b/htdocs/projet/class/api_tasks.class.php
@@ -454,7 +454,7 @@ class Tasks extends DolibarrApi
throw new RestException(404, 'Task not found');
}
- if (!DolibarrApi::_checkAccessToResource('tasks', $this->project->id)) {
+ if (!DolibarrApi::_checkAccessToResource('task', $this->task->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
foreach ($request_data as $field => $value) {
@@ -488,7 +488,7 @@ class Tasks extends DolibarrApi
throw new RestException(404, 'Task not found');
}
- if (!DolibarrApi::_checkAccessToResource('tasks', $this->project->id)) {
+ if (!DolibarrApi::_checkAccessToResource('task', $this->task->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
From ae9643bbeff659ee7424cafba02eee6bfce616e8 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Thu, 30 Sep 2021 13:38:38 +0200
Subject: [PATCH 65/77] Update html.formfile.class.php
---
htdocs/core/class/html.formfile.class.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 71d8c02b5f2..53c00327746 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1672,7 +1672,8 @@ class FormFile
dol_include_once($hookmanager->resArray['classpath']);
if (array_key_exists('classname', $hookmanager->resArray) && !empty($hookmanager->resArray['classname'])) {
if (class_exists($hookmanager->resArray['classname'])) {
- $object_instance = new $hookmanager->resArray['classname']($this->db);
+ $tmpclassname = $hookmanager->resArray['classname'];
+ $object_instance = new $tmpclassname($this->db);
}
}
}
From 332fa77d902b87338c07904718dde58be55b3b07 Mon Sep 17 00:00:00 2001
From: Florian HENRY
Date: Thu, 30 Sep 2021 13:49:02 +0200
Subject: [PATCH 66/77] fix: search code on tva dict
---
htdocs/admin/dict.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 5542ad43b2a..5e5793cc361 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -1048,6 +1048,7 @@ if ($id)
elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code);
elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code);
elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code);
+ elseif ($search_code != '' && $id == 10) $sql .= natural_search("t.code", $search_code);
elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code);
if ($sortfield)
From 620d7109b5b243237e6a53181edcc31f63cde198 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Thu, 30 Sep 2021 14:04:56 +0200
Subject: [PATCH 67/77] Update dict.php
---
htdocs/admin/dict.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 5e5793cc361..32db04c455f 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -1048,7 +1048,7 @@ if ($id)
elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code);
elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code);
elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code);
- elseif ($search_code != '' && $id == 10) $sql .= natural_search("t.code", $search_code);
+ elseif ($search_code != '' && $id == 10) $sql .= natural_search("t.code", $search_code);
elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code);
if ($sortfield)
From fc4a16b356a6e720f80ebca24cbc9a74af577e6f Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Thu, 30 Sep 2021 16:18:07 +0200
Subject: [PATCH 68/77] Fix avoid error when trigger run on downgraded version.
---
.../triggers/interface_90_modSociete_ContactRoles.class.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
index e2759eb3926..15c84bc41a1 100644
--- a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
+++ b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
@@ -79,7 +79,11 @@ class InterfaceContactRoles extends DolibarrTriggers
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
$contactdefault = new Contact($this->db);
$contactdefault->socid = $socid;
- $TContact = $contactdefault->getContactRoles($object->element);
+
+ $TContact = array();
+ if (method_exists($contactdefault, 'getContactRoles')) { // For backward compatibility
+ $TContact = $contactdefault->getContactRoles($object->element);
+ }
if (is_array($TContact) && !empty($TContact)) {
$TContactAlreadyLinked = array();
From 166d3b08d6ec719428ab7566750915e90215995c Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Thu, 30 Sep 2021 20:00:48 +0200
Subject: [PATCH 69/77] Add LIBXML_NONET to simplexml_load_string
---
htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php | 2 +-
htdocs/admin/system/dolibarr.php | 2 +-
htdocs/admin/system/filecheck.php | 2 +-
htdocs/admin/tools/update.php | 2 +-
htdocs/api/class/api_setup.class.php | 2 +-
htdocs/core/class/rssparser.class.php | 2 +-
htdocs/core/tpl/login.tpl.php | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php
index adaf82d6964..5a23133923e 100644
--- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php
+++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php
@@ -232,7 +232,7 @@ class PrestaShopWebservice
if ($response != '') {
libxml_clear_errors();
libxml_use_internal_errors(true);
- $xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA);
+ $xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
if (libxml_get_errors()) {
$msg = var_export(libxml_get_errors(), true);
libxml_clear_errors();
diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index 90e35c8e970..75ca036b92f 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -51,7 +51,7 @@ if ($action == 'getlastversion') {
$result = getURLContent('https://sourceforge.net/projects/dolibarr/rss');
//var_dump($result['content']);
if (function_exists('simplexml_load_string')) {
- $sfurl = simplexml_load_string($result['content']);
+ $sfurl = simplexml_load_string($result['content'], 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
} else {
setEventMessages($langs->trans("ErrorPHPDoesNotSupport", "xml"), null, 'errors');
}
diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php
index 272ac8d8f19..5ca87663c7a 100644
--- a/htdocs/admin/system/filecheck.php
+++ b/htdocs/admin/system/filecheck.php
@@ -171,7 +171,7 @@ if (GETPOST('target') == 'remote') {
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
$xmlfile = $xmlarray['content'];
//print "xmlfilestart".$xmlfile."xmlfileend";
- $xml = simplexml_load_string($xmlfile);
+ $xml = simplexml_load_string($xmlfile, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
} else {
$errormsg = $langs->trans('XmlNotFound').': '.$xmlremote.' - '.$xmlarray['http_code'].(($xmlarray['http_code'] == 400 && $xmlarray['content']) ? ' '.$xmlarray['content'] : '').' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg'];
setEventMessages($errormsg, null, 'errors');
diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php
index 821bcd9e3f3..8de6e32e8a0 100644
--- a/htdocs/admin/tools/update.php
+++ b/htdocs/admin/tools/update.php
@@ -61,7 +61,7 @@ $version = '0.0';
if ($action == 'getlastversion') {
$result = getURLContent('https://sourceforge.net/projects/dolibarr/rss');
//var_dump($result['content']);
- $sfurl = simplexml_load_string($result['content']);
+ $sfurl = simplexml_load_string($result['content'], 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
}
diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php
index f5f301e9c16..9856acfacdc 100644
--- a/htdocs/api/class/api_setup.class.php
+++ b/htdocs/api/class/api_setup.class.php
@@ -1683,7 +1683,7 @@ class Setup extends DolibarrApi
if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
$xmlfile = $xmlarray['content'];
//print "xmlfilestart".$xmlfile."endxmlfile";
- $xml = simplexml_load_string($xmlfile);
+ $xml = simplexml_load_string($xmlfile, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
} else {
$errormsg = $langs->trans('XmlNotFound').': '.$xmlremote.' - '.$xmlarray['http_code'].(($xmlarray['http_code'] == 400 && $xmlarray['content']) ? ' '.$xmlarray['content'] : '').' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg'];
throw new RestException(500, $errormsg);
diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php
index 6a8a91dbb05..c3c434d1aed 100644
--- a/htdocs/core/class/rssparser.class.php
+++ b/htdocs/core/class/rssparser.class.php
@@ -240,7 +240,7 @@ class RssParser
if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) {
//print 'xx'.LIBXML_NOCDATA;
libxml_use_internal_errors(false);
- $rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA);
+ $rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA|LIBXML_NOCDATA);
} else {
if (!function_exists('xml_parser_create')) {
$this->error = 'Function xml_parser_create are not supported by your PHP';
diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php
index 7b20e7209f7..7f460587248 100644
--- a/htdocs/core/tpl/login.tpl.php
+++ b/htdocs/core/tpl/login.tpl.php
@@ -346,7 +346,7 @@ if (!empty($conf->global->MAIN_EASTER_EGG_COMMITSTRIP)) {
$resgetcommitstrip = getURLContent("https://www.commitstrip.com/en/feed/");
}
if ($resgetcommitstrip && $resgetcommitstrip['http_code'] == '200') {
- $xml = simplexml_load_string($resgetcommitstrip['content']);
+ $xml = simplexml_load_string($resgetcommitstrip['content'], 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
$little = $xml->channel->item[0]->children('content', true);
print preg_replace('/width="650" height="658"/', '', $little->encoded);
}
From d68719226b7aac5cdb43c173427f2d8635b44ad4 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Fri, 1 Oct 2021 14:10:50 +0200
Subject: [PATCH 70/77] Fix can install module with name module_abc-x.y.z
(w).zip
---
htdocs/admin/modules.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 53cbc1aad69..00142deb9e8 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -133,7 +133,7 @@ if ($action == 'install') {
// $original_file should match format module_modulename-x.y[.z].zip
$original_file = basename($_FILES["fileinstall"]["name"]);
- $original_file = preg_replace('/\(\d+\)\.zip$/i', '.zip', $original_file);
+ $original_file = preg_replace('/\s*\(\d+\)\.zip$/i', '.zip', $original_file);
$newfile = $conf->admin->dir_temp.'/'.$original_file.'/'.$original_file;
if (!$original_file) {
From 2be2423dee0136679c95641f2db4a0fa9805dbaf Mon Sep 17 00:00:00 2001
From: JR-Polyline <91737050+JR-Polyline@users.noreply.github.com>
Date: Fri, 1 Oct 2021 21:30:25 +0800
Subject: [PATCH 71/77] Fix dynamic prices not updating
When Dynamic price module active and an a math expression is used to compute buy price on supplier product card, the calculated price does not update on the card when saved.
Changing line 849 appears to solve this without any ill effect.
---
htdocs/fourn/class/fournisseur.product.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php
index 3eaed8d27b8..230c794b038 100644
--- a/htdocs/fourn/class/fournisseur.product.class.php
+++ b/htdocs/fourn/class/fournisseur.product.class.php
@@ -846,7 +846,7 @@ class ProductFournisseur extends Product
$this->fourn_qty = $record["quantity"];
$this->fourn_remise_percent = $record["remise_percent"];
$this->fourn_remise = $record["remise"];
- $this->fourn_unitprice = $record["unitprice"];
+ $this->fourn_unitprice = $fourn_unitprice;
$this->fourn_charges = $record["charges"]; // deprecated
$this->fourn_tva_tx = $record["tva_tx"];
$this->fourn_id = $record["fourn_id"];
From fd7d1374c2f54dd17e63774680dbca6baa93b94e Mon Sep 17 00:00:00 2001
From: lvessiller
Date: Fri, 1 Oct 2021 16:37:54 +0200
Subject: [PATCH 72/77] FIX Product accountancy affectation with
product_perentity activated (PR #18620)
---
htdocs/accountancy/admin/productaccount.php | 27 +++++++++++++++++----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php
index e29653a3e40..58ffa9bd150 100644
--- a/htdocs/accountancy/admin/productaccount.php
+++ b/htdocs/accountancy/admin/productaccount.php
@@ -186,18 +186,35 @@ if ($action == 'update') {
$msg .= ''.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.' '.$sql.' ';
$ko++;
} else {
- $db->begin();
-
+ $sql = '';
if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_perentity (fk_product, entity, '".$db->escape($accountancy_field_name)."')";
- $sql .= " VALUES (".((int) $productid).", ".((int) $conf->entity).", '".$db->escape($accounting->account_number)."')";
- $sql .= " ON DUPLICATE KEY UPDATE ".$accountancy_field_name." = '".$db->escape($accounting->account_number)."'";
+ $sql_exists = "SELECT rowid FROM " . MAIN_DB_PREFIX . "product_perentity";
+ $sql_exists .= " WHERE fk_product = " . ((int) $productid) . " AND entity = " . ((int) $conf->entity);
+ $resql_exists = $db->query($sql_exists);
+ if (!$resql_exists) {
+ $msg .= ''.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.' '.$resql_exists.' ';
+ $ko++;
+ } else {
+ $nb_exists = $db->num_rows($resql_exists);
+ if ($nb_exists <= 0) {
+ // insert
+ $sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity (fk_product, entity, '" . $db->escape($accountancy_field_name) . "')";
+ $sql .= " VALUES (" . ((int) $productid) . ", " . ((int) $conf->entity) . ", '" . $db->escape($accounting->account_number) . "')";
+ } else {
+ $obj_exists = $db->fetch_object($resql_exists);
+ // update
+ $sql = "UPDATE " . MAIN_DB_PREFIX . "product_perentity";
+ $sql .= " SET " . $accountancy_field_name . " = '" . $db->escape($accounting->account_number) . "'";
+ $sql .= " WHERE rowid = " . ((int) $obj_exists->rowid);
+ }
+ }
} else {
$sql = " UPDATE ".MAIN_DB_PREFIX."product";
$sql .= " SET ".$accountancy_field_name." = '".$db->escape($accounting->account_number)."'";
$sql .= " WHERE rowid = ".((int) $productid);
}
+ $db->begin();
dol_syslog("/accountancy/admin/productaccount.php sql=".$sql, LOG_DEBUG);
if ($db->query($sql)) {
$ok++;
From d99b3d601a2d020bb17965045909a3d1814acb54 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sat, 2 Oct 2021 20:07:09 +0200
Subject: [PATCH 73/77] FIX #18854
---
htdocs/ecm/index.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php
index 3a8d33343c7..813ee69b6fb 100644
--- a/htdocs/ecm/index.php
+++ b/htdocs/ecm/index.php
@@ -42,6 +42,7 @@ if (!$section) {
$section = 0;
}
$section_dir = GETPOST('section_dir', 'alpha');
+$overwritefile = GETPOST('overwritefile', 'int');
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
@@ -120,7 +121,7 @@ if (GETPOST("sendit", 'alphanohtml') && !empty($conf->global->MAIN_UPLOAD_DOC))
if (!$error) {
$generatethumbs = 0;
- $res = dol_add_file_process($upload_dir, 0, 1, 'userfile', '', null, '', $generatethumbs);
+ $res = dol_add_file_process($upload_dir, $overwritefile, 1, 'userfile', '', null, '', $generatethumbs);
if ($res > 0) {
$result = $ecmdir->changeNbOfFiles('+');
}
From d6e1a6be93f3323b5ffff5478f4936d0443d2296 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sun, 3 Oct 2021 18:20:01 +0200
Subject: [PATCH 74/77] Look and feel v14
---
htdocs/core/class/html.form.class.php | 14 +++++++-------
htdocs/core/tpl/contacts.tpl.php | 10 +++++-----
.../eventorganization/conferenceorbooth_list.php | 1 +
.../conferenceorboothattendee_list.php | 1 +
htdocs/projet/tasks/time.php | 1 +
5 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 221e641ad8d..39d53e9dbc7 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1675,11 +1675,6 @@ class Form
if ($resql) {
$num = $this->db->num_rows($resql);
- if ($conf->use_javascript_ajax && !$forcecombo && !$options_only) {
- include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
- $out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT);
- }
-
if ($htmlname != 'none' && !$options_only) {
$out .= '';
}
+ if ($conf->use_javascript_ajax && !$forcecombo && !$options_only) {
+ include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
+ $out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT);
+ }
+
$this->num = $num;
return $out;
} else {
@@ -8529,8 +8529,8 @@ class Form
public function showFilterButtons()
{
$out = '';
- $out .= '';
- $out .= '';
+ $out .= '';
+ $out .= '';
$out .= ' ';
return $out;
diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php
index 1257d473ced..4ec84283345 100644
--- a/htdocs/core/tpl/contacts.tpl.php
+++ b/htdocs/core/tpl/contacts.tpl.php
@@ -135,19 +135,19 @@ if ($permission) {
+
';
} ?>
-
+
socid) ? 0 : $object->socid);
$selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?>
-
-
+
selectcontacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp');
+ print img_object('', 'contact', 'class="pictofixedwidth"').$form->selectcontacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp widthcentpercentminusxx maxwidth400');
$nbofcontacts = $form->num;
$newcardbutton = '';
@@ -157,7 +157,7 @@ if ($permission) {
print $newcardbutton;
?>
-
+
element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) {
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index 9c086528120..a002aa2844c 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -643,6 +643,7 @@ print ' ';
print ' ';
print ' ';
print ' ';
+print ' ';
$title = $langs->trans("ListOfConferencesOrBooths");
diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php
index 801ecb1d69f..849513710f7 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_list.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_list.php
@@ -697,6 +697,7 @@ print ' ';
print ' ';
print ' ';
print ' ';
+print ' ';
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.(empty($confOrBooth->id) ? '' : '&conforboothid='.$confOrBooth->id).$withProjectUrl), '', $permissiontoadd);
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 8e5877c7d0d..9e27f026c9d 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -992,6 +992,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
print ' ';
print ' ';
print ' ';
+ print ' ';
// Form to convert time spent into invoice
if ($massaction == 'generateinvoice') {
From 2c32c6c5c9b7d9b454068d37c85653c8bf87c58d Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sun, 3 Oct 2021 19:17:23 +0200
Subject: [PATCH 75/77] Fix contextpage for list of tickets
---
htdocs/theme/eldy/global.inc.php | 21 ++++++++++++++++++---
htdocs/ticket/list.php | 5 ++++-
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 79977faac6a..9ddaab40e65 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -1732,6 +1732,20 @@ td.showDragHandle {
display: inline-block;
}
+/*
+.classforhorizontalscrolloftabs .fiche .div-table-responsive
+{
+ transform:rotateX(180deg);
+ -ms-transform:rotateX(180deg);
+ -webkit-transform:rotateX(180deg);
+}
+.classforhorizontalscrolloftabs .fiche .div-table-responsive-inside
+{
+ transform:rotateX(180deg);
+ -ms-transform:rotateX(180deg);
+ -webkit-transform:rotateX(180deg);
+}
+*/
global->THEME_DISABLE_STICKY_TOPMENU)) { ?>
@@ -1842,10 +1856,11 @@ div.vmenu, td.vmenu {
display: none;
}
- /* if no side-nav, we don't need to have width forced */
+ /* if no side-nav, we don't need to have width forced to calc(100% - 210px); */
.classforhorizontalscrolloftabs #id-right {
- width: unset;
- display: unset;
+ width: 100%;
+ /* width: unset; */
+ /* display: unset; */
}
body.sidebar-collapse .login_block {
diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php
index c79a75e851c..6991516ede8 100644
--- a/htdocs/ticket/list.php
+++ b/htdocs/ticket/list.php
@@ -45,7 +45,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
-$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'tickep#selectedfieldstlist'; // To manage different context of search
+$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'ticketlist'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
@@ -698,6 +698,7 @@ print '';
print '';
print '';
print '';
+
if ($socid) {
print '';
}
@@ -759,6 +760,7 @@ $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfi
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print ''; // You can use div-table-responsive-no-min if you dont need reserved height for your table
+print ' ';
print ' '."\n";
@@ -1088,6 +1090,7 @@ print $hookmanager->resPrint;
print ' '."\n";
print ' '."\n";
+print ' '."\n";
print ''."\n";
From e46d064d5e4f5bb19757b649f4badb980483476f Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Sun, 3 Oct 2021 20:36:03 +0200
Subject: [PATCH 76/77] Clean text
---
README.md | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 7878f6270a7..5116c7b21ce 100644
--- a/README.md
+++ b/README.md
@@ -154,18 +154,18 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
### Other application/modules
-- Electronic Document Management (EDM)
+- Electronic Document Management (EDM)
- Bookmarks management
- Reporting
- Data export/import
-- Barcodes
+- Barcodes
- Margin calculations
- LDAP connectivity
- ClickToDial integration
- Mass emailing
- RSS integration
- Skype integration
-- Social platforms linking
+- Social platforms linking
- Payment platforms integration (PayPal, Stripe, Paybox...)
- Email-Collector
@@ -179,14 +179,11 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Multi-Users and groups with finely grained rights
- Multi-Currency
- Multi-Company (by adding of an external module)
-
- Very user friendly and easy to use
- customizable Dashboard
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
-
- APIs (REST, SOAP)
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
-
- Support a lot of country specific features:
- Spanish Tax RE and ISPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
@@ -197,7 +194,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Compatible with European GDPR rules
- ...
- Flexible PDF & ODT generation for invoices, proposals, orders...
-- …
+- ...
### System Environment / Requirements
From 91ee704dc3a28a32988ec65162aba9a301518429 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Mon, 4 Oct 2021 12:16:50 +0200
Subject: [PATCH 77/77] Move trans from admin to main
---
htdocs/langs/en_US/admin.lang | 1 -
htdocs/langs/en_US/main.lang | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 5f71e77eb71..58b21ca3554 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -131,7 +131,6 @@ IdModule=Module ID
IdPermissions=Permissions ID
LanguageBrowserParameter=Parameter %s
LocalisationDolibarrParameters=Localization parameters
-ClientTZ=Client Time Zone (user)
ClientHour=Client time (user)
OSTZ=Server OS Time Zone
PHPTZ=PHP server Time Zone
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index ddd60a9b68e..9fba774e7a5 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -1138,4 +1138,5 @@ InformationOnLinkToContract=This amount is only the total of all the lines of th
ConfirmCancel=Are you sure you want to cancel
EmailMsgID=Email MsgID
Forthcoming=Forthcoming
-Currently=Currently
\ No newline at end of file
+Currently=Currently
+ClientTZ=Client Time Zone (user)
| | | | |