Update shipment.php
This commit is contained in:
parent
83ec39f55a
commit
447c61cc15
@ -103,16 +103,17 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
if ($action == 'setdatedelivery' && $user->rights->commande->creer)
|
||||
{
|
||||
//print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year'];
|
||||
$datelivraison = dol_mktime(0, 0, 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int'));
|
||||
{
|
||||
//print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year'];
|
||||
$datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int'));
|
||||
|
||||
$object = new Commande($db);
|
||||
$object->fetch($id);
|
||||
$result = $object->set_date_livraison($user, $datelivraison);
|
||||
if ($result < 0)
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
$object->fetch($id);
|
||||
$result = $object->set_date_livraison($user, $datedelivery);
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
/*
|
||||
if ($action == 'setdeliveryaddress' && $user->rights->commande->creer)
|
||||
{
|
||||
@ -373,13 +374,13 @@ if ($id > 0 || !empty($ref))
|
||||
print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setdatedelivery">';
|
||||
print $form->selectDate($object->date_livraison > 0 ? $object->date_livraison : -1, 'liv_', '', '', '', "setdatedelivery");
|
||||
print $form->selectDate($object->date_livraison ? $object->date_livraison : -1, 'liv_', 1, 1, '', "setdate_livraison", 1, 0);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print dol_print_date($object->date_livraison, 'daytext');
|
||||
print dol_print_date($object->date_livraison, 'dayhour');
|
||||
if ($object->hasDelay() && !empty($object->date_livraison)) {
|
||||
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user