This commit is contained in:
Laurent Destailleur 2022-02-04 13:18:07 +01:00
parent eb644bf6bb
commit 66430f6087
2 changed files with 31 additions and 9 deletions

View File

@ -919,6 +919,11 @@ class pdf_azur extends ModelePDFPropales
}
$posxval = 52;
if (!empty($conf->global->MAIN_PDF_DELIVERY_DATE_TEXT)) {
$displaydate = "daytext";
} else {
$displaydate = "day";
}
// Show shipping date
if (!empty($object->delivery_date)) {
@ -929,7 +934,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->MultiCell(80, 4, $titre, 0, 'L');
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
$dlp = dol_print_date($object->delivery_date, "daytext", false, $outputlangs, true);
$dlp = dol_print_date($object->delivery_date, $displaydate, false, $outputlangs, true);
$pdf->MultiCell(80, 4, $dlp, 0, 'L');
$posy = $pdf->GetY() + 1;
@ -1557,15 +1562,21 @@ class pdf_azur extends ModelePDFPropales
}
}
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DatePropal")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
if (!empty($conf->global->MAIN_PDF_DATE_TEXT)) {
$displaydate = "daytext";
} else {
$displaydate = "day";
}
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEndPropal")." : ".dol_print_date($object->fin_validite, "day", false, $outputlangs, true), '', 'R');
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DatePropal")." : ".dol_print_date($object->date, $displaydate, false, $outputlangs, true), '', 'R');
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEndPropal")." : ".dol_print_date($object->fin_validite, $displaydate, false, $outputlangs, true), '', 'R');
if (empty($conf->global->MAIN_PDF_HIDE_CUSTOMER_CODE) && $object->thirdparty->code_client) {
$posy += 4;

View File

@ -1038,6 +1038,11 @@ class pdf_cyan extends ModelePDFPropales
}
$posxval = 52;
if (!empty($conf->global->MAIN_PDF_DATE_TEXT)) {
$displaydate = "daytext";
} else {
$displaydate = "day";
}
// Show shipping date
if (!empty($object->delivery_date)) {
@ -1048,7 +1053,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->MultiCell(80, 4, $titre, 0, 'L');
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
$dlp = dol_print_date($object->delivery_date, "daytext", false, $outputlangs, true);
$dlp = dol_print_date($object->delivery_date, $displaydate, false, $outputlangs, true);
$pdf->MultiCell(80, 4, $dlp, 0, 'L');
$posy = $pdf->GetY() + 1;
@ -1637,10 +1642,16 @@ class pdf_cyan extends ModelePDFPropales
}
}
if (!empty($conf->global->MAIN_PDF_DATE_TEXT)) {
$displaydate = "daytext";
} else {
$displaydate = "day";
}
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date, $displaydate, false, $outputlangs, true), '', 'R');
$posy += 4;
$pdf->SetXY($posx, $posy);
@ -1650,7 +1661,7 @@ class pdf_cyan extends ModelePDFPropales
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
$title .= ' - '.$outputlangsbis->transnoentities("DateEndPropal");
}
$pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->fin_validite, "day", false, $outputlangs, true), '', 'R');
$pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->fin_validite, $displaydate, false, $outputlangs, true), '', 'R');
if (empty($conf->global->MAIN_PDF_HIDE_CUSTOMER_CODE) && $object->thirdparty->code_client) {
$posy += 4;