From 5077058df523fd193920842d5109711f506b6901 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 2 Mar 2026 15:21:52 +0100 Subject: [PATCH 01/11] Fix CI --- htdocs/comm/action/card.php | 4 ++-- htdocs/website/class/websitepage.class.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 37b873544a0..1e4f2335569 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -805,9 +805,9 @@ if (empty($reshook) && $action == 'add' && $usercancreate) { // increment date for recurrent events $datep = dol_time_plus_duree($datep, $dayoffset, 'd'); - $datep = dol_time_plus_duree($datep, $monthoffset, 'm'); + $datep = dol_time_plus_duree($datep, $monthoffset, 'm'); // @phan-suppress-current-line PhanPluginSuspiciousParamOrder $datef = dol_time_plus_duree($datef, $dayoffset, 'd'); - $datef = dol_time_plus_duree($datef, $monthoffset, 'm'); + $datef = dol_time_plus_duree($datef, $monthoffset, 'm'); // @phan-suppress-current-line PhanPluginSuspiciousParamOrder } } if (!empty($backtopage) && !$error) { diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 6479c26dde0..fd468c623b6 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -231,7 +231,7 @@ class WebsitePage extends CommonObject if ($phpcontent) { $this->error = 'Error: you try to create a page with PHP content without having permissions for that.'; - $this->errors = $this->error; + $this->errors[] = $this->error; return -1; } } From 293b5a0778755c7e7804f2de75ee967c2277c5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Lukas?= Date: Mon, 2 Mar 2026 20:10:33 +0100 Subject: [PATCH 02/11] Fix #37388 Change GETPOSTINT to GETPOST for form question (#37390) Co-authored-by: Laurent Destailleur --- htdocs/compta/paiement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index eb761f7aa88..d186be02751 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -165,7 +165,7 @@ if (empty($reshook)) { } } - $formquestion[$i++] = array('type' => 'hidden', 'name' => $key, 'value' => GETPOSTINT($key)); + $formquestion[$i++] = array('type' => 'hidden', 'name' => $key, 'value' => GETPOST($key)); } } From 749b45a16dcf37daf8aace158001836d825a99f5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 Mar 2026 14:24:04 +0100 Subject: [PATCH 03/11] Fix from may be empty --- htdocs/core/class/notify.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 5897b18fa83..350c4d89071 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -649,7 +649,10 @@ class Notify if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { $application = getDolGlobalString('MAIN_APPLICATION_TITLE'); } - $from = getDolGlobalString('NOTIFICATION_EMAIL_FROM', getDolGlobalString('MAIN_MAIL_EMAIL_FROM')); + $from = getDolGlobalString('NOTIFICATION_EMAIL_FROM'); + if (empty($from)) { + $from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); + } $object_type = ''; $link = ''; $num = 0; From 9940db94d98df5ed519ae4fc4fe5c749c26e04a3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Mar 2026 03:04:31 +0100 Subject: [PATCH 04/11] Debug v23 --- htdocs/core/lib/functions.lib.php | 34 +++++++++++++++++++------------ 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2efad4cce85..2a172f639e1 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3864,7 +3864,7 @@ function dol_strftime($fmt, $ts = false, $is_gmt = false) * 'tzuserrel' => output string is for user TZ (current browser TZ with dst or not, depending on date position) * @param ?Translate $outputlangs Object lang that contains language for text translation. * @param boolean $encodetooutput Use true to convert/encode string into the HTML rendering pagecode (false=keep UTF8 by default) - * @param int $decorate Use 1 to apply a HTML css style to decorate the date + * @param int|string $decorate Use 1 or a css to apply a HTML css style to decorate the date * @return string Formatted date or '' if time is null * * @see dol_mktime(), dol_stringtotime(), dol_getdate(), selectDate() @@ -4113,8 +4113,8 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs = } if ($decorate) { - $ret = preg_replace('/(\d\d:\d\d [AP]M)$/', '\1', $ret); - $ret = preg_replace('/(\d\d:\d\d)$/', '\1', $ret); + $ret = preg_replace('/(\d\d:\d\d [AP]M)$/', '\1', $ret); + $ret = preg_replace('/(\d\d:\d\d)$/', '\1', $ret); } return $ret; @@ -16387,7 +16387,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, 'datestart' => $db->jdate($obj->dp), 'dateend' => $db->jdate($obj->dp2), 'note' => $obj->label, - 'message' => dol_htmlentitiesbr($obj->message), + 'message' => $obj->message, 'percent' => $obj->percent, 'userid' => $obj->user_id, @@ -16417,7 +16417,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, 'datestart' => $db->jdate($obj->dp), 'dateend' => $db->jdate($obj->dp2), 'note' => $obj->label, - 'message' => dol_htmlentitiesbr($obj->message), + 'message' => $obj->message, 'percent' => $obj->percent, 'acode' => $obj->acode, @@ -16629,16 +16629,23 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, $out .= ''; // Date - $out .= ' '; + $out .= ' '; + $out .= ''; $out .= dol_print_date($histo[$key]['datestart'], 'day', 'tzuserrel'); - $out .= '   '.dol_print_date($histo[$key]['datestart'], 'hour', 'tzuserrel', null, false, 1); + //$out .= ''; + //$out .= ''. + $out .= ' '.dol_print_date($histo[$key]['datestart'], 'hour', 'tzuserrel', null, false, 'opacitymedium'); + //$out .= ''; if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart']) { $tmpa = dol_getdate($histo[$key]['datestart'], true); $tmpb = dol_getdate($histo[$key]['dateend'], true); if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) { - $out .= '-' . dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel', null, false, 1); + $out .= ' - ' . dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel', null, false, 1); } else { - $out .= '-' . dol_print_date($histo[$key]['dateend'], 'dayhour', 'tzuserrel', null, false, 1); + $out .= ' - ' . dol_print_date($histo[$key]['dateend'], 'day', 'tzuserrel'); + //$out .= ''; + $out .= ' '.dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel', null, false, 'opacitymedium'); + //$out .= ''; } } $late = 0; @@ -16749,20 +16756,21 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, ) { $out .= '
'; $truncateLines = getDolGlobalInt('MAIN_TRUNCATE_TIMELINE_MESSAGE', 3); - $truncatedText = dolGetFirstLineOfText($histo[$key]['message'], $truncateLines); - if ($truncateLines > 0 && strlen($histo[$key]['message']) > strlen($truncatedText)) { + $newmess = dol_htmlentitiesbr($histo[$key]['message']); + $truncatedText = dolGetFirstLineOfText($newmess, $truncateLines); + if ($truncateLines > 0 && strlen($newmess) > strlen($truncatedText)) { $out .= '
'; $out .= '
'; $out .= dolPrintHTML($truncatedText); $out .= '
' . $langs->trans("ReadMore") . ' '; $out .= '
'; $out .= '
'; - $out .= dolPrintHTML($histo[$key]['message']); + $out .= dolPrintHTML($newmess); $out .= ' ' . $langs->trans("ReadLess") . ''; $out .= '
'; $out .= '
'; } else { - $out .= dolPrintHTML($histo[$key]['message']); + $out .= dolPrintHTML($newmess); } $out .= '
'; From 6b7319384680242bf9e70663e1e91802555c1f1d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Mar 2026 11:03:17 +0100 Subject: [PATCH 05/11] Fix delete datapolicy batch. Bad sql --- htdocs/datapolicy/class/datapolicycron.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index 6d02140a37a..ba9b3f832a7 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -352,7 +352,7 @@ class DataPolicyCron '__DELAY__' => (string) $delay, '__NOW__' => "'" . $this->db->idate(dol_now()) . "'" ); - $sql = str_replace(array_keys($sqlPlaceholders), array_values($sqlPlaceholders), $policy['sql_template']); + $sql = str_replace(array_keys($sqlPlaceholders), array_values($sqlPlaceholders), $policy['sql_template'.($action == 'delete' ? '_delete' : '')]); $resql = $this->db->query($sql); From 9c0cdee7c6c8440dcc4d60a752fb027c88e1f1a0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Mar 2026 11:52:05 +0100 Subject: [PATCH 06/11] Fix css and truncation on creation of event --- htdocs/comm/action/card.php | 12 +++++++----- htdocs/core/class/html.form.class.php | 7 +++++-- htdocs/projet/ajax/projects.php | 4 ++-- htdocs/theme/eldy/global.inc.php | 2 ++ htdocs/theme/md/style.css.php | 2 ++ 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index e54e66f991b..65ee583f514 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1651,7 +1651,9 @@ if ($action == 'create') { print ''; // Assigned to user - print ''; } @@ -2021,7 +2023,7 @@ if ($action == 'create') { print dol_get_fiche_end(); - print $form->buttonsSaveCancel("Add"); + print $form->buttonsSaveCancel("Create"); print ""; } @@ -2418,7 +2420,7 @@ if ($id > 0 && $action != 'create') { selectTasks((!empty($societe->id) ? $societe->id : -1), $object->elementid, 'fk_element', 24, 0, '', 1, 0, 0, 'maxwidth500', (string) $object->fk_project, 'all', null, 1); + print $formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $object->elementid, 'fk_element', 64, 0, '', 1, 0, 0, 'maxwidth500', (string) $object->fk_project, 'all', null, 1); print ''; print ''; @@ -2451,7 +2453,7 @@ if ($id > 0 && $action != 'create') { $tid = GETPOSTINT("taskid"); } - print $formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $tid, 'taskid', 24, 0, '1', 1, 0, 0, 'maxwidth500 widthcentpercentminusxx', (string) $projectsListId, 'all', null, 1); + print $formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $tid, 'taskid', 64, 0, '1', 1, 0, 0, 'maxwidth500 widthcentpercentminusxx', (string) $projectsListId, 'all', null, 1); print ''; } else { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 52d39621600..90a99d25f13 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2667,7 +2667,8 @@ class Form $out .= '})'; $out .= img_picto('', 'user', 'class="pictofixedwidth"'); $out .= $this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter, 0, '', 'minwidth200'); - $out .= ' '; + $out .= ' '; $out .= ''; //$out .= '
'; } @@ -2769,7 +2770,9 @@ class Form } $out .= $formresources->select_resource_list(0, $htmlname, '', 1, 1, 0, $events, '', 2, 0, 'minwidth200'); //$out .= $this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter); - $out .= ' '; + $out .= ' '; $out .= '
'; } diff --git a/htdocs/projet/ajax/projects.php b/htdocs/projet/ajax/projects.php index 8b2dc432e60..df9b8c23a1f 100644 --- a/htdocs/projet/ajax/projects.php +++ b/htdocs/projet/ajax/projects.php @@ -46,7 +46,6 @@ if (!defined('NOREQUIREHTML')) { // Load Dolibarr environment require '../../main.inc.php'; - /** * @var Conf $conf * @var DoliDB $db @@ -63,6 +62,7 @@ $discard_closed = GETPOSTINT('discardclosed'); // Security check restrictedArea($user, 'projet', 0, 'projet&project'); + /* * View */ @@ -94,7 +94,7 @@ if ($mode == 'gettasks') { top_httphead(); $formproject = new FormProjets($db); - $formproject->selectTasks((!empty($socid) ? $socid : -1), 0, 'taskid', 24, 1, '1', 1, 0, 0, 'maxwidth500', (string) GETPOSTINT('projectid'), ''); + $formproject->selectTasks((!empty($socid) ? $socid : -1), 0, 'taskid', 64, 1, '1', 1, 0, 0, 'maxwidth500', (string) GETPOSTINT('projectid'), ''); $db->close(); diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index cd3da9ebd5f..1c8865e95b8 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -5359,6 +5359,8 @@ ul.noborder li:nth-child(even):not(.liste_titre) { .clearbothonsmartphone { clear: both; + } + .clearbothonsmartphone:not(.hideonsmartphone) { display: block !important; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f48effeadb8..a118a793f12 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -5360,6 +5360,8 @@ ul.noborder li:nth-child(even):not(.liste_titre) { .clearbothonsmartphone { clear: both; + } + .clearbothonsmartphone:not(.hideonsmartphone) { display: block !important; } From 641333e2ce27c6029135538f3d44f246d71b27c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Mar 2026 11:59:32 +0100 Subject: [PATCH 07/11] Fix trans --- htdocs/langs/fr_FR/exports.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/fr_FR/exports.lang b/htdocs/langs/fr_FR/exports.lang index 1657cdd661f..63d0942ac08 100644 --- a/htdocs/langs/fr_FR/exports.lang +++ b/htdocs/langs/fr_FR/exports.lang @@ -79,7 +79,7 @@ FieldsTarget=Champs cibles FieldTarget=Champ cible FieldSource=Champ source NbOfSourceLines=Nombre de lignes du fichier source -NowClickToTestTheImport=Vérifiez que le format fichier (délimiteurs de chaînes de caractères et) de votre fichier correspond aux options affichées et. Vous avez omis la ligne d'en-tête, sinon ces éléments seront signalés comme des erreurs lors de la simulation suivante.
Cliquez sur « Cliquez sur le bouton "%s" pour simuler le processus d'importation. Aucune donnée ne sera modifiée dans votre base de données. RunSimulateImportFile=Lancer la simulation d'import FieldNeedSource=Ce champ en base requiert obligatoirement une donnée source SomeMandatoryFieldHaveNoSource=Certains champs obligatoires n'ont pas de champ source issus du fichier From cf0ab8d30019674d47f13041da61d30a0e6590e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Mar 2026 12:51:56 +0100 Subject: [PATCH 08/11] Fix label of type --- htdocs/comm/action/class/actioncomm.class.php | 7 ++++++- htdocs/core/class/html.formactions.class.php | 11 ++++++----- htdocs/install/mysql/tables/llx_facture.sql | 4 ++-- htdocs/langs/en_US/agenda.lang | 1 + htdocs/langs/fr_FR/agenda.lang | 1 + 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index f770897bf8b..2b77b258bc9 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1986,7 +1986,7 @@ class ActionComm extends CommonObject /** * Return label of type of event * - * @param int $mode 0=Mode short, 1=Mode long + * @param int $mode 0=Mode short, 1=Mode long, 2=Mode very long * @return string HTML String */ public function getTypeLabel($mode = 0) @@ -2021,6 +2021,11 @@ class ActionComm extends CommonObject if ($this->type == 'systemauto' && $mode == 1) { $labeltype .= ' ('.$langs->trans("auto").')'; } + if ($this->type == 'systemauto' && $mode == 2) { + $labeltype = $langs->trans("AutoActions").($this->type_code == 'AC_OTH_AUTO' ? '' : ': '.$labeltype); + } elseif ($this->type != 'systemauto' && $mode == 2) { + $labeltype = $langs->trans("ManualActions").($this->type_code == 'AC_OTH' ? '' : ': '.$labeltype); + } return $labeltype; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 6f1749b92b3..3072ca7e3c1 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -276,7 +276,7 @@ class FormActions print getTitleFieldOfList('Ref', 0, $_SERVER["PHP_SELF"], '', (string) $page, $param, '', $sortfield, $sortorder, '', 1); print getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', (string) $page, $param, '', $sortfield, $sortorder, 'center ', 1); print getTitleFieldOfList('By', 0, $_SERVER["PHP_SELF"], '', (string) $page, $param, '', $sortfield, $sortorder, '', 1); - print getTitleFieldOfList('Type', 0, $_SERVER["PHP_SELF"], '', (string) $page, $param, '', $sortfield, $sortorder, '', 1); + print getTitleFieldOfList('Type', 0, $_SERVER["PHP_SELF"], '', (string) $page, $param, '', $sortfield, $sortorder, 'center ', 1); print getTitleFieldOfList('Title', 0, $_SERVER["PHP_SELF"], '', (string) $page, $param, '', $sortfield, $sortorder, '', 1); print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', (string) $page, $param, '', $sortfield, $sortorder, 'right ', 1); print ''; @@ -357,10 +357,11 @@ class FormActions //$actionstatic->type_code = 'AC_OTHER_AUTO' // Type - $labeltype = $actioncomm->getTypeLabel(0); - print '
'; // Label / Title diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 23493a68ab3..e09c1ed0cde 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -42,7 +42,7 @@ create table llx_facture date_valid date, -- date validation tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date date_closing datetime, -- date de cloture - paye smallint DEFAULT 0 NOT NULL, + paye smallint DEFAULT 0 NOT NULL, -- 1 if invoice is payed completely. Deprecated. Use instead statut = 2 and close_code is null or = '' remise_percent real DEFAULT 0, -- remise relative remise_absolue real DEFAULT 0, -- remise absolue @@ -59,7 +59,7 @@ create table llx_facture total_ht double(24,8) DEFAULT 0, -- amount total ht apres remise totale total_ttc double(24,8) DEFAULT 0, -- amount total ttc apres remise totale - fk_statut smallint DEFAULT 0 NOT NULL, + fk_statut smallint DEFAULT 0 NOT NULL, -- 2 means closed, but it may be closed payed partially if close_code has a code value. fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 801da0782f0..2d5ea0b2c12 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -29,6 +29,7 @@ ViewWeek=Week view ViewPerUser=Per user view ViewPerType=Per type view AutoActions= Automatic filling +ManualActions=Created manually by a user AgendaAutoActionDesc= Here you may define events which you want Dolibarr to create automatically in Agenda. If nothing is checked, only manual actions will be included in logs and displayed in Agenda. Automatic tracking of business actions done on objects (validation, status change) will not be saved. AgendaSetupOtherDesc= This page provides options to allow the export of your Dolibarr events into an external calendar (Thunderbird, Google Calendar etc...) AgendaExtSitesDesc=This page allows to declare external sources of calendars to see their events into Dolibarr agenda. diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index bb3979ebd85..1168a9ff640 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -29,6 +29,7 @@ ViewWeek=Vue semaine ViewPerUser=Vue par utilisateur ViewPerType=Vue par type AutoActions= Alimentation automatique +ManualActions=Créé manuellement par l'utilisateur AgendaAutoActionDesc= Définissez ici les événements pour lesquels Dolibarr créera automatiquement une entrée dans l'agenda. Si aucun n'est coché, seules les actions manuelles seront affichées dans l'agenda. Les événements sur les objets (validation, changement de statut, modification) ne seront pas enregistrées. AgendaSetupOtherDesc= Cette page permet de configurer quelques options permettant d'exporter une vue de votre agenda Dolibarr vers un calendrier externe (thunderbird, google calendar, ...) AgendaExtSitesDesc=Cette page permet d'ajouter des sources de calendriers externes pour les visualiser au sein de l'agenda Dolibarr. From a0b7852d65f66283c38a9822e17bf8a44ea592f6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Mar 2026 14:16:40 +0100 Subject: [PATCH 09/11] Fix missing link to list of events --- htdocs/compta/facture/card-rec.php | 11 ++++++----- htdocs/compta/facture/card.php | 9 +++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 500c479c843..20d97d75409 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -56,7 +56,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page $langs->loadLangs(array('bills', 'companies', 'compta', 'admin', 'other', 'products', 'banks')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOSTINT('show_files'); $confirm = GETPOST('confirm', 'alpha'); @@ -1634,7 +1634,7 @@ if ($action == 'create') { } // Author - print '"; @@ -2192,13 +2192,14 @@ if ($action == 'create') { $MAXEVENT = 10; - //$morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', dol_buildpath('/mymodule/myobject_agenda.php', 1).'?id='.$object->id); - $morehtmlcenter = ''; + $morehtmlcenter = '
'; + //$morehtmlcenter .= dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/compta/facture/messaging.php?id='.$object->id); + $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullList'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/compta/facture/agenda-rec.php?id='.$object->id); + $morehtmlcenter .= '
'; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $morehtmlcenter = ''; $somethingshown = $formactions->showactions($object, $object->element, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter); print ''; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 637280151ec..d1aeed46fcc 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -41,7 +41,7 @@ * \brief Page to create/see an invoice */ -// Libraries +// Load Dolibarr environment require '../../main.inc.php'; /** * @var Conf $conf @@ -91,14 +91,15 @@ if (isModEnabled('margin')) { } // General $Variables -$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility -$ref = GETPOST('ref', 'alpha'); -$socid = GETPOSTINT('socid'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used + +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility +$ref = GETPOST('ref', 'alpha'); +$socid = GETPOSTINT('socid'); $lineid = GETPOSTINT('lineid'); $origin = GETPOST('origin', 'alpha'); $originid = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id')); // For backward compatibility From 1650d96091f196e4bd470c0ffb25acab27007ef0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Mar 2026 16:52:48 +0100 Subject: [PATCH 10/11] FIX Pb with import of agendaevents. Date and import id not visible. --- htdocs/comm/action/class/actioncomm.class.php | 2 +- .../comm/action/class/cactioncomm.class.php | 15 ++-- htdocs/comm/action/list.php | 37 +++++++--- htdocs/core/class/html.formactions.class.php | 56 ++++++++------- htdocs/core/lib/agenda.lib.php | 4 +- htdocs/core/lib/company.lib.php | 72 ++++++++++--------- htdocs/core/modules/modAgenda.class.php | 9 ++- htdocs/core/modules/modProjet.class.php | 13 +++- htdocs/imports/import.php | 1 + htdocs/projet/card.php | 15 ++-- 10 files changed, 135 insertions(+), 89 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 2b77b258bc9..8a68623df47 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -457,7 +457,7 @@ class ActionComm extends CommonObject "recurid" => array("type" => "varchar(128)", "label" => "Recurid", "enabled" => "1", 'position' => 195, 'notnull' => 0, "visible" => "0",), "recurrule" => array("type" => "varchar(128)", "label" => "Recurrule", "enabled" => "1", 'position' => 200, 'notnull' => 0, "visible" => "0",), "recurdateend" => array("type" => "datetime", "label" => "Recurdateend", "enabled" => "1", 'position' => 205, 'notnull' => 0, "visible" => "0",), - "import_key" => array("type" => "varchar(14)", "label" => "ImportId", "enabled" => "1", 'position' => 900, 'notnull' => 0, "visible" => "0",), + "import_key" => array("type" => "varchar(14)", "label" => "ImportId", "enabled" => "1", 'position' => 900, 'notnull' => 0, "visible" => "-1",), "extraparams" => array("type" => "varchar(255)", "label" => "Extraparams", "enabled" => "1", 'position' => 215, 'notnull' => 0, "visible" => "0",), "calling_duration" => array("type" => "integer", "label" => "Callingduration", "enabled" => "1", 'position' => 220, 'notnull' => 0, "visible" => "0",), "visibility" => array("type" => "varchar(12)", "label" => "Visibility", "enabled" => "1", 'position' => 225, 'notnull' => 0, "visible" => "0",), diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 4a5689452a7..1ae7e6fce69 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -101,17 +101,22 @@ class CActionComm /** * Load action type from database * - * @param int|string $id id or code of action type to read + * @param int|string $id Id or code of action type to read + * @param string $code Code * @return int 1=ok, 0=not found, -1=error */ - public function fetch($id) + public function fetch($id, $code = '') { $sql = "SELECT id, code, type, libelle as label, color, active, picto"; $sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm"; - if (is_numeric($id)) { - $sql .= " WHERE id=".(int) $id; + if (!empty($id)) { + if (is_numeric($id)) { + $sql .= " WHERE id = ".(int) $id; + } else { // For backward compatibility + $sql .= " WHERE code = '".$this->db->escape($id)."'"; + } } else { - $sql .= " WHERE code='".$this->db->escape($id)."'"; + $sql .= " WHERE code = '".$this->db->escape($code)."'"; } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 0899fe6d5b3..f2efd3b4bec 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -67,6 +67,7 @@ $disabledefaultvalues = GETPOSTINT('disabledefaultvalues'); $resourceid = GETPOSTINT("search_resourceid") ? GETPOSTINT("search_resourceid") : GETPOSTINT("resourceid"); $pid = GETPOSTINT("search_projectid", 3) ? GETPOSTINT("search_projectid", 3) : GETPOSTINT("projectid", 3); $search_status = (GETPOST("search_status", 'aZ09') != '') ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); +$search_import_key = GETPOST("search_import_key"); $type = GETPOST('search_type', 'alphanohtml') ? GETPOST('search_type', 'alphanohtml') : GETPOST('type', 'alphanohtml'); $year = GETPOSTINT("year"); $month = GETPOSTINT("month"); @@ -255,6 +256,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $dateend_dtend = ''; $actioncode = ''; $search_status = ''; + $search_import_key = ''; $pid = ''; $socid = ''; $resourceid = ''; @@ -352,6 +354,9 @@ if ($resourceid > 0) { if ($search_status != '') { $param .= "&search_status=".urlencode($search_status); } +if ($search_import_key != '') { + $param .= "&search_import_key=".urlencode($search_import_key); +} if ($filter) { $param .= "&search_filter=".urlencode((string) $filter); } @@ -452,7 +457,7 @@ $sql .= " a.datep as dp, a.id, a.code, a.label, a.note, a.datep2 as dp2, a.fulld $sql .= " a.fk_user_author, a.fk_user_action,"; $sql .= " a.fk_contact, a.note, a.percent as percent,"; $sql .= " a.fk_element, a.elementtype, a.datec, a.tms as datem,"; -$sql .= " a.recurid, a.recurrule, a.recurdateend,"; +$sql .= " a.recurid, a.recurrule, a.recurdateend, a.import_key,"; $sql .= " c.code as type_code, c.libelle as type_label, c.color as type_color, c.type as type_type, c.picto as type_picto,"; $sql .= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail"; //$sql .= " sp.lastname, sp.firstname, sp.email, sp.phone, sp.address, sp.phone as phone_pro, sp.phone_mobile, sp.phone_perso, sp.fk_pays as country_id"; @@ -572,6 +577,9 @@ if ($search_status == 'done' || $search_status == '100') { if ($search_status == 'todo') { $sql .= " AND (a.percent >= 0 AND a.percent < 100)"; } +if ($search_import_key) { + $sql .= natural_search("a.import_key", $search_import_key); +} if ($search_id) { $sql .= natural_search("a.id", $search_id, 1); } @@ -725,10 +733,6 @@ if ($showbirthday) { } print $nav; -//print dol_get_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); -//print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, '', $filtert, '', $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid); -//print dol_get_fiche_end(); - $s = $newtitle; @@ -821,7 +825,7 @@ if ($massactionbutton) { $i = 0; print '
'; -print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, '', $filtert, '', $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid, $search_categ_cus); +print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, '', $filtert, '', $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid, $search_categ_cus, $search_import_key); print '
'; $moreforfilter = 1; @@ -896,6 +900,10 @@ if (!empty($arrayfields['a.datec']['checked'])) { if (!empty($arrayfields['a.tms']['checked'])) { print '
'; } +if (!empty($arrayfields['a.import_key']['checked'])) { + print ''; + print ''; +} if (!empty($arrayfields['a.percent']['checked'])) { print ''; + print ''; } // Date update if (!empty($arrayfields['a.tms']['checked'])) { - print ''; + print ''; } + // Import key + if (!empty($arrayfields['a.import_key']['checked'])) { + print ''; + } + // Status/Percent if (!empty($arrayfields['a.percent']['checked'])) { - // Status/Percent $datep = $db->jdate($obj->dp); - print ''; + print ''; } // Action column if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 3072ca7e3c1..47888d7bfe2 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -298,41 +298,43 @@ class FormActions // Date print ''; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 72be646d81c..863124b86a0 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -48,6 +48,7 @@ * @param ''|'systemauto'|'system' $excludetype A type to exclude ('systemauto', 'system', '') * @param int $resourceid Preselected value of resource for filter on resource * @param int $search_categ_cus Tag id + * @param string $search_import_key Import IDfilter * @return void */ function print_actions_filter( @@ -69,7 +70,8 @@ function print_actions_filter( $usergroupid = 0, $excludetype = '', $resourceid = 0, - $search_categ_cus = 0 + $search_categ_cus = 0, + $search_import_key = '' ) { global $user, $langs, $db, $hookmanager; global $massaction; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 4be5f19aa0d..c15da63c74c 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -2419,43 +2419,45 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr // Date $out .= '
'.$langs->trans("ActionAffectedTo").''; + print '
'; + print $langs->trans("AssignedTo"); + print ''; $listofuserid = []; $listofcontactid = []; $listofotherid = []; @@ -1850,7 +1852,7 @@ if ($action == 'create') { print ''; print ajax_combobox('taskid'); } else { - print $formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $tid, 'taskid', 32, 0, '1', 1, 0, 0, 'maxwidth500 widthcentpercentminusxx', (string) $projectsListId, 'all', null, 1); + print $formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $tid, 'taskid', 64, 0, '1', 1, 0, 0, 'maxwidth500 widthcentpercentminusxx', (string) $projectsListId, 'all', null, 1); } print '
'; - print $actioncomm->getTypePicto(); - print $labeltype; + $labeltypelong = $actioncomm->getTypeLabel(2); + print ''; + print $actioncomm->getTypePicto('valignmiddle'); + //$labeltype = $actioncomm->getTypeLabel(0); + //print $labeltype; print '
'.$langs->trans("Author").''; + print '
'.$langs->trans("Author").''; print $author->getNomUrl(-1); print "
'; $formactions->form_select_status_action('formaction', $search_status, 1, 'search_status', 1, 2, 'search_status width100 onrightofpage'); @@ -976,6 +984,11 @@ if (!empty($arrayfields['a.tms']['checked'])) { print_liste_field_titre($arrayfields['a.tms']['label'], $_SERVER["PHP_SELF"], "a.tms,a.id", "", $param, '', $sortfield, $sortorder, 'center '); $totalarray['nbfield']++; } +// Import ID +if (!empty($arrayfields['a.import_key']['checked'])) { + print_liste_field_titre("ImportId", $_SERVER["PHP_SELF"], "a.import_key", "", $param, '', $sortfield, $sortorder, 'center '); + $totalarray['nbfield']++; +} // Status if (!empty($arrayfields['a.percent']['checked'])) { print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "a.percent", "", $param, '', $sortfield, $sortorder, 'center '); @@ -1297,16 +1310,20 @@ while ($i < $imaxinloop) { // Date creation if (!empty($arrayfields['a.datec']['checked'])) { // Status/Percent - print ''.dol_print_date($db->jdate($obj->datec), 'dayhour', 'tzuserrel').''.dol_print_date($db->jdate($obj->datec), 'dayhour', 'tzuserrel').''.dol_print_date($db->jdate($obj->datem), 'dayhour', 'tzuserrel').''.dol_print_date($db->jdate($obj->datem), 'dayhour', 'tzuserrel').''.dolPrintHTML($obj->import_key).''.$actionstatic->LibStatut($obj->percent, 5, 0, $datep).''.$actionstatic->LibStatut($obj->percent, 5, 0, $datep).''; + $tmpa = dol_getdate($actioncomm->datep); if ($actioncomm->datef) { // There is also a end date - $tmpa = dol_getdate($actioncomm->datep); $tmpb = dol_getdate($actioncomm->datef); - if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) { - // The same day - print '
'; - if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes']) { - print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel'); - print '
'; - print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel'); - print '-'.dol_print_date($actioncomm->datef, 'hourreduceformat', 'tzuserrel'); - print ''; - } else { - print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel'); - print '
'; - print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel'); - print ''; - } - print '
'; + } else { + $tmpb = $tmpa; + } + if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) { + // The same day + print '
'; + if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes']) { + print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel'); + print '
'; + print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel'); + print '-'.dol_print_date($actioncomm->datef, 'hourreduceformat', 'tzuserrel'); + print ''; } else { - // Not the same day - print '
'; print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel'); print '
'; print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel'); print ''; - print '
'; - print ' '; - print '
'; - print dol_print_date($actioncomm->datef, 'dayreduceformat', 'tzuserrel'); - print '
'; - print dol_print_date($actioncomm->datef, 'hourreduceformat', 'tzuserrel'); - print ''; - print '
'; } + print '
'; + } else { + // Not the same day + print '
'; + print dol_print_date($actioncomm->datep, 'dayreduceformat', 'tzuserrel'); + print '
'; + print dol_print_date($actioncomm->datep, 'hourreduceformat', 'tzuserrel'); + print ''; + print '
'; + print ' '; + print '
'; + print dol_print_date($actioncomm->datef, 'dayreduceformat', 'tzuserrel'); + print '
'; + print dol_print_date($actioncomm->datef, 'hourreduceformat', 'tzuserrel'); + print ''; + print '
'; } print '
'; - if ($histo[$key]['dateend']) { // There is also a end date - $tmpa = dol_getdate($histo[$key]['datestart']); + $tmpa = dol_getdate($histo[$key]['datestart']); + if (!empty($histo[$key]['dateend'])) { $tmpb = dol_getdate($histo[$key]['dateend']); - if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) { - // The same day - if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes']) { - $out .= '
'; - $out .= dol_print_date($histo[$key]['datestart'], 'dayreduceformat', 'tzuserrel'); - $out .= '
'; - $out .= dol_print_date($histo[$key]['datestart'], 'hourreduceformat', 'tzuserrel'); - $out .= '-'.dol_print_date($histo[$key]['dateend'], 'hourreduceformat', 'tzuserrel'); - $out .= ''; - $out .= '
'; - } else { - $out .= '
'; - $out .= dol_print_date($histo[$key]['datestart'], 'dayreduceformat', 'tzuserrel'); - $out .= '
'; - $out .= dol_print_date($histo[$key]['datestart'], 'hourreduceformat', 'tzuserrel'); - $out .= ''; - $out .= '
'; - } + } else { + $tmpb = $tmpa; + } + if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) { + // The same day + if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes']) { + $out .= '
'; + $out .= dol_print_date($histo[$key]['datestart'], 'dayreduceformat', 'tzuserrel'); + $out .= '
'; + $out .= dol_print_date($histo[$key]['datestart'], 'hourreduceformat', 'tzuserrel'); + $out .= '-'.dol_print_date($histo[$key]['dateend'], 'hourreduceformat', 'tzuserrel'); + $out .= ''; + $out .= '
'; } else { - // Not the same day - $out .= '
'; - $out .= dol_print_date($histo[$key]['datestart'], 'dayreduceformat', 'tzuserrel'); - $out .= '
'; - $out .= dol_print_date($histo[$key]['datestart'], 'hourreduceformat', 'tzuserrel'); - $out .= ''; - $out .= '
'; - $out .= ' - '; - $out .= '
'; - $out .= dol_print_date($histo[$key]['dateend'], 'dayreduceformat', 'tzuserrel'); - $out .= '
'; - $out .= dol_print_date($histo[$key]['dateend'], 'hourreduceformat', 'tzuserrel'); - $out .= ''; - $out .= '
'; + $out .= '
'; + $out .= dol_print_date($histo[$key]['datestart'], 'dayreduceformat', 'tzuserrel'); + $out .= '
'; + $out .= dol_print_date($histo[$key]['datestart'], 'hourreduceformat', 'tzuserrel'); + $out .= ''; + $out .= '
'; } + } else { + // Not the same day + $out .= '
'; + $out .= dol_print_date($histo[$key]['datestart'], 'dayreduceformat', 'tzuserrel'); + $out .= '
'; + $out .= dol_print_date($histo[$key]['datestart'], 'hourreduceformat', 'tzuserrel'); + $out .= ''; + $out .= '
'; + $out .= ' - '; + $out .= '
'; + $out .= dol_print_date($histo[$key]['dateend'], 'dayreduceformat', 'tzuserrel'); + $out .= '
'; + $out .= dol_print_date($histo[$key]['dateend'], 'hourreduceformat', 'tzuserrel'); + $out .= ''; + $out .= '
'; } // Add the late warning $late = 0; @@ -2798,7 +2800,7 @@ function addOtherFilterSQL(&$sql, $donetodo, $now, $filters) if (is_array($filters) && !empty($filters['search_rowid'])) { $sql .= natural_search('a.id', $filters['search_rowid'], 1); } - if (is_array($filters) && !empty($filters['search_filtert'])) { + if (is_array($filters) && !empty($filters['search_filtert']) && ((int) $filters['search_filtert']) != -1) { $sql .= natural_search('a.fk_user_action', $filters['search_filtert'], 1); } diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index c0cf8d95946..2bf2b534af4 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -584,7 +584,14 @@ class modAgenda extends DolibarrModules 'class' => 'CActionComm', 'method' => 'fetch', 'dict' => 'DictionaryActions' - ) + ), + 'ac.fk_project' => array( + 'rule' => 'fetchidfromref', + 'file' => '/projet/class/project.class.php', + 'class' => 'Project', + 'method' => 'fetch', + 'element' => 'Project' + ), ); // Import Event Extra Fields diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 1701272dd66..ad0352b7ca7 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -318,7 +318,11 @@ class modProjet extends DolibarrModules // End add extra fields $this->import_fieldshidden_array[$r] = array('t.fk_user_creat'=>'user->id', 'extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'projet'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_convertvalue_array[$r] = array( - 't.ref' => array('rule' => 'getrefifauto', 'class' => getDolGlobalString('PROJECT_ADDON', 'mod_project_simple'), 'path' => "/core/modules/project/".getDolGlobalString('PROJECT_ADDON', 'mod_project_simple').'.php'), + 't.ref' => array( + 'rule' => 'getrefifauto', + 'class' => getDolGlobalString('PROJECT_ADDON', 'mod_project_simple'), + 'path' => "/core/modules/project/".getDolGlobalString('PROJECT_ADDON', 'mod_project_simple').'.php' + ), 't.fk_soc' => array( 'rule' => 'fetchidfromref', 'file' => '/societe/class/societe.class.php', @@ -326,6 +330,13 @@ class modProjet extends DolibarrModules 'method' => 'fetch', 'element' => 'ThirdParty' ), + 't.fk_opp_status' => array( + 'rule' => 'fetchidfromcodeid', + 'file' => '/core/class/cleadstatus.class.php', + 'class' => 'CLeadStatus', + 'method' => 'fetch', + 'dict' => 'DictionaryOpportunityStatus' + ), ); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); $this->import_regex_array[$r] = array('t.dateo'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$', 't.datee'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$', 't.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$'); diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 1e95a7eee11..7395d0301dc 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1240,6 +1240,7 @@ if ($step == 4 && $datatoimport) { $labelhtml = $label.' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 1); + $selectforline .= '