FIX Date visible on project overview
This commit is contained in:
parent
c6ef3778b7
commit
dc45776d31
@ -1113,7 +1113,7 @@ function dol_strftime($fmt, $ts=false, $is_gmt=false)
|
||||
* "%d %b %Y",
|
||||
* "%d/%m/%Y %H:%M",
|
||||
* "%d/%m/%Y %H:%M:%S",
|
||||
* "day", "daytext", "dayhour", "dayhourldap", "dayhourtext", "dayrfc", "dayhourrfc"
|
||||
* "day", "daytext", "dayhour", "dayhourldap", "dayhourtext", "dayrfc", "dayhourrfc", "...reduceformat"
|
||||
* @param string $tzoutput true or 'gmt' => string is for Greenwich location
|
||||
* false or 'tzserver' => output string is for local PHP server TZ usage
|
||||
* 'tzuser' => output string is for user TZ (current browser TZ with current dst)
|
||||
|
||||
@ -618,15 +618,16 @@ foreach ($listofreferent as $key => $value)
|
||||
|
||||
print load_fiche_titre($langs->trans($title), $addform, '');
|
||||
|
||||
print "\n".'<!-- Table for tablename = '.$tablename.' -->'."\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
// Remove link
|
||||
print '<td style="width: 24px"></td>';
|
||||
// Ref
|
||||
print '<td style="width: 200px">'.$langs->trans("Ref").'</td>';
|
||||
print '<td'.(($tablename != 'actioncomm' && $tablename != 'projet_task') ? ' style="width: 200px"':'').'>'.$langs->trans("Ref").'</td>';
|
||||
// Date
|
||||
print '<td width="100" align="center">';
|
||||
print '<td'.(($tablename != 'actioncomm' && $tablename != 'projet_task') ? ' style="width: 200px"':'').' align="center">';
|
||||
if (! in_array($tablename, array('projet_task'))) print $langs->trans("Date");
|
||||
print '</td>';
|
||||
// Thirdparty or user
|
||||
@ -755,20 +756,33 @@ foreach ($listofreferent as $key => $value)
|
||||
print "</td>\n";
|
||||
|
||||
// Date
|
||||
if ($tablename == 'commande_fournisseur' || $tablename == 'supplier_order')
|
||||
$date='';
|
||||
if ($tablename == 'expensereport_det') $date = $element->date; // No draft status on lines
|
||||
elseif (! empty($element->status) || ! empty($element->statut) || ! empty($element->fk_status))
|
||||
{
|
||||
$date=$element->date_valid;
|
||||
if ($tablename=='don') $date = $element->datedon;
|
||||
if ($tablename == 'commande_fournisseur' || $tablename == 'supplier_order')
|
||||
{
|
||||
$date=($element->date_commande?$element->date_commande:$element->date_valid);
|
||||
}
|
||||
elseif ($tablename == 'supplier_proposal') $date=$element->date_validation; // There is no other date for this
|
||||
elseif ($tablename == 'fichinter') $date=$element->datev; // There is no other date for this
|
||||
elseif ($tablename == 'projet_task') $date=''; // We show no date. Showing date of beginning of task make user think it is date of time consumed
|
||||
else
|
||||
{
|
||||
$date=$element->date; // invoice, ...
|
||||
if (empty($date)) $date=$element->date_contrat;
|
||||
if (empty($date)) $date=$element->datev;
|
||||
}
|
||||
}
|
||||
elseif ($tablename == 'supplier_proposal') $date=$element->date_validation;
|
||||
elseif ($tablename == 'projet_task') $date=''; // We show no date. Showing date of beginning of task make user think it is date of time consumed
|
||||
else
|
||||
print '<td align="center">';
|
||||
if ($tablename == 'actioncomm')
|
||||
{
|
||||
$date=$element->date;
|
||||
if (empty($date)) $date=$element->datep;
|
||||
if (empty($date)) $date=$element->date_contrat;
|
||||
if (empty($date)) $date=$element->datev; // Intervention
|
||||
print dol_print_date($element->datep,'dayhour');
|
||||
if ($element->datef && $element->datef > $element->datep) print " - ".dol_print_date($element->datef,'dayhour');
|
||||
}
|
||||
print '<td align="center">'.dol_print_date($date,'day').'</td>';
|
||||
else print dol_print_date($date,'day');
|
||||
print '</td>';
|
||||
|
||||
// Third party or user
|
||||
print '<td align="left">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user