FIX Filter on date lost after submit on time spent page

This commit is contained in:
Laurent Destailleur 2017-03-16 10:36:17 +01:00
parent deb91ad7c1
commit 68e50d0c79
3 changed files with 5 additions and 2 deletions

View File

@ -60,6 +60,7 @@ $langs->load('propal');
$langs->load('deliveries');
$langs->load('sendings');
$langs->load('products');
$langs->load('other');
if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
if (! empty($conf->margin->enabled)) $langs->load('margins');
if (! empty($conf->productbatch->enabled)) $langs->load("productbatch");
@ -2079,7 +2080,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
print $object->date ? dol_print_date($object->date, 'daytext') : '&nbsp;';
print $object->date ? dol_print_date($object->date, 'day') : '&nbsp;';
if ($object->hasDelay() && empty($object->date_livraison)) {
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
}

View File

@ -53,6 +53,8 @@ if (! $object->fetch($id, $ref) > 0)
* View
*/
$form = new Form($db);
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
$object->fetch_thirdparty();

View File

@ -262,7 +262,7 @@ if ($action == 'addtime' && $user->rights->projet->lire)
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
// Redirect to avoid submit twice on back
header('Location: '.$_SERVER["PHP_SELF"].($projectid?'?id='.$projectid:'?').($mode?'&mode='.$mode:''));
header('Location: '.$_SERVER["PHP_SELF"].($projectid?'?id='.$projectid:'?').($mode?'&mode='.$mode:'').($day?'&day='.$day:'').($month?'&month='.$month:'').($year?'&year='.$year:''));
exit;
}
}