This commit is contained in:
Laurent Destailleur 2026-03-05 00:42:13 +01:00
commit 3dfce11ae8
25 changed files with 167 additions and 75 deletions

View file

@ -1651,7 +1651,9 @@ if ($action == 'create') {
print '<table class="border centpercent nobottom">';
// Assigned to user
print '<tr><td class="nowrap titlefieldcreate"><span>'.$langs->trans("ActionAffectedTo").'</span></td><td>';
print '<tr><td class="nowrap titlefieldcreate"><span>';
print $langs->trans("AssignedTo");
print '</span></td><td>';
$listofuserid = [];
$listofcontactid = [];
$listofotherid = [];
@ -1850,7 +1852,7 @@ if ($action == 'create') {
print '</select>';
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 '</td></tr>';
}
@ -2021,7 +2023,7 @@ if ($action == 'create') {
print dol_get_fiche_end();
print $form->buttonsSaveCancel("Add");
print $form->buttonsSaveCancel("Create");
print "</form>";
}
@ -2418,7 +2420,7 @@ if ($id > 0 && $action != 'create') {
</script>
<?php
print $formproject->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 '<input type="hidden" name="elementtype" value="'.$object->elementtype.'">';
print '</td>';
@ -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 '</td>';
} else {

View file

@ -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",),
@ -1993,7 +1993,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)
@ -2028,6 +2028,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;

View file

@ -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);

View file

@ -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 '<div class="liste_titre liste_titre_bydiv centpercent">';
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 '</div>';
$moreforfilter = 1;
@ -896,6 +900,10 @@ if (!empty($arrayfields['a.datec']['checked'])) {
if (!empty($arrayfields['a.tms']['checked'])) {
print '<td class="liste_titre"></td>';
}
if (!empty($arrayfields['a.import_key']['checked'])) {
print '<td class="liste_titre center"><input type="text" class="maxwidth75" name="search_import_key" value="'.$search_import_key.'"></td>';
print '</td>';
}
if (!empty($arrayfields['a.percent']['checked'])) {
print '<td class="liste_titre center parentonrightofpage">';
$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 '<td align="center" class="nowrap">'.dol_print_date($db->jdate($obj->datec), 'dayhour', 'tzuserrel').'</td>';
print '<td class="center nowrap">'.dol_print_date($db->jdate($obj->datec), 'dayhour', 'tzuserrel').'</td>';
}
// Date update
if (!empty($arrayfields['a.tms']['checked'])) {
print '<td align="center" class="nowrap">'.dol_print_date($db->jdate($obj->datem), 'dayhour', 'tzuserrel').'</td>';
print '<td class="center nowrap">'.dol_print_date($db->jdate($obj->datem), 'dayhour', 'tzuserrel').'</td>';
}
// Import key
if (!empty($arrayfields['a.import_key']['checked'])) {
print '<td class="center nowrap">'.dolPrintHTML($obj->import_key).'</td>';
}
// Status/Percent
if (!empty($arrayfields['a.percent']['checked'])) {
// Status/Percent
$datep = $db->jdate($obj->dp);
print '<td align="center" class="nowrap">'.$actionstatic->LibStatut($obj->percent, 5, 0, $datep).'</td>';
print '<td class="center nowrap">'.$actionstatic->LibStatut($obj->percent, 5, 0, $datep).'</td>';
}
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {

View file

@ -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');
@ -1654,7 +1654,7 @@ if ($action == 'create') {
}
// Author
print '<tr><td class="titlefield">'.$langs->trans("Author").'</td><td>';
print '<tr><td class="titlefieldmiddle">'.$langs->trans("Author").'</td><td>';
print $author->getNomUrl(-1);
print "</td></tr>";
@ -2255,13 +2255,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 = '<div class="nowraponall">';
//$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 .= '</div>';
// 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 '</div>';

View file

@ -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

View file

@ -2668,7 +2668,8 @@ class Form
$out .= '})</script>';
$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 .= ' <input type="submit" disabled class="button valignmiddle smallpaddingimp reposition" id="' . $action . 'assignedtouser" name="' . $action . 'assignedtouser" value="' . dol_escape_htmltag($langs->trans("Add")) . '">';
$out .= ' <button type="submit" disabled class="button valignmiddle smallpaddingimp reposition butActionAdd" id="' . $action . 'assignedtouser" name="' . $action . 'assignedtouser" value="' . dol_escape_htmltag($langs->trans("Add")) . '">';
$out .= $langs->trans("Add").'</button>';
$out .= '</div>';
//$out .= '<br>';
}
@ -2770,7 +2771,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 .= ' <input type="submit" disabled class="button valignmiddle smallpaddingimp reposition" id="' . $action . 'assignedtoresource" name="' . $action . 'assignedtoresource" value="' . dol_escape_htmltag($langs->trans("Add")) . '">';
$out .= ' <button type="submit" disabled class="button valignmiddle smallpaddingimp reposition butActionAdd" id="' . $action . 'assignedtoresource" name="' . $action . 'assignedtoresource" value="' . dol_escape_htmltag($langs->trans("Add")) . '">';
$out .= $langs->trans("Add");
$out .= '</button>';
$out .= '<br>';
}

