Fix: ne pas afficher le 1970 si la date de livraison n'est pas défini
This commit is contained in:
parent
0369a01100
commit
9e74308131
@ -509,7 +509,7 @@ class Commande extends CommonObject
|
|||||||
$sql.= " '".addslashes($this->note)."', ";
|
$sql.= " '".addslashes($this->note)."', ";
|
||||||
$sql.= " '".addslashes($this->note_public)."', ";
|
$sql.= " '".addslashes($this->note_public)."', ";
|
||||||
$sql.= " '".addslashes($this->ref_client)."', '".$this->modelpdf."', '".$this->cond_reglement_id."', '".$this->mode_reglement_id."',";
|
$sql.= " '".addslashes($this->ref_client)."', '".$this->modelpdf."', '".$this->cond_reglement_id."', '".$this->mode_reglement_id."',";
|
||||||
$sql.= " '".($this->date_livraison?$this->db->idate($this->date_livraison):'null')."',";
|
$sql.= " '".($this->date_livraison?$this->db->idate($this->date_livraison):'')."',";
|
||||||
$sql.= " '".$this->adresse_livraison_id."',";
|
$sql.= " '".$this->adresse_livraison_id."',";
|
||||||
$sql.= " '".$this->remise_absolue."',";
|
$sql.= " '".$this->remise_absolue."',";
|
||||||
$sql.= " '".$this->remise_percent."')";
|
$sql.= " '".$this->remise_percent."')";
|
||||||
|
|||||||
@ -1174,7 +1174,7 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print dolibarr_print_date($commande->date_livraison,'daytext');
|
print $commande->date_livraison ? dolibarr_print_date($commande->date_livraison,'daytext') : ' ';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>';
|
print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>';
|
||||||
|
|||||||
@ -533,7 +533,7 @@ function dolibarr_print_date($time,$format='')
|
|||||||
if (! $format) $format='%Y-%m-%d %H:%M:%S';
|
if (! $format) $format='%Y-%m-%d %H:%M:%S';
|
||||||
|
|
||||||
// Si date non définie, on renvoie ''
|
// Si date non définie, on renvoie ''
|
||||||
if ("$time" == "") return ''; // $time=0 permis car signifie 01/01/1970 00:00:00
|
if ($time == "") return ''; // $time=0 permis car signifie 01/01/1970 00:00:00
|
||||||
|
|
||||||
// Analyse de la date
|
// Analyse de la date
|
||||||
if (eregi('^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?',$time,$reg))
|
if (eregi('^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?',$time,$reg))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user