Merge pull request #20347 from hregis/fix_avoid_php_warning
FIX avoid php warning
This commit is contained in:
commit
6ec272ef36
@ -321,28 +321,28 @@ class pdf_strato extends ModelePDFContract
|
||||
|
||||
// Description of product line
|
||||
|
||||
if ($objectligne->date_ouverture_prevue) {
|
||||
$datei = dol_print_date($objectligne->date_ouverture_prevue, 'day', false, $outputlangs, true);
|
||||
if (!empty($objectligne->date_start)) {
|
||||
$datei = dol_print_date((int) $objectligne->date_start, 'day', false, $outputlangs, true);
|
||||
} else {
|
||||
$datei = $langs->trans("Unknown");
|
||||
}
|
||||
|
||||
if ($objectligne->date_fin_validite) {
|
||||
$durationi = convertSecondToTime($objectligne->date_fin_validite - $objectligne->date_ouverture_prevue, 'allwithouthour');
|
||||
$datee = dol_print_date($objectligne->date_fin_validite, 'day', false, $outputlangs, true);
|
||||
if (!empty($objectligne->date_end)) {
|
||||
$durationi = convertSecondToTime((int) $objectligne->date_end - (int) $objectligne->date_start, 'allwithouthour');
|
||||
$datee = dol_print_date($objectligne->date_end, 'day', false, $outputlangs, true);
|
||||
} else {
|
||||
$durationi = $langs->trans("Unknown");
|
||||
$datee = $langs->trans("Unknown");
|
||||
}
|
||||
|
||||
if ($objectligne->date_ouverture) {
|
||||
$daters = dol_print_date($objectligne->date_ouverture, 'day', false, $outputlangs, true);
|
||||
if (!empty($objectligne->date_start_real)) {
|
||||
$daters = dol_print_date((int) $objectligne->date_start_real, 'day', false, $outputlangs, true);
|
||||
} else {
|
||||
$daters = $langs->trans("Unknown");
|
||||
}
|
||||
|
||||
if ($objectligne->date_cloture) {
|
||||
$datere = dol_print_date($objectligne->date_cloture, 'day', false, $outputlangs, true);
|
||||
if (!empty($objectligne->date_end_real)) {
|
||||
$datere = dol_print_date((int) $objectligne->date_end_real, 'day', false, $outputlangs, true);
|
||||
} else {
|
||||
$datere = $langs->trans("Unknown");
|
||||
}
|
||||
@ -363,7 +363,7 @@ class pdf_strato extends ModelePDFContract
|
||||
if (empty($conf->global->CONTRACT_HIDE_REAL_DATE_ON_PDF)) {
|
||||
$txt .= '<br>';
|
||||
$txt .= $outputlangs->transnoentities("DateStartRealShort")." : <strong>".$daters.'</strong>';
|
||||
if ($objectligne->date_cloture) {
|
||||
if (!empty($objectligne->date_end_real)) {
|
||||
$txt .= " - ".$outputlangs->transnoentities("DateEndRealShort")." : '<strong>'".$datere.'</strong>';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user