View file

@ -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 '</tr>';
@ -322,10 +322,11 @@ class FormActions
//$actionstatic->type_code = 'AC_OTHER_AUTO'
// Type
$labeltype = $actioncomm->getTypeLabel(0);
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($labeltype).'">';
print $actioncomm->getTypePicto();
print $labeltype;
$labeltypelong = $actioncomm->getTypeLabel(2);
print '<td class="tdoverflowmax100 center" title="'.dolPrintHTML($labeltypelong).'">';
print $actioncomm->getTypePicto('valignmiddle');
//$labeltype = $actioncomm->getTypeLabel(0);
//print $labeltype;
print '</td>';
// Label / Title

View file

@ -662,7 +662,10 @@ class Notify
$application = (preg_match('/^\+/', $applicationcustom) ? $application : '').$applicationcustom;
}
$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 = '';

View file

@ -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;

View file

@ -2765,7 +2765,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);
}

View file

@ -3905,7 +3905,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()
@ -4160,8 +4160,8 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
}
if ($decorate) {
$ret = preg_replace('/(\d\d:\d\d [AP]M)$/', '<span class="opacitymedium">\1</span>', $ret);
$ret = preg_replace('/(\d\d:\d\d)$/', '<span class="opacitymedium">\1</span>', $ret);
$ret = preg_replace('/(\d\d:\d\d [AP]M)$/', '<span class="'.($decorate === 1 ? 'opacitymedium' : $decorate).'">\1</span>', $ret);
$ret = preg_replace('/(\d\d:\d\d)$/', '<span class="'.($decorate === 1 ? 'opacitymedium' : $decorate).'">\1</span>', $ret);
}
return $ret;
@ -16556,7 +16556,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
'dateend' => $db->jdate($obj->dp2),
'fulldayevent' => (int) $obj->fulldayevent,
'note' => $obj->label,
'message' => dol_htmlentitiesbr($obj->message),
'message' => $obj->message,
'percent' => $obj->percent,
'userid' => $obj->user_id,
@ -16587,7 +16587,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
'dateend' => $db->jdate($obj->dp2),
'fulldayevent' => (int) $obj->fulldayevent,
'note' => $obj->label,
'message' => dol_htmlentitiesbr($obj->message),
'message' => $obj->message,
'percent' => $obj->percent,
'acode' => $obj->acode,
@ -16799,16 +16799,23 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
$out .= '</span>';
// Date
$out .= '<span class="time"><i class="fa fa-clock-o valignmiddle"></i> <span class="valignmiddle">';
$out .= '<span class="time"><i class="fa fa-clock valignmiddle"></i> ';
$out .= '<span class="valignmiddle marginrightonly">';
$out .= dol_print_date($histo[$key]['datestart'], 'day', 'tzuserrel');
$out .= ' &nbsp; '.dol_print_date($histo[$key]['datestart'], 'hour', 'tzuserrel', null, false, 1);
//$out .= '</span>';
//$out .= '<span class="valignmiddle">'.
$out .= ' '.dol_print_date($histo[$key]['datestart'], 'hour', 'tzuserrel', null, false, 'opacitymedium');
//$out .= '</span>';
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 .= '<span class="valignmiddle marginrightonly">';
$out .= ' '.dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel', null, false, 'opacitymedium');
//$out .= '</span>';
}
}
$late = 0;
@ -16919,20 +16926,23 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
) {
$out .= '<div class="timeline-body wordbreak small">';
$truncateLines = getDolGlobalInt('MAIN_TRUNCATE_TIMELINE_MESSAGE', 3);
$truncatedText = dolGetFirstLineOfText($histo[$key]['message'], $truncateLines);
if ($truncateLines > 0 && strlen($histo[$key]['message']) > strlen($truncatedText)) {
$newmess = $histo[$key]['message'];
$truncatedText = dolGetFirstLineOfText($newmess, $truncateLines);
if ($truncateLines > 0 && strlen($newmess) > strlen($truncatedText)) {
$out .= '<div class="readmore-block --closed" >';
$out .= ' <div class="readmore-block__excerpt">';
$out .= dolPrintHTML($truncatedText, 0, array('pre', 'code'));
$out .= ' <br><a class="read-more-link" data-read-more-action="open" href="' . DOL_MAIN_URL_ROOT . '/comm/action/card.php?id=' . $actionstatic->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?' . $param) . '" >' . $langs->trans("ReadMore") . ' <span class="fa fa-chevron-right" aria-hidden="true"></span></a>';
$out .= ' </div>';
$out .= ' <div class="readmore-block__full-text" >';
$out .= dolPrintHTML($histo[$key]['message'], 0, array('pre', 'code'));
$out .= dolPrintHTML($newmess, 0, array('pre', 'code'));
$out .= ' <a class="read-less-link" data-read-more-action="close" href="#" ><span class="fa fa-chevron-up" aria-hidden="true"></span> ' . $langs->trans("ReadLess") . '</a>';
$out .= ' </div>';
$out .= '</div>';
} else {
$out .= dolPrintHTML($histo[$key]['message'], 0, array('pre', 'code'));
$out .= dolPrintHTML($newmess, 0, array('pre', 'code'));
}
$out .= '</div>';

View file

@ -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

View file

@ -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])?$');

