Merge https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
0327f2d5cd
@ -339,7 +339,7 @@ if (! empty($arrayfields['t.libelle']['checked']))
|
||||
if (! empty($arrayfields['d.bank']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print $form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -4039,7 +4039,7 @@ abstract class CommonObject
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "</tbody>\n";
|
||||
print "</tbody><!-- end printObjectLines() -->\n";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -260,7 +260,7 @@ if (!empty($extrafieldsline))
|
||||
?>
|
||||
|
||||
<?php if (! empty($conf->service->enabled) && $line->product_type == 1 && $dateSelector) { ?>
|
||||
<tr id="service_duration_area" <?php echo $bc[$var]; ?>>
|
||||
<tr id="service_duration_area" class="treditedlinefordate">
|
||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||
<td class="linecolnum center"><?php $coldisplay++; ?></td>
|
||||
<?php } ?>
|
||||
|
||||
@ -1275,23 +1275,23 @@ class EmailCollector extends CommonObject
|
||||
// Make Operation
|
||||
dol_syslog("Execute action ".$operation['type']." actionparam=".$operation['actionparam'].' thirdpartystatic->id='.$thirdpartystatic->id.' contactstatic->id='.$contactstatic->id.' projectstatic->id='.$projectstatic->id);
|
||||
|
||||
$description = $descriptionfull = '';
|
||||
$actioncode = 'EMAIL_IN';
|
||||
// If we scan the Sent box, we use the code for out email
|
||||
if ($this->source_directory == 'Sent') $actioncode = 'EMAIL_OUT';
|
||||
|
||||
$description = $descriptiontitle = $descriptionmeta = $descriptionfull = '';
|
||||
if (in_array($operation['type'], array('recordevent', 'project', 'ticket')))
|
||||
{
|
||||
$description = $langs->trans("ProjectCreatedByEmailCollector", $msgid);
|
||||
$description = dol_concatdesc($description, "-----");
|
||||
$description = dol_concatdesc($description, $langs->trans("Topic").' : '.$subject);
|
||||
$description = dol_concatdesc($description, $langs->trans("From").' : '.$fromstring);
|
||||
if ($sender) $description = dol_concatdesc($description, $langs->trans("Sender").' : '.$sender);
|
||||
$description = dol_concatdesc($description, $langs->trans("To").' : '.$to);
|
||||
//if ($cc) $description = dol_concatdesc($description, $langs->trans("Cc").' : '.$cc);
|
||||
//if ($bcc) $description = dol_concatdesc($description, $langs->trans("Bcc").' : '.$bcc);
|
||||
$description = dol_concatdesc($description, "-----");
|
||||
$description = dol_concatdesc($description, $messagetext);
|
||||
if ($operation['type'] == 'project') $descriptiontitle = $langs->trans("ProjectCreatedByEmailCollector", $msgid);
|
||||
elseif ($operation['type'] == 'ticket') $descriptiontitle = $langs->trans("TicketCreatedByEmailCollector", $msgid);
|
||||
else $descriptiontitle = $langs->trans("ActionAC_".$actioncode).' - '.$langs->trans("MailFrom").' '.$from;
|
||||
|
||||
$descriptionfull = $description;
|
||||
$descriptionfull = dol_concatdesc($descriptionfull, "----- Header");
|
||||
$descriptionfull = dol_concatdesc($descriptionfull, $header);
|
||||
$descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Topic").' : '.$subject);
|
||||
$descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("From").' : '.$fromstring);
|
||||
if ($sender) $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Sender").' : '.$sender);
|
||||
$descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("To").' : '.$to);
|
||||
//if ($cc) $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Cc").' : '.$cc);
|
||||
//if ($bcc) $descriptionmeta = dol_concatdesc($descriptionmeta, $langs->trans("Bcc").' : '.$bcc);
|
||||
}
|
||||
|
||||
// Search and create thirdparty
|
||||
@ -1327,26 +1327,42 @@ class EmailCollector extends CommonObject
|
||||
{
|
||||
if (strtolower($sourcefield) == 'body') $sourcestring=$messagetext;
|
||||
elseif (strtolower($sourcefield) == 'subject') $sourcestring=$subject;
|
||||
elseif (strtolower($sourcefield) == 'header') $sourcestring=$header;
|
||||
|
||||
$regforval=array();
|
||||
if (preg_match('/'.$regexstring.'/', $sourcestring, $regforval)) // Do not use preg_quote here, string is already a regex syntax, for example string is 'Name:\s([^\s]*)'
|
||||
if ($sourcestring)
|
||||
{
|
||||
// Overwrite param $tmpproperty
|
||||
$nametouseforthirdparty = $regforval[1];
|
||||
$regforval=array();
|
||||
//var_dump($regexstring);var_dump($sourcestring);
|
||||
if (preg_match('/'.$regexstring.'/ms', $sourcestring, $regforval))
|
||||
{
|
||||
//var_dump($regforval[1]);exit;
|
||||
// Overwrite param $tmpproperty
|
||||
$nametouseforthirdparty = isset($regforval[1])?trim($regforval[1]):null;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Regex not found
|
||||
$nametouseforthirdparty = null;
|
||||
}
|
||||
//var_dump($object->$tmpproperty);exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nothing can be done for this param
|
||||
$errorforthisaction++;
|
||||
$this->errors = 'The extract rule to use to load thirdparty has on an unknown source (must be HEADER, SUBJECT or BODY)';
|
||||
$this->errors[] = $this->error;
|
||||
}
|
||||
//var_dump($sourcestring); var_dump($regexstring);var_dump($nametouseforthirdparty);exit;
|
||||
}
|
||||
elseif (preg_match('/^SET:(.*)$/', $valueforproperty, $reg))
|
||||
{
|
||||
//if (preg_match('/^options_/', $tmpproperty)) $object->array_options[preg_replace('/^options_/', '', $tmpproperty)] = $reg[1];
|
||||
//else $object->$tmpproperty = $reg[1];
|
||||
$nametouseforthirdparty = $reg[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
$errorforactions++;
|
||||
$errorforthisaction++;
|
||||
$this->error = 'Bad syntax for description of action parameters: '.$actionparam;
|
||||
$this->errors[] = $this->error;
|
||||
break;
|
||||
@ -1403,25 +1419,29 @@ class EmailCollector extends CommonObject
|
||||
// Create event
|
||||
elseif ($operation['type'] == 'recordevent')
|
||||
{
|
||||
$actioncode = 'EMAIL_IN';
|
||||
// If we scan the Sent box, we use the code for out email
|
||||
if ($this->source_directory == 'Sent') {
|
||||
$actioncode = 'EMAIL_OUT';
|
||||
}
|
||||
|
||||
if ($projectstatic->id > 0)
|
||||
{
|
||||
if ($projectfoundby) $messagetext .= ' - Project found from '.$projectfoundby;
|
||||
if ($projectfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Project found from '.$projectfoundby);
|
||||
}
|
||||
if ($thirdpartystatic->id > 0)
|
||||
{
|
||||
if ($thirdpartyfoundby) $messagetext .= ' - Third party found from '.$thirdpartyfoundby;
|
||||
if ($thirdpartyfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby);
|
||||
}
|
||||
if ($contactstatic->id > 0)
|
||||
{
|
||||
if ($contactfoundby) $messagetext .= ' - Contact/address found from '.$contactfoundby;
|
||||
if ($contactfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby);
|
||||
}
|
||||
|
||||
$description = $descriptiontitle;
|
||||
$description = dol_concatdesc($description, "-----");
|
||||
$description = dol_concatdesc($description, $descriptionmeta);
|
||||
$description = dol_concatdesc($description, "-----");
|
||||
$description = dol_concatdesc($description, $messagetext);
|
||||
|
||||
$descriptionfull = $description;
|
||||
$descriptionfull = dol_concatdesc($descriptionfull, "----- Header");
|
||||
$descriptionfull = dol_concatdesc($descriptionfull, $header);
|
||||
|
||||
// Insert record of emails sent
|
||||
$actioncomm = new ActionComm($this->db);
|
||||
|
||||
@ -1479,14 +1499,24 @@ class EmailCollector extends CommonObject
|
||||
if ($thirdpartystatic->id > 0)
|
||||
{
|
||||
$projecttocreate->socid = $thirdpartystatic->id;
|
||||
if ($thirdpartyfoundby) $messagetext .= dol_concatdesc($messagetext, 'Third party found from '.$thirdpartyfoundby);
|
||||
if ($thirdpartyfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby);
|
||||
}
|
||||
if ($contactstatic->id > 0)
|
||||
{
|
||||
$projecttocreate->contact_id = $contactstatic->id;
|
||||
if ($contactfoundby) $messagetext .= dol_concatdesc($messagetext, 'Contact/address found from '.$contactfoundby);
|
||||
if ($contactfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby);
|
||||
}
|
||||
|
||||
$description = $descriptiontitle;
|
||||
$description = dol_concatdesc($description, "-----");
|
||||
$description = dol_concatdesc($description, $descriptionmeta);
|
||||
$description = dol_concatdesc($description, "-----");
|
||||
$description = dol_concatdesc($description, $messagetext);
|
||||
|
||||
$descriptionfull = $description;
|
||||
$descriptionfull = dol_concatdesc($descriptionfull, "----- Header");
|
||||
$descriptionfull = dol_concatdesc($descriptionfull, $header);
|
||||
|
||||
$id_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'rowid');
|
||||
$percent_opp_status = dol_getIdFromCode($this->db, 'PROSP', 'c_lead_status', 'code', 'percent');
|
||||
|
||||
@ -1495,7 +1525,7 @@ class EmailCollector extends CommonObject
|
||||
$projecttocreate->date_end = '';
|
||||
$projecttocreate->opp_status = $id_opp_status;
|
||||
$projecttocreate->opp_percent = $percent_opp_status;
|
||||
$projecttocreate->description = dol_concatdesc(dolGetFirstLineOfText(dol_string_nohtmltag($description, 2), 8), '...'.$langs->transnoentities("SeePrivateNote").'...');
|
||||
$projecttocreate->description = dol_concatdesc(dolGetFirstLineOfText(dol_string_nohtmltag($description, 2), 10), '...'.$langs->transnoentities("SeePrivateNote").'...');
|
||||
$projecttocreate->note_private = dol_concatdesc($descriptionfull, dol_string_nohtmltag($descriptionfull, 2));
|
||||
$projecttocreate->entity = $conf->entity;
|
||||
|
||||
@ -1557,19 +1587,28 @@ class EmailCollector extends CommonObject
|
||||
// Create event
|
||||
elseif ($operation['type'] == 'ticket')
|
||||
{
|
||||
$note_private = $langs->trans("TicketCreatedByEmailCollector", $msgid);
|
||||
$tickettocreate = new Ticket($this->db);
|
||||
if ($thirdpartystatic->id > 0)
|
||||
{
|
||||
$tickettocreate->socid = $thirdpartystatic->id;
|
||||
if ($thirdpartyfoundby) $note_private .= ' - Third party found from '.$thirdpartyfoundby;
|
||||
if ($thirdpartyfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Third party found from '.$thirdpartyfoundby);
|
||||
}
|
||||
if ($contactstatic->id > 0)
|
||||
{
|
||||
$tickettocreate->contact_id = $contactstatic->id;
|
||||
if ($contactfoundby) $note_private .= ' - Contact/address found from '.$contactfoundby;
|
||||
if ($contactfoundby) $descriptionmeta .= dol_concatdesc($descriptionmeta, 'Contact/address found from '.$contactfoundby);
|
||||
}
|
||||
|
||||
$description = $descriptiontitle;
|
||||
$description = dol_concatdesc($description, "-----");
|
||||
$description = dol_concatdesc($description, $descriptionmeta);
|
||||
$description = dol_concatdesc($description, "-----");
|
||||
$description = dol_concatdesc($description, $messagetext);
|
||||
|
||||
$descriptionfull = $description;
|
||||
$descriptionfull = dol_concatdesc($descriptionfull, "----- Header");
|
||||
$descriptionfull = dol_concatdesc($descriptionfull, $header);
|
||||
|
||||
$tickettocreate->title = $subject;
|
||||
$tickettocreate->type_code = 0;
|
||||
$tickettocreate->category_code = 0;
|
||||
@ -1623,7 +1662,7 @@ class EmailCollector extends CommonObject
|
||||
if (is_numeric($tickettocreate->ref) && $tickettocreate->ref <= 0)
|
||||
{
|
||||
$errorforactions++;
|
||||
$this->error = 'Failed to create ticket: Can\'t get a valid value for ticket Ref';
|
||||
$this->error = "Failed to create ticket: Can't get a valid value for ticket Ref. Check the numbering module used to generate the reference in setup of module Ticket.";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -87,13 +87,14 @@ $morehtml.='<input type="submit" class="button" name="refresh" value="'.$langs->
|
||||
print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'title_project.png', 0, $morehtml);
|
||||
|
||||
// Show description of content
|
||||
print '<div class="opacitymedium">';
|
||||
if ($mine) print $langs->trans("MyProjectsDesc").'<br><br>';
|
||||
else
|
||||
{
|
||||
if (! empty($user->rights->projet->all->lire) && ! $socid) print $langs->trans("ProjectsDesc").'<br><br>';
|
||||
else print $langs->trans("ProjectsPublicDesc").'<br><br>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
// Get list of ponderated percent for each status
|
||||
$listofoppstatus=array(); $listofopplabel=array(); $listofoppcode=array();
|
||||
|
||||
@ -254,7 +254,6 @@ $formother = new FormOther($db);
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
$title=$langs->trans("Projects");
|
||||
//if ($search_project_user == $user->id) $title=$langs->trans("MyProjects");
|
||||
|
||||
|
||||
// Get list of project id allowed to user (in a string list separated by coma)
|
||||
@ -467,17 +466,17 @@ print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, $newcardbutton, '', $limit);
|
||||
|
||||
// Show description of content
|
||||
print '<div class="opacitymedium">';
|
||||
if ($search_project_user == $user->id) print $langs->trans("MyProjectsDesc").'<br><br>';
|
||||
$texthelp='';
|
||||
if ($search_project_user == $user->id) $texthelp.=$langs->trans("MyProjectsDesc");
|
||||
else
|
||||
{
|
||||
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").'<br><br>';
|
||||
else print $langs->trans("ProjectsPublicDesc").'<br><br>';
|
||||
if ($user->rights->projet->all->lire && ! $socid) $texthelp.=$langs->trans("ProjectsDesc");
|
||||
else $texthelp.=$langs->trans("ProjectsPublicDesc");
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
print_barre_liste($form->textwithpicto($title, $texthelp), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, $newcardbutton, '', $limit);
|
||||
|
||||
|
||||
$topicmail="Information";
|
||||
$modelmail="project";
|
||||
|
||||
@ -441,17 +441,16 @@ print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, $newcardbutton, '', $limit);
|
||||
|
||||
// Show description of content
|
||||
print '<div class="opacitymedium">';
|
||||
if ($search_task_user == $user->id) print $langs->trans("MyTasksDesc").'<br><br>';
|
||||
$texthelp='';
|
||||
if ($search_task_user == $user->id) $texthelp.=$langs->trans("MyTasksDesc");
|
||||
else
|
||||
{
|
||||
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("TasksOnProjectsDesc").'<br><br>';
|
||||
else print $langs->trans("TasksOnProjectsPublicDesc").'<br><br>';
|
||||
if ($user->rights->projet->all->lire && ! $socid) $texthelp.=$langs->trans("TasksOnProjectsDesc");
|
||||
else $texthelp.=$langs->trans("TasksOnProjectsPublicDesc");
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
print_barre_liste($form->textwithpicto($title, $texthelp), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_project', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail="Information";
|
||||
$modelmail="task";
|
||||
@ -506,7 +505,7 @@ if (! empty($moreforfilter))
|
||||
if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">'."\n";
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">'."\n";
|
||||
|
||||
print '<tr class="liste_titre_filter">';
|
||||
if (! empty($arrayfields['t.ref']['checked']))
|
||||
|
||||
@ -2590,12 +2590,17 @@ table.liste, table.noborder, table.formdoc, div.noborder {
|
||||
|
||||
margin: 0px 0px 5px 0px;
|
||||
}
|
||||
table.liste tr:last-of-type td, table.noborder tr:last-of-type td, table.formdoc tr:last-of-type td, div.noborder tr:last-of-type td {
|
||||
#tablelines {
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-color: rgb(<?php echo $colortopbordertitle1 ?>);
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
div.tabBar div.ficheaddleft table.noborder:last-of-type {
|
||||
table.liste tr:last-of-type td, table.noborder:not(#tablelines) tr:last-of-type td, table.formdoc tr:last-of-type td, div.noborder tr:last-of-type td {
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-color: rgb(<?php echo $colortopbordertitle1 ?>);
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
div.tabBar div.ficheaddleft table.noborder:not(.margintable):not(.paymenttable):last-of-type {
|
||||
border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>);
|
||||
}
|
||||
div.tabBar table.border>tbody>tr:last-of-type>td {
|
||||
@ -2621,6 +2626,7 @@ tr.liste_titre_filter td.liste_titre {
|
||||
}
|
||||
.liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd
|
||||
{
|
||||
border-bottom-width: 0 !important;
|
||||
border-top-width: 1px;
|
||||
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
|
||||
border-top-style: solid;
|
||||
@ -2851,8 +2857,13 @@ div.pagination li.paginationafterarrows {
|
||||
{
|
||||
background: rgb(<?php echo $colorbacklinepairhover; ?>) !important; /* Must be background to be stronger than background of odd or even */
|
||||
}
|
||||
.tredited {
|
||||
.tredited, .tredited td {
|
||||
background: rgb(<?php echo $colorbacklinepairchecked; ?>) !important; /* Must be background to be stronger than background of odd or even */
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
.treditedlinefordate {
|
||||
background: rgb(<?php echo $colorbacklinepairchecked; ?>) !important; /* Must be background to be stronger than background of odd or even */
|
||||
border-bottom: 0px;
|
||||
}
|
||||
<?php if ($colorbacklinepairchecked) { ?>
|
||||
.highlight {
|
||||
|
||||
@ -3185,8 +3185,7 @@ input.liste_titre {
|
||||
|
||||
.noborder tr.liste_total td, tr.liste_total td, form.liste_total div, .noborder tr.liste_total_wrap td, tr.liste_total_wrap td, form.liste_total_wrap div {
|
||||
color: #332266;
|
||||
font-weight: normal;
|
||||
padding: 4px;
|
||||
/* padding: 4px; */
|
||||
}
|
||||
.noborder tr.liste_total td, tr.liste_total td, form.liste_total div {
|
||||
white-space: nowrap;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user