mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-10 18:02:34 +01:00
replace html by html5 in fichinter
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016-2018 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016-2018 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -25,9 +25,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file fichinter/card-rec.php
|
||||
* \ingroup intervention
|
||||
* \brief Page to show predefined fichinter
|
||||
* \file fichinter/card-rec.php
|
||||
* \ingroup intervention
|
||||
* \brief Page to show predefined fichinter
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@@ -396,7 +396,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
if ($num) {
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Duration").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Duration").'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
while ($i < $num) {
|
||||
@@ -413,7 +413,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
print $text.' '.nl2br($objp->description);
|
||||
|
||||
// Qty
|
||||
print '<td align="center">'.convertSecondToTime($objp->duree).'</td>';
|
||||
print '<td class="center">'.convertSecondToTime($objp->duree).'</td>';
|
||||
print "</tr>";
|
||||
|
||||
$i++;
|
||||
@@ -429,7 +429,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div align="center"><input type="submit" class="button" value="'.$langs->trans("Create").'">';
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Create").'">';
|
||||
print ' ';
|
||||
print '<input type="button" class="button" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">';
|
||||
print '</div>';
|
||||
@@ -495,13 +495,13 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$morehtmlref.=$formproject->select_projects(
|
||||
$morehtmlref.=$formproject->select_projects(
|
||||
$object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1
|
||||
);
|
||||
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||
$morehtmlref.='</form>';
|
||||
} else {
|
||||
$morehtmlref.=$form->form_project(
|
||||
$morehtmlref.=$form->form_project(
|
||||
$_SERVER['PHP_SELF'].'?id='.$object->id,
|
||||
$object->socid, $object->fk_project,
|
||||
'none', 0, 0, 0, 1
|
||||
@@ -552,7 +552,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
print $langs->trans('Contract');
|
||||
print '</td>';
|
||||
if ($action != 'contrat') {
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=contrat&id='.$object->id.'">';
|
||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=contrat&id='.$object->id.'">';
|
||||
print img_edit($langs->trans('SetContract'), 1);
|
||||
print '</a></td>';
|
||||
}
|
||||
@@ -560,17 +560,15 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
print '</td><td>';
|
||||
if ($action == 'contrat') {
|
||||
$formcontract= new Formcontract($db);
|
||||
$formcontract->formSelectContract(
|
||||
$_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid,
|
||||
$object->fk_contrat, 'contratid', 0, 1
|
||||
);
|
||||
$formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contrat, 'contratid', 0, 1);
|
||||
} else {
|
||||
if ($object->fk_contrat) {
|
||||
$contratstatic = new Contrat($db);
|
||||
$contratstatic->fetch($object->fk_contrat);
|
||||
print $contratstatic->getNomUrl(0, '', 1);
|
||||
} else
|
||||
print " ";
|
||||
} else {
|
||||
print " ";
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@@ -595,7 +593,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
print $langs->trans('Frequency');
|
||||
print '</td>';
|
||||
if ($action != 'editfrequency' && $user->rights->ficheinter->creer) {
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editfrequency&id='.$id.'">';
|
||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editfrequency&id='.$id.'">';
|
||||
print img_edit($langs->trans('Edit'), 1) . '</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
@@ -720,7 +718,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Duration").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Duration").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$num = count($object->lines);
|
||||
@@ -744,7 +742,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
print $text.' '.nl2br($object->lines[$i]->desc);
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">'.convertSecondToTime($object->lines[$i]->duree).'</td>';
|
||||
print '<td class="center">'.convertSecondToTime($object->lines[$i]->duree).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
@@ -801,66 +799,41 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
print_barre_liste(
|
||||
$langs->trans("RepeatableInterventional"), $page,
|
||||
$_SERVER['PHP_SELF'], "&socid=$socid", $sortfield, $sortorder,
|
||||
'', $num, '', 'title_commercial.png'
|
||||
);
|
||||
print_barre_liste(
|
||||
$langs->trans("RepeatableInterventional"),
|
||||
$page,
|
||||
$_SERVER['PHP_SELF'],
|
||||
"&socid=$socid",
|
||||
$sortfield,
|
||||
$sortorder,
|
||||
'',
|
||||
$num,
|
||||
'',
|
||||
'title_commercial.png'
|
||||
);
|
||||
|
||||
print $langs->trans("ToCreateAPredefinedInterventional").'<br><br>';
|
||||
|
||||
$i = 0;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Ref"), $_SERVER['PHP_SELF'], "f.titre", "", "",
|
||||
'width="200px" align="left"', $sortfiled, $sortorder
|
||||
);
|
||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER['PHP_SELF'], "f.titre", "", "", 'width="200px"', $sortfiled, $sortorder, 'left ');
|
||||
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Company"), $_SERVER['PHP_SELF'], "s.nom", "", "",
|
||||
'width="200px" align="left"', $sortfiled, $sortorder
|
||||
);
|
||||
if (! empty($conf->contrat->enabled))
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Contract"), $_SERVER['PHP_SELF'],
|
||||
"f.fk_contrat", "", "",
|
||||
'width="100px" align="left"', $sortfiled, $sortorder
|
||||
);
|
||||
print_liste_field_titre($langs->trans("Company"), $_SERVER['PHP_SELF'], "s.nom", "", "", 'width="200px"', $sortfiled, $sortorder, 'left ');
|
||||
if (! empty($conf->contrat->enabled)) {
|
||||
print_liste_field_titre($langs->trans("Contract"), $_SERVER['PHP_SELF'], "f.fk_contrat", "", "", 'width="100px"', $sortfiled, $sortorder, 'left ');
|
||||
}
|
||||
|
||||
if (! empty($conf->projet->enabled))
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Project"), $_SERVER['PHP_SELF'],
|
||||
"f.fk_project", "", "",
|
||||
'width="100px" align="left"', $sortfiled, $sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Duration"), $_SERVER['PHP_SELF'],
|
||||
'f.duree', '', '',
|
||||
'width="50px" align="right"', $sortfiled, $sortorder
|
||||
);
|
||||
// Recurring or not
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Frequency"), $_SERVER['PHP_SELF'],
|
||||
"f.frequency", "", "",
|
||||
'width="100px" align="center"', $sortfiled, $sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
$langs->trans("NbOfGenerationDone"), $_SERVER['PHP_SELF'],
|
||||
"f.nb_gen_done", "", "",
|
||||
'width="100px" align="center"', $sortfiled, $sortorder
|
||||
);
|
||||
if (! empty($conf->projet->enabled)) {
|
||||
print_liste_field_titre($langs->trans("Project"), $_SERVER['PHP_SELF'], "f.fk_project", "", "", 'width="100px"', $sortfiled, $sortorder, 'left ');
|
||||
}
|
||||
print_liste_field_titre($langs->trans("Duration"), $_SERVER['PHP_SELF'], 'f.duree', '', '', 'width="50px"', $sortfiled, $sortorder, 'right ');
|
||||
// Recurring or not
|
||||
print_liste_field_titre($langs->trans("Frequency"), $_SERVER['PHP_SELF'], "f.frequency", "", "", 'width="100px"', $sortfiled, $sortorder, 'center ');
|
||||
print_liste_field_titre($langs->trans("NbOfGenerationDone"), $_SERVER['PHP_SELF'], "f.nb_gen_done", "", "", 'width="100px"', $sortfiled, $sortorder, 'center ');
|
||||
|
||||
print_liste_field_titre(
|
||||
$langs->trans("DateLastGeneration"), $_SERVER['PHP_SELF'],
|
||||
"f.date_last_gen", "", "",
|
||||
'width="100px" align="center"', $sortfiled, $sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
$langs->trans("NextDateToIntervention"), $_SERVER['PHP_SELF'],
|
||||
"f.date_when", "", "",
|
||||
'width="100px" align="center"', $sortfiled, $sortorder
|
||||
);
|
||||
print_liste_field_titre($langs->trans("DateLastGeneration"), $_SERVER['PHP_SELF'], "f.date_last_gen", "", "", 'width="100px"', $sortfiled, $sortorder, 'center ');
|
||||
print_liste_field_titre($langs->trans("NextDateToIntervention"), $_SERVER['PHP_SELF'], "f.date_when", "", "", 'width="100px"', $sortfiled, $sortorder, 'center ');
|
||||
print '<th width="100px"></th>';
|
||||
print "</tr>\n";
|
||||
|
||||
@@ -899,36 +872,36 @@ print_liste_field_titre(
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print '<td align=right>'.convertSecondToTime($objp->duree).'</td>';
|
||||
print '<td class=right>'.convertSecondToTime($objp->duree).'</td>';
|
||||
|
||||
print '<td align="center">'.yn($objp->frequency?1:0).'</td>';
|
||||
print '<td class="center">'.yn($objp->frequency?1:0).'</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($objp->frequency) {
|
||||
print $objp->nb_gen_done.($objp->nb_gen_max>0?' / '. $objp->nb_gen_max:'') ;
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_last_gen), 'day') ;
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_when), 'day');
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<span class="opacitymedium">'.$langs->trans('NA').'</span>';
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<span class="opacitymedium">'.$langs->trans('NA').'</span>';
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<span class="opacitymedium">'.$langs->trans('NA').'</span>';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
if ($user->rights->ficheinter->creer) {
|
||||
// Action column
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($user->rights->ficheinter->creer) {
|
||||
if (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=createfrommodel';
|
||||
|
||||
@@ -1282,7 +1282,7 @@ elseif ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
if ($action != 'contrat')
|
||||
{
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=contrat&id='.$object->id.'">';
|
||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=contrat&id='.$object->id.'">';
|
||||
print img_edit($langs->trans('SetContract'), 1);
|
||||
print '</a></td>';
|
||||
}
|
||||
@@ -1393,8 +1393,8 @@ elseif ($id > 0 || ! empty($ref))
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans('Description').'</td>';
|
||||
print '<td class="liste_titre" align="center">'.$langs->trans('Date').'</td>';
|
||||
print '<td class="liste_titre" align="right">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?$langs->trans('Duration'):'').'</td>';
|
||||
print '<td class="liste_titre center">'.$langs->trans('Date').'</td>';
|
||||
print '<td class="liste_titre right">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?$langs->trans('Duration'):'').'</td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
@@ -1414,10 +1414,10 @@ elseif ($id > 0 || ! empty($ref))
|
||||
print dol_htmlentitiesbr($objp->description);
|
||||
|
||||
// Date
|
||||
print '<td align="center" width="150">'.(empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)?dol_print_date($db->jdate($objp->date_intervention), 'dayhour'):dol_print_date($db->jdate($objp->date_intervention), 'day')).'</td>';
|
||||
print '<td class="center" width="150">'.(empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)?dol_print_date($db->jdate($objp->date_intervention), 'dayhour'):dol_print_date($db->jdate($objp->date_intervention), 'day')).'</td>';
|
||||
|
||||
// Duration
|
||||
print '<td align="right" width="150">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?convertSecondToTime($objp->duree):'').'</td>';
|
||||
print '<td class="right" width="150">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?convertSecondToTime($objp->duree):'').'</td>';
|
||||
|
||||
print "</td>\n";
|
||||
|
||||
@@ -1425,16 +1425,16 @@ elseif ($id > 0 || ! empty($ref))
|
||||
// Icone d'edition et suppression
|
||||
if ($object->statut == 0 && $user->rights->ficheinter->creer)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&line_id='.$objp->rowid.'#'.$objp->rowid.'">';
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=ask_deleteline&line_id='.$objp->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a></td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($num > 1)
|
||||
{
|
||||
if ($i > 0)
|
||||
@@ -1484,7 +1484,7 @@ elseif ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
|
||||
// Date d'intervention
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center nowrap">';
|
||||
if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) {
|
||||
print $form->selectDate($db->jdate($objp->date_intervention), 'di', 0, 0, 0, "date_intervention");
|
||||
} else {
|
||||
@@ -1493,7 +1493,7 @@ elseif ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
|
||||
// Duration
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) {
|
||||
$selectmode = 'select';
|
||||
if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION))
|
||||
@@ -1502,7 +1502,7 @@ elseif ($id > 0 || ! empty($ref))
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center" colspan="5" valign="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print '<td class="center" colspan="5" valign="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print '<br><input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td>';
|
||||
print '</tr>' . "\n";
|
||||
|
||||
@@ -1532,8 +1532,8 @@ elseif ($id > 0 || ! empty($ref))
|
||||
print '<td>';
|
||||
print '<a name="add"></a>'; // ancre
|
||||
print $langs->trans('Description').'</td>';
|
||||
print '<td align="center">'.$langs->trans('Date').'</td>';
|
||||
print '<td align="right">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?$langs->trans('Duration'):'').'</td>';
|
||||
print '<td class="center">'.$langs->trans('Date').'</td>';
|
||||
print '<td class="right">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?$langs->trans('Duration'):'').'</td>';
|
||||
print '<td colspan="3"> </td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
@@ -1549,7 +1549,7 @@ elseif ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
|
||||
// Date intervention
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="center nowrap">';
|
||||
$now=dol_now();
|
||||
$timearray=dol_getdate($now);
|
||||
if (! GETPOST('diday', 'int')) {
|
||||
@@ -1565,7 +1565,7 @@ elseif ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
|
||||
// Duration
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) {
|
||||
$selectmode = 'select';
|
||||
if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) {
|
||||
@@ -1575,7 +1575,7 @@ elseif ($id > 0 || ! empty($ref))
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center" valign="middle" colspan="3"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline"></td>';
|
||||
print '<td class="center" valign="middle" colspan="3"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline"></td>';
|
||||
print '</tr>';
|
||||
|
||||
//Line extrafield
|
||||
|
||||
@@ -128,7 +128,7 @@ if ($resql)
|
||||
}
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<tr class="impair"><td align="center" colspan="2">';
|
||||
print '<tr class="impair"><td class="center" colspan="2">';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
$dolgraph = new DolGraph();
|
||||
@@ -150,7 +150,7 @@ if ($resql)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$fichinterstatic->LibStatut($status, $bool, 0).'</td>';
|
||||
print '<td align="right"><a href="list.php?viewstatut='.$status.'">'.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' ';
|
||||
print '<td class="right"><a href="list.php?viewstatut='.$status.'">'.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' ';
|
||||
print $fichinterstatic->LibStatut($status, $bool, 3);
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
@@ -160,8 +160,8 @@ if ($resql)
|
||||
}
|
||||
}
|
||||
//if ($totalinprocess != $total)
|
||||
//print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')</td><td align="right">'.$totalinprocess.'</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.$total.'</td></tr>';
|
||||
//print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')</td><td class="right">'.$totalinprocess.'</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">'.$total.'</td></tr>';
|
||||
print "</table><br>";
|
||||
}
|
||||
else
|
||||
@@ -263,7 +263,7 @@ if ($resql)
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
print '<td width="16" class="right nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
@@ -274,7 +274,7 @@ if ($resql)
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"), "company").' '.$obj->name.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datem), 'day').'</td>';
|
||||
print '<td align="right">'.$fichinterstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '<td class="right">'.$fichinterstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
@@ -331,7 +331,7 @@ if (! empty($conf->ficheinter->enabled))
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
print '<td width="16" class="right nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
@@ -342,7 +342,7 @@ if (! empty($conf->ficheinter->enabled))
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"), "company").' '.dol_trunc($obj->name, 24).'</a></td>';
|
||||
|
||||
print '<td align="right">'.$fichinterstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '<td class="right">'.$fichinterstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
@@ -383,7 +383,7 @@ if ($resql)
|
||||
// Status
|
||||
if (! empty($arrayfields['f.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$tmp = $objectstatic->LibStatut(0); // To load $this->statuts_short
|
||||
$liststatus=$objectstatic->statuts_short;
|
||||
if (empty($conf->global->FICHINTER_CLASSIFY_BILLED)) unset($liststatus[2]); // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1
|
||||
@@ -403,7 +403,7 @@ if ($resql)
|
||||
{
|
||||
print '<td class="liste_titre"> </td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@@ -420,13 +420,13 @@ if ($resql)
|
||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (! empty($arrayfields['fd.description']['checked'])) print_liste_field_titre($arrayfields['fd.description']['label'], $_SERVER["PHP_SELF"], '');
|
||||
if (! empty($arrayfields['fd.date']['checked'])) print_liste_field_titre($arrayfields['fd.date']['label'], $_SERVER["PHP_SELF"], "fd.date", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
if (! empty($arrayfields['fd.duree']['checked'])) print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
if (! empty($arrayfields['fd.date']['checked'])) print_liste_field_titre($arrayfields['fd.date']['label'], $_SERVER["PHP_SELF"], "fd.date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (! empty($arrayfields['fd.duree']['checked'])) print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
$total = 0;
|
||||
@@ -469,7 +469,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
// Other picto tool
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
print '<td width="16" class="right nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->ficheinter->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
@@ -504,7 +504,7 @@ if ($resql)
|
||||
// Date creation
|
||||
if (! empty($arrayfields['f.datec']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@@ -512,7 +512,7 @@ if ($resql)
|
||||
// Date modification
|
||||
if (! empty($arrayfields['f.tms']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@@ -520,7 +520,7 @@ if ($resql)
|
||||
// Status
|
||||
if (! empty($arrayfields['f.fk_statut']['checked']))
|
||||
{
|
||||
print '<td align="right">'.$objectstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
print '<td class="right">'.$objectstatic->LibStatut($obj->fk_statut, 5).'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Fields of detail of line
|
||||
@@ -531,18 +531,18 @@ if ($resql)
|
||||
}
|
||||
if (! empty($arrayfields['fd.date']['checked']))
|
||||
{
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dp), 'dayhour')."</td>\n";
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->dp), 'dayhour')."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
if (! empty($arrayfields['fd.duree']['checked']))
|
||||
{
|
||||
print '<td align="right">'.convertSecondToTime($obj->duree, 'allhourmin').'</td>';
|
||||
print '<td class="right">'.convertSecondToTime($obj->duree, 'allhourmin').'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totaldurationfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalduration']+=$obj->duree;
|
||||
}
|
||||
// Action column
|
||||
print '<td class="nowrap" align="center">';
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
$selected=0;
|
||||
@@ -571,7 +571,7 @@ if ($resql)
|
||||
if ($num < $limit && empty($offset)) print '<td class="left">'.$langs->trans("Total").'</td>';
|
||||
else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||
}
|
||||
elseif ($totalarray['totaldurationfield'] == $i) print '<td align="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>';
|
||||
elseif ($totalarray['totaldurationfield'] == $i) print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>';
|
||||
else print '<td></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
@@ -254,7 +254,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
arsort($arrayyears);
|
||||
print $form->selectarray('year', $arrayyears, $year, 0);
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
print '<tr><td class="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print '<br><br>';
|
||||
@@ -263,13 +263,13 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre" height="24">';
|
||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td align="right">'.$langs->trans("NbOfinterventions").'</td>';
|
||||
print '<td align="right">%</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td align="right">%</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountAverage").'</td>';
|
||||
print '<td align="right">%</td>';
|
||||
print '<td class="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td class="right">'.$langs->trans("NbOfinterventions").'</td>';
|
||||
print '<td class="right">%</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td class="right">%</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountAverage").'</td>';
|
||||
print '<td class="right">%</td>';
|
||||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
@@ -282,26 +282,26 @@ foreach ($data as $val)
|
||||
$oldyear--;
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
|
||||
|
||||
print '<td align="right">0</td>';
|
||||
print '<td align="right"></td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '<td align="right"></td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '<td align="right"></td>';
|
||||
print '<td class="right">0</td>';
|
||||
print '<td class="right"></td>';
|
||||
print '<td class="right">0</td>';
|
||||
print '<td class="right"></td>';
|
||||
print '<td class="right">0</td>';
|
||||
print '<td class="right"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||
print '<td align="right">'.$val['nb'].'</td>';
|
||||
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
||||
print '<td align="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
||||
print '<td align="right" style="'.(($val['total_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['total_diff']).'</td>';
|
||||
print '<td align="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
||||
print '<td align="right" style="'.(($val['avg_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['avg_diff']).'</td>';
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
print '<td class="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
||||
print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
||||
print '<td class="right" style="'.(($val['total_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['total_diff']).'</td>';
|
||||
print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
||||
print '<td class="right" style="'.(($val['avg_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['avg_diff']).'</td>';
|
||||
print '</tr>';
|
||||
$oldyear=$year;
|
||||
}
|
||||
@@ -314,7 +314,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
// Show graphs
|
||||
print '<table class="border" width="100%"><tr class="pair nohover"><td align="center">';
|
||||
print '<table class="border" width="100%"><tr class="pair nohover"><td class="center">';
|
||||
if ($mesg) { print $mesg; }
|
||||
else {
|
||||
print $px1->show();
|
||||
|
||||
@@ -47,13 +47,13 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
<td><?php echo $langs->trans("Intervention"); ?></td>
|
||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||
<td></td>
|
||||
<td align="center"><?php echo dol_print_date($objectlink->datev, 'day'); ?></td>
|
||||
<td class="center"><?php echo dol_print_date($objectlink->datev, 'day'); ?></td>
|
||||
<td></td>
|
||||
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
<!-- END PHP TEMPLATE -->
|
||||
|
||||
Reference in New Issue
Block a user