Merge pull request #24333 from aspangaro/18a7

FIX Invoice - Better situation invoice title
This commit is contained in:
Laurent Destailleur 2023-03-26 15:33:47 +02:00 committed by GitHub
commit 8ced185b8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -1876,7 +1876,8 @@ class pdf_crabe extends ModelePDFFactures
$title = $outputlangs->transnoentities("InvoiceProForma");
}
if ($this->situationinvoice) {
$title = $outputlangs->transnoentities("PDFInvoiceSituation");
$langs->loadLangs(array("other"));
$title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -";
}
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
$title .= ' - ';
@ -1919,11 +1920,11 @@ class pdf_crabe extends ModelePDFFactures
$posy += 3;
$pdf->SetFont('', '', $default_font_size - 2);
if ($object->ref_client) {
if ($object->ref_customer) {
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R');
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_customer), '', 'R');
}
if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) {

View File

@ -2126,7 +2126,8 @@ class pdf_sponge extends ModelePDFFactures
$title = $outputlangs->transnoentities("InvoiceProForma");
}
if ($this->situationinvoice) {
$title = $outputlangs->transnoentities("PDFInvoiceSituation");
$langs->loadLangs(array("other"));
$title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -";
}
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
$title .= ' - ';
@ -2169,11 +2170,11 @@ class pdf_sponge extends ModelePDFFactures
$posy += 3;
$pdf->SetFont('', '', $default_font_size - 2);
if ($object->ref_client) {
if ($object->ref_customer) {
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".dol_trunc($outputlangs->convToOutputCharset($object->ref_client), 65), '', 'R');
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".dol_trunc($outputlangs->convToOutputCharset($object->ref_customer), 65), '', 'R');
}
if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) {