Fix: hour reported is not user hour. To fix this, we show both hour

"server and user" but only if it differs.
This commit is contained in:
Laurent Destailleur
2012-05-12 16:27:20 +02:00
parent 28febe728b
commit 64c7ae1667

View File

@@ -129,6 +129,7 @@ function dol_print_file($langs,$filename,$searchalt=0)
/**
* Show informations on an object
* TODO Move this into html.formother
*
* @param Object $object Objet to show
* @return void
@@ -138,6 +139,9 @@ function dol_print_object_info($object)
global $langs,$db;
$langs->load("other");
$deltadateforuser=((int) $_SESSION['dol_tz'] + (int) $_SESSION['dol_dst']);
//$deltadateforcompany=((int) $_SESSION['dol_tz'] + (int) $_SESSION['dol_dst']);
// Import key
if (isset($object->import_key))
print $langs->trans("ImportedWithSet")." : " . $object->import_key . '<br>';
@@ -161,7 +165,11 @@ function dol_print_object_info($object)
// Date creation
if (isset($object->date_creation))
print $langs->trans("DateCreation")." : " . dol_print_date($object->date_creation,"dayhourtext") . '<br>';
{
print $langs->trans("DateCreation")." : " . dol_print_date($object->date_creation,"dayhourtext");
if ($deltadateforuser) print ' &nbsp;'.$langs->trans("CurrentHour").' &nbsp; / &nbsp; '.dol_print_date($object->date_creation+($deltadateforuser*3600),"dayhourtext").' &nbsp;'.$langs->trans("ClientHour");
print '<br>';
}
// User change
if (isset($object->user_modification))
@@ -182,7 +190,11 @@ function dol_print_object_info($object)
// Date change
if (isset($object->date_modification))
print $langs->trans("DateLastModification")." : " . dol_print_date($object->date_modification,"dayhourtext") . '<br>';
{
print $langs->trans("DateLastModification")." : " . dol_print_date($object->date_modification,"dayhourtext");
if ($deltadateforuser) print ' &nbsp;'.$langs->trans("CurrentHour").' &nbsp; / &nbsp; '.dol_print_date($object->date_modification+($deltadateforuser*3600),"dayhourtext").' &nbsp;'.$langs->trans("ClientHour");
print '<br>';
}
// User validation
if (isset($object->user_validation))
@@ -203,7 +215,11 @@ function dol_print_object_info($object)
// Date validation
if (isset($object->date_validation))
print $langs->trans("DateValidation")." : " . dol_print_date($object->date_validation,"dayhourtext") . '<br>';
{
print $langs->trans("DateValidation")." : " . dol_print_date($object->date_validation,"dayhourtext");
if ($deltadateforuser) print ' &nbsp;'.$langs->trans("CurrentHour").' &nbsp; / &nbsp; '.dol_print_date($object->date_validation+($deltadateforuser*3600),"dayhourtext").' &nbsp;'.$langs->trans("ClientHour");
print '<br>';
}
// User approve
if (isset($object->user_approve))
@@ -224,7 +240,11 @@ function dol_print_object_info($object)
// Date approve
if (isset($object->date_approve))
print $langs->trans("DateApprove")." : " . dol_print_date($object->date_approve,"dayhourtext") . '<br>';
{
print $langs->trans("DateApprove")." : " . dol_print_date($object->date_approve,"dayhourtext");
if ($deltadateforuser) print ' &nbsp;'.$langs->trans("CurrentHour").' &nbsp; / &nbsp; '.dol_print_date($object->date_approve+($deltadateforuser*3600),"dayhourtext").' &nbsp;'.$langs->trans("ClientHour");
print '<br>';
}
// User close
if (isset($object->user_cloture))
@@ -245,7 +265,11 @@ function dol_print_object_info($object)
// Date close
if (isset($object->date_cloture))
print $langs->trans("DateClosing")." : " . dol_print_date($object->date_cloture,"dayhourtext") . '<br>';
{
print $langs->trans("DateClosing")." : " . dol_print_date($object->date_cloture,"dayhourtext");
if ($deltadateforuser) print ' &nbsp;'.$langs->trans("CurrentHour").' &nbsp; / &nbsp; '.dol_print_date($object->date_cloture+($deltadateforuser*3600),"dayhourtext").' &nbsp;'.$langs->trans("ClientHour");
print '<br>';
}
// User conciliate
if (isset($object->user_rappro))
@@ -266,11 +290,19 @@ function dol_print_object_info($object)
// Date conciliate
if (isset($object->date_rappro))
print $langs->trans("DateConciliating")." : " . dol_print_date($object->date_rappro,"dayhourtext") . '<br>';
{
print $langs->trans("DateConciliating")." : " . dol_print_date($object->date_rappro,"dayhourtext");
if ($deltadateforuser) print ' &nbsp;'.$langs->trans("CurrentHour").' &nbsp; / &nbsp; '.dol_print_date($object->date_rappro+($deltadateforuser*3600),"dayhourtext").' &nbsp;'.$langs->trans("ClientHour");
print '<br>';
}
// Date send
if (isset($object->date_envoi))
print $langs->trans("DateLastSend")." : " . dol_print_date($object->date_envoi,"dayhourtext") . '<br>';
{
print $langs->trans("DateLastSend")." : " . dol_print_date($object->date_envoi,"dayhourtext");
if ($deltadateforuser) print ' &nbsp;'.$langs->trans("CurrentHour").' &nbsp; / &nbsp; '.dol_print_date($object->date_envoi+($deltadateforuser*3600),"dayhourtext").' &nbsp;'.$langs->trans("ClientHour");
print '<br>';
}
}
/**