default ref in title

This commit is contained in:
Anthony Berton 2021-08-19 16:13:41 +02:00
parent fcdb4bfafb
commit 10c445cf6a
10 changed files with 29 additions and 69 deletions

View File

@ -1311,21 +1311,11 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$title = $outputlangs->transnoentities($titlekey);
if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
}
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
$pdf->MultiCell($w, 3, $title, '', 'R');
$pdf->SetFont('', 'B', $default_font_size);
$posy += 5;
if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R');
$posy += 1;
}
$pdf->SetFont('', '', $default_font_size - 1);
if ($object->ref_client) {

View File

@ -1482,9 +1482,8 @@ class pdf_eratosthene extends ModelePDFCommandes
$title .= ' - ';
$title .= $outputlangsbis->transnoentities($titlekey);
}
if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
}
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
$pdf->MultiCell($w, 3, $title, '', 'R');

View File

@ -640,24 +640,14 @@ class pdf_strato extends ModelePDFContract
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$title = $outputlangs->transnoentities("ContractCard");
if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
}
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
$pdf->MultiCell(100, 4, $title, '', 'R');
$pdf->SetFont('', 'B', $default_font_size + 2);
$posy += 5;
if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R');
}
$posy += 1;
$pdf->SetFont('', '', $default_font_size);
$posy += 4;
$posy += 5;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date_contrat, "day", false, $outputlangs, true), '', 'R');

View File

@ -1003,9 +1003,9 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$title = $outputlangs->transnoentities("SendingSheet");
if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
}
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
$pdf->MultiCell($w, 4, $title, '', 'R');
$pdf->SetFont('', '', $default_font_size + 1);

View File

@ -953,23 +953,16 @@ class pdf_rouget extends ModelePdfExpedition
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$title = $outputlangs->transnoentities("SendingSheet");
if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
}
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
$pdf->MultiCell($w, 4, $title, '', 'R');
$pdf->SetFont('', '', $default_font_size + 1);
$posy += 5;
if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefSending")." : ".$object->ref, '', 'R');
}
// Date planned delivery
if (!empty($object->date_delivery)) {
$posy += 4;
$posy += 5;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery, "day", false, $outputlangs, true), '', 'R');

View File

@ -985,9 +985,9 @@ class pdf_crabe extends ModelePDFFactures
if ($object->type == 2) {
$title = $outputlangs->transnoentities("PaymentsBackAlreadyDone");
}
if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
}
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
$pdf->SetFont('', '', $default_font_size - 3);
$pdf->SetXY($tab3_posx, $tab3_top - 4);
$pdf->MultiCell(60, 3, $title, 0, 'L', 0);

View File

@ -986,9 +986,8 @@ class pdf_sponge extends ModelePDFFactures
if ($object->type == 2) {
$title = $outputlangs->transnoentities("PaymentsBackAlreadyDone");
}
if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
}
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
$pdf->SetFont('', '', $default_font_size - 3);
$pdf->SetXY($tab3_posx, $tab3_top - 4);

View File

@ -596,24 +596,15 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$title = $outputlangs->transnoentities("InterventionCard");
if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
}
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
$pdf->MultiCell(100, 4, $title, '', 'R');
$pdf->SetFont('', 'B', $default_font_size + 2);
$posy += 5;
if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R');
}
$posy += 1;
$pdf->SetFont('', '', $default_font_size);
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->datec, "day", false, $outputlangs, true), '', 'R');

View File

@ -1473,9 +1473,9 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$title = $outputlangs->transnoentities("PdfCommercialProposalTitle");
if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
}
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
$pdf->MultiCell(100, 4, $title, '', 'R');
$pdf->SetFont('', 'B', $default_font_size);

View File

@ -1573,10 +1573,8 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetFont('', 'B', $default_font_size + 3);
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$title = $outputlangs->transnoentities("PdfCommercialProposalTitle");
if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) {
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
}
$title = $outputlangs->transnoentities("PdfCommercialProposalTitle") . " " . $outputlangs->convToOutputCharset($object->ref);
$pdf->MultiCell($w, 4, $title, '', 'R');
$pdf->SetFont('', 'B', $default_font_size);