Fix: delivery date must not be autofill with current date
This commit is contained in:
parent
3cc4358e72
commit
5fe5ec939d
@ -1279,7 +1279,7 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
$demand_reason_id = (!empty($objectsrc->demand_reason_id)?$objectsrc->demand_reason_id:(!empty($soc->demand_reason_id)?$soc->demand_reason_id:0));
|
||||
$remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0));
|
||||
$remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0));
|
||||
$dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'';
|
||||
$dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER)?-1:'';
|
||||
|
||||
$datedelivery = (! empty($objectsrc->date_livraison) ? $objectsrc->date_livraison : '');
|
||||
|
||||
@ -1300,7 +1300,7 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
$demand_reason_id = $soc->demand_reason_id;
|
||||
$remise_percent = $soc->remise_percent;
|
||||
$remise_absolue = 0;
|
||||
$dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'';
|
||||
$dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER)?-1:'';
|
||||
$projectid = 0;
|
||||
}
|
||||
$absolute_discount=$soc->getAvailableDiscounts();
|
||||
@ -1368,7 +1368,8 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
}
|
||||
// Date
|
||||
print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td colspan="2">';
|
||||
$form->select_date('', 're', '', '', '', "crea_commande", 1, 1);
|
||||
//$form->select_date($dateorder, 're', '', '', '', "crea_commande", 1, 1);
|
||||
$form->select_date('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date
|
||||
print '</td></tr>';
|
||||
|
||||
// Date de livraison
|
||||
@ -1376,7 +1377,7 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
if (empty($datedelivery))
|
||||
{
|
||||
if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
|
||||
else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'';
|
||||
else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE_DELIVERY)?-1:'';
|
||||
}
|
||||
$form->select_date($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1);
|
||||
print "</td></tr>";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user