Merge pull request #18373 from bb2a/PDF_Ref_In_Title
[NEW] PDF Document ref in title option
This commit is contained in:
commit
f2f3c5daf5
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012-2107 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -93,6 +94,7 @@ if ($action == 'update') {
|
||||
|
||||
if (GETPOSTISSET('MAIN_DOCUMENTS_LOGO_HEIGHT')) dolibarr_set_const($db, "MAIN_DOCUMENTS_LOGO_HEIGHT", GETPOST("MAIN_DOCUMENTS_LOGO_HEIGHT", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
if (GETPOSTISSET('MAIN_INVERT_SENDER_RECIPIENT')) dolibarr_set_const($db, "MAIN_INVERT_SENDER_RECIPIENT", GETPOST("MAIN_INVERT_SENDER_RECIPIENT"), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (GETPOSTISSET('MAIN_PDF_USE_ISO_LOCATION')) dolibarr_set_const($db, "MAIN_PDF_USE_ISO_LOCATION", GETPOST("MAIN_PDF_USE_ISO_LOCATION"), 'chaine', 0, '', $conf->entity);
|
||||
if (GETPOSTISSET('MAIN_PDF_NO_CUSTOMER_CODE')) dolibarr_set_const($db, "MAIN_PDF_NO_CUSTOMER_CODE", GETPOST("MAIN_PDF_NO_CUSTOMER_CODE"), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
|
||||
@ -1311,20 +1311,16 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$title = $outputlangs->transnoentities($titlekey);
|
||||
|
||||
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
|
||||
|
||||
$pdf->MultiCell($w, 3, $title, '', 'R');
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
|
||||
$posy += 5;
|
||||
$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);
|
||||
$posy += 2;
|
||||
|
||||
if ($object->ref_client) {
|
||||
$posy += 5;
|
||||
$posy += 3;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R');
|
||||
|
||||
@ -1483,25 +1483,15 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
$title .= $outputlangsbis->transnoentities($titlekey);
|
||||
}
|
||||
|
||||
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
|
||||
|
||||
$pdf->MultiCell($w, 3, $title, '', 'R');
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
|
||||
$posy += 5;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref);
|
||||
if ($object->statut == $object::STATUS_DRAFT) {
|
||||
$pdf->SetTextColor(128, 0, 0);
|
||||
$textref .= ' - '.$outputlangs->transnoentities("NotValidated");
|
||||
}
|
||||
$pdf->MultiCell($w, 4, $textref, '', 'R');
|
||||
|
||||
$posy += 1;
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$posy += 2;
|
||||
|
||||
if ($object->ref_client) {
|
||||
$posy += 4;
|
||||
$posy += 3;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R');
|
||||
|
||||
@ -640,19 +640,14 @@ class pdf_strato extends ModelePDFContract
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$title = $outputlangs->transnoentities("ContractCard");
|
||||
|
||||
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
|
||||
|
||||
$pdf->MultiCell(100, 4, $title, '', 'R');
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size + 2);
|
||||
|
||||
$posy += 5;
|
||||
$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');
|
||||
|
||||
@ -1003,16 +1003,12 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$title = $outputlangs->transnoentities("SendingSheet");
|
||||
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
|
||||
|
||||
$pdf->MultiCell($w, 4, $title, '', 'R');
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size + 1);
|
||||
|
||||
$posy += 5;
|
||||
|
||||
$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;
|
||||
|
||||
@ -953,15 +953,13 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$title = $outputlangs->transnoentities("SendingSheet");
|
||||
|
||||
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
|
||||
|
||||
$pdf->MultiCell($w, 4, $title, '', 'R');
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size + 1);
|
||||
|
||||
$posy += 5;
|
||||
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefSending")." : ".$object->ref, '', 'R');
|
||||
$posy += 1;
|
||||
|
||||
// Date planned delivery
|
||||
if (!empty($object->date_delivery)) {
|
||||
|
||||
@ -986,6 +986,8 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$title = $outputlangs->transnoentities("PaymentsBackAlreadyDone");
|
||||
}
|
||||
|
||||
$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);
|
||||
|
||||
@ -987,6 +987,8 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$title = $outputlangs->transnoentities("PaymentsBackAlreadyDone");
|
||||
}
|
||||
|
||||
$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);
|
||||
|
||||
@ -596,19 +596,15 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$title = $outputlangs->transnoentities("InterventionCard");
|
||||
|
||||
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
|
||||
|
||||
$pdf->MultiCell(100, 4, $title, '', 'R');
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size + 2);
|
||||
|
||||
$posy += 5;
|
||||
$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');
|
||||
|
||||
@ -1473,17 +1473,12 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$title = $outputlangs->transnoentities("PdfCommercialProposalTitle");
|
||||
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
|
||||
|
||||
$pdf->MultiCell(100, 4, $title, '', 'R');
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
|
||||
$posy += 5;
|
||||
$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 - 2);
|
||||
$posy += 1;
|
||||
|
||||
if ($object->ref_client) {
|
||||
$posy += 4;
|
||||
|
||||
@ -1574,25 +1574,15 @@ class pdf_cyan extends ModelePDFPropales
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$title = $outputlangs->transnoentities("PdfCommercialProposalTitle");
|
||||
$title .= " " . $outputlangs->convToOutputCharset($object->ref);
|
||||
|
||||
$pdf->MultiCell($w, 4, $title, '', 'R');
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
|
||||
$posy += 5;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref);
|
||||
if ($object->statut == $object::STATUS_DRAFT) {
|
||||
$pdf->SetTextColor(128, 0, 0);
|
||||
$textref .= ' - '.$outputlangs->transnoentities("NotValidated");
|
||||
}
|
||||
$pdf->MultiCell($w, 4, $textref, '', 'R');
|
||||
|
||||
$posy += 1;
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$posy += 2;
|
||||
|
||||
if ($object->ref_client) {
|
||||
$posy += 4;
|
||||
$posy += 3;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user