View file

@ -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);

View file

@ -1173,6 +1173,7 @@ if ($step == 3 && $datatoimport) {
$labelhtml = $label.' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 1);
$selectforline .= '<option value="'.$tmpcode.'"';
if ($modetoautofillmapping == 'orderoftargets') {
// The mode where we fill the preselected value of combo one by one in order of available targets fields in the declaration in descriptor file.

View file

@ -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

View file

@ -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.

View file

@ -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.

View file

@ -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. <br> Cliquez sur « <b><span Cliquez sur le bouton %s pour simuler le processus d'importation. Aucune donnée ne sera modifiée dans votre base de données.
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. <br> 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

View file

@ -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();

View file

@ -31,6 +31,13 @@
// Load Dolibarr environment
require '../main.inc.php';
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*/
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
@ -41,14 +48,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/project/modules_project.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*/
// Load translation files required by the page
$langsLoad = array('projects', 'companies');
if (isModEnabled('eventorganization')) {

View file

@ -830,7 +830,7 @@ input.pageplusone {
select:invalid, select.--error {
color: gray;
}
input:disabled, textarea:disabled, select[disabled='disabled']
input:disabled:not(.colorthumb), textarea:disabled, select[disabled='disabled']
{
/* background: var(--inputbackgroundcolordisabled); */
/* color: var(--inputcolordisabled); */
@ -3857,6 +3857,9 @@ img.userphotopublicvcard {
img.userphoto[alt="Gravatar avatar"], img.photouserphoto.dropdown-user-image[alt="Gravatar avatar"] {
background: #fff;
}
img.gravatar.photouserphoto {
filter: grayscale(50%);
}
form[name="addtime"] img.userphoto, form[name="addtime"] img.userphotosmall {
border: 1px solid #444;
}
@ -5379,6 +5382,8 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
.clearbothonsmartphone {
clear: both;
}
.clearbothonsmartphone:not(.hideonsmartphone) {
display: block !important;
}
@ -6777,8 +6782,14 @@ span.jPicker {
border-collapse: collapse;
border: none;
}
.jPicker tr.Hex td.Text input {
width: 60px !important;
}
.jPicker td.Text input {
width: 35px !important;
min-width: 40px;
padding: 8px;
border: 1px solid #bbb !important;
border-radius: 4px;
}
A.color, A.color:active, A.color:visited {

View file

@ -75,7 +75,7 @@ $fontsizesmaller = '0.75em';
$topMenuFontSize = '1.1em';
$toolTipBgColor = 'rgba(255, 255, 255, 0.96)';
$toolTipFontColor = '#333';
$butactionbg = '136, 96, 170';
$butactionbg = '116, 96, 170';
$textbutaction = '255, 255, 255';
// text color

View file

@ -993,7 +993,7 @@ input.pageplusone {
select:invalid, select.--error {
color: gray;
}
input:disabled, textarea:disabled, select[disabled='disabled']
input:disabled:not(.colorthumb), textarea:disabled, select[disabled='disabled']
{
background: var(--inputbackgroundcolordisabled);
color: var(--inputcolordisabled);
@ -3913,6 +3913,9 @@ img.userphotosmall { /* size for user photo in lists */
img.userphoto[alt="Gravatar avatar"], img.photouserphoto.dropdown-user-image[alt="Gravatar avatar"] {
background: #fff;
}
img.gravatar.photouserphoto {
filter: grayscale(50%);
}
img.userphotopublicvcard {
width: 60px;
height: 60px;
@ -5379,6 +5382,8 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
.clearbothonsmartphone {
clear: both;
}
.clearbothonsmartphone:not(.hideonsmartphone) {
display: block !important;
}
@ -6665,8 +6670,14 @@ span.jPicker {
border-collapse: collapse;
border: none;
}
.jPicker tr.Hex td.Text input {
width: 60px !important;
}
.jPicker td.Text input {
width: 35px !important;
min-width: 40px;
padding: 8px;
border: 1px solid #bbb !important;
border-radius: 4px;
}
A.color, A.color:active, A.color:visited {