diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 43fe619bd1a..c1a6d38a58a 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1548,7 +1548,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:0; + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; $datedelivery = (!empty($objectsrc->date_livraison)?$objectsrc->date_livraison:''); @@ -1567,7 +1567,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:0; + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; $projectid = 0; } $absolute_discount=$soc->getAvailableDiscounts(); @@ -1643,7 +1643,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:0; + else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; } $form->select_date($datedelivery,'liv_','','','',"crea_commande",1,1); print ""; diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 7b79a16bec1..5ea4e5b72cb 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -373,7 +373,7 @@ if ($action == 'create' && empty($mesgs)) $remise_percent = $soc->remise_percent; } $remise_absolue = 0; - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0; + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; $absolute_discount=$soc->getAvailableDiscounts(); print '