From b6724f60616413527aaf274c369c3aea3f898ac7 Mon Sep 17 00:00:00 2001 From: Faustin Date: Tue, 7 Jun 2022 16:43:49 +0200 Subject: [PATCH 1/8] FIX #20696 --- htdocs/accountancy/bookkeeping/card.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index f9ec739e63d..0eaeed73d9e 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -533,23 +533,23 @@ if ($action == 'create') { print ''; print ''.$langs->trans("DateCreation").''; print ''; - print $object->date_creation ? dol_print_date($object->date_creation, 'day') : ' '; + print $object->date_creation ? dol_print_date($db->jdate($object->date_creation), 'day') : ' '; print ''; print ''; - // Date document creation + // Date document export print ''; print ''.$langs->trans("DateExport").''; print ''; - print $object->date_export ? dol_print_date($object->date_export, 'dayhour') : ' '; + print $object->date_export ? dol_print_date($db->jdate($object->date_export), 'dayhour') : ' '; print ''; print ''; - // Date document creation + // Date document validation print ''; print ''.$langs->trans("DateValidation").''; print ''; - print $object->date_validation ? dol_print_date($object->date_validation, 'dayhour') : ' '; + print $object->date_validation ? dol_print_date($db->jdate($object->date_validation), 'dayhour') : ' '; print ''; print ''; From f0a8765ee6d62fe94d0e2830561174b5726c2a83 Mon Sep 17 00:00:00 2001 From: Faustin Date: Wed, 8 Jun 2022 16:05:44 +0200 Subject: [PATCH 2/8] FIX #20696 --- htdocs/accountancy/bookkeeping/card.php | 6 +++--- htdocs/accountancy/class/bookkeeping.class.php | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 0eaeed73d9e..148608116e7 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -533,7 +533,7 @@ if ($action == 'create') { print ''; print ''.$langs->trans("DateCreation").''; print ''; - print $object->date_creation ? dol_print_date($db->jdate($object->date_creation), 'day') : ' '; + print $object->date_creation ? dol_print_date($object->date_creation, 'day') : ' '; print ''; print ''; @@ -541,7 +541,7 @@ if ($action == 'create') { print ''; print ''.$langs->trans("DateExport").''; print ''; - print $object->date_export ? dol_print_date($db->jdate($object->date_export), 'dayhour') : ' '; + print $object->date_export ? dol_print_date($object->date_export, 'dayhour') : ' '; print ''; print ''; @@ -549,7 +549,7 @@ if ($action == 'create') { print ''; print ''.$langs->trans("DateValidation").''; print ''; - print $object->date_validation ? dol_print_date($db->jdate($object->date_validation), 'dayhour') : ' '; + print $object->date_validation ? dol_print_date($object->date_validation, 'dayhour') : ' '; print ''; print ''; diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 5f3def1d3ee..5d2a9d63f9a 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1649,11 +1649,10 @@ class BookKeeping extends CommonObject $this->doc_date = $this->db->jdate($obj->doc_date); $this->doc_ref = $obj->doc_ref; $this->doc_type = $obj->doc_type; - $this->date_creation = $obj->date_creation; - $this->date_modification = $obj->date_modification; - $this->date_export = $obj->date_export; - $this->date_validation = $obj->date_validated; - $this->date_validation = $obj->date_validation; + $this->date_creation = $this->db->jdate($obj->date_creation); + $this->date_modification = $this->db->jdate($obj->date_modification); + $this->date_export = $this->db->jdate($obj->date_export); + $this->date_validation = $this->db->jdate($obj->date_validation); } else { $this->error = "Error ".$this->db->lasterror(); dol_syslog(__METHOD__.$this->error, LOG_ERR); From 70af9b548f453bf4f0650a5d83c149460fc01b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 9 Jun 2022 12:04:35 +0200 Subject: [PATCH 3/8] avoid extra space after idprof --- htdocs/societe/card.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index ca4a8a54775..311eea6bc8e 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2672,7 +2672,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print dol_print_profids($object->$key, 'ProfId'.$i, $object->country_code, 1); if ($object->$key) { if ($object->id_prof_check($i, $object) > 0) { - print '   '.$object->id_prof_url($i, $object); + if (!empty($object->id_prof_url($i, $object))) { + print '   '.$object->id_prof_url($i, $object); + } } else { print ' ('.$langs->trans("ErrorWrongValue").')'; } From 8a48cd5989e87c9578ccdaaadccbb6fb07367ade Mon Sep 17 00:00:00 2001 From: NASDAMI Quatadah Date: Thu, 9 Jun 2022 12:05:23 +0200 Subject: [PATCH 4/8] Fixing bug --- htdocs/projet/tasks/time.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index ef8ac6aa9df..0fb54aa1a48 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -246,7 +246,8 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us if (!$error) { if (GETPOST('taskid', 'int') != $id) { // GETPOST('taskid') is id of new task - $id = GETPOST('taskid', 'int'); + $id_temp = GETPOST('taskid', 'int'); // should not overwrite $id + $object->fetchTimeSpent(GETPOST('lineid', 'int')); @@ -255,7 +256,7 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $result = $object->delTimeSpent($user); } - $object->fetch($id, $ref); + $object->fetch($id_temp, $ref); $object->timespent_note = GETPOST("timespent_note_line", 'alpha'); $object->timespent_old_duration = GETPOST("old_duration"); From 3bb8e9cdda2f398ed3c190e43f870ad594addaa6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 Jun 2022 11:47:29 +0200 Subject: [PATCH 5/8] Debug v16 --- htdocs/compta/bank/categ.php | 2 +- htdocs/compta/bank/list.php | 2 +- htdocs/main.inc.php | 2 +- htdocs/product/fournisseurs.php | 8 ++++---- htdocs/product/price.php | 14 +++++++------- htdocs/product/stock/product.php | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index 2605bc39d30..aa60c1ddf41 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -113,7 +113,7 @@ if ($action != 'edit') { print ''; print ' '; print ''; - print ''; + print ''; print ''; } diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index d91a14f14cd..238b9919ef1 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -550,7 +550,7 @@ foreach ($accounts as $key => $type) { // Account type if (!empty($arrayfields['accountype']['checked'])) { - print ''; + print ''; print $objecttmp->type_lib[$objecttmp->type]; print ''; if (!$i) { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index d035661ba62..c5ef90a0ecd 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2247,7 +2247,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '') $btnUser = '