forked from Wavyzz/dolibarr
Remove pdate
This commit is contained in:
@@ -790,8 +790,8 @@ else
|
||||
|
||||
$sql = "SELECT cd.rowid, cd.statut, cd.label as label_det, cd.fk_product, cd.description, cd.price_ht, cd.qty,";
|
||||
$sql.= " cd.tva_tx, cd.remise_percent, cd.info_bits, cd.subprice,";
|
||||
$sql.= " ".$db->pdate("cd.date_ouverture_prevue")." as date_debut, ".$db->pdate("cd.date_ouverture")." as date_debut_reelle,";
|
||||
$sql.= " ".$db->pdate("cd.date_fin_validite")." as date_fin, ".$db->pdate("cd.date_cloture")." as date_fin_reelle,";
|
||||
$sql.= " cd.date_ouverture_prevue as date_debut, cd.date_ouverture as date_debut_reelle,";
|
||||
$sql.= " cd.date_fin_validite as date_fin, cd.date_cloture as date_fin_reelle,";
|
||||
$sql.= " cd.commentaire as comment,";
|
||||
$sql.= " p.ref, p.label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."contratdet as cd";
|
||||
@@ -889,17 +889,19 @@ else
|
||||
|
||||
// Date planned
|
||||
print $langs->trans("DateStartPlanned").': ';
|
||||
if ($objp->date_debut) {
|
||||
print dol_print_date($objp->date_debut);
|
||||
if ($objp->date_debut)
|
||||
{
|
||||
print dol_print_date($db->jdate($objp->date_debut));
|
||||
// Warning si date prevu passee et pas en service
|
||||
if ($objp->statut == 0 && $objp->date_debut < ($now - $conf->contrat->services->inactifs->warning_delay)) { print " ".img_warning($langs->trans("Late")); }
|
||||
if ($objp->statut == 0 && $db->jdate($objp->date_debut) < ($now - $conf->contrat->services->inactifs->warning_delay)) { print " ".img_warning($langs->trans("Late")); }
|
||||
}
|
||||
else print $langs->trans("Unknown");
|
||||
print ' - ';
|
||||
print $langs->trans("DateEndPlanned").': ';
|
||||
if ($objp->date_fin) {
|
||||
print dol_print_date($objp->date_fin);
|
||||
if ($objp->statut == 4 && $objp->date_fin < ($now - $conf->contrat->services->expires->warning_delay)) { print " ".img_warning($langs->trans("Late")); }
|
||||
if ($objp->date_fin)
|
||||
{
|
||||
print dol_print_date($db->jdate($objp->date_fin));
|
||||
if ($objp->statut == 4 && $db->jdate($objp->date_fin) < ($now - $conf->contrat->services->expires->warning_delay)) { print " ".img_warning($langs->trans("Late")); }
|
||||
}
|
||||
else print $langs->trans("Unknown");
|
||||
|
||||
@@ -942,9 +944,9 @@ else
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td colspan="5">';
|
||||
print $langs->trans("DateStartPlanned").' ';
|
||||
$form->select_date($objp->date_debut,"date_start_update",$usehm,$usehm,($objp->date_debut>0?0:1),"update");
|
||||
$form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update");
|
||||
print '<br>'.$langs->trans("DateEndPlanned").' ';
|
||||
$form->select_date($objp->date_fin,"date_end_update",$usehm,$usehm,($objp->date_fin>0?0:1),"update");
|
||||
$form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update");
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@@ -388,8 +388,8 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$sql = "SELECT cd.rowid, cd.fk_product, cd.product_type, cd.description, cd.price, cd.tva_tx, cd.subprice,";
|
||||
$sql.= " cd.qty,";
|
||||
$sql.= ' '.$db->pdate('cd.date_start').' as date_start,';
|
||||
$sql.= ' '.$db->pdate('cd.date_end').' as date_end,';
|
||||
$sql.= ' cd.date_start,';
|
||||
$sql.= ' cd.date_end,';
|
||||
$sql.= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid,';
|
||||
$sql.= ' p.description as product_desc';
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd";
|
||||
@@ -453,7 +453,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print $html->textwithtooltip($text,$description,3,'','',$i);
|
||||
|
||||
// Show range
|
||||
print_date_range($objp->date_start,$objp->date_end);
|
||||
print_date_range($db->jdate($objp->date_start),$db->jdate($objp->date_end));
|
||||
|
||||
// Add description in form
|
||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
||||
@@ -471,7 +471,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print $text.' '.nl2br($objp->description);
|
||||
|
||||
// Show range
|
||||
print_date_range($objp->date_start,$objp->date_end);
|
||||
print_date_range($db->jdate($objp->date_start),$db->jdate($objp->date_end));
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user