diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 7404c634f77..625d3584382 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -779,6 +779,14 @@ abstract class CommonDocGenerator $resarray[$array_key.'_total_discount_ht'] = ''; } + if ($object->element == 'facture' || $object->element == 'invoice_supplier') { + if ($object->type == 0) { + $resarray[$array_key.'_type_label'] = $outputlangs->transnoentities("PdfInvoiceTitle"); + } else { + $resarray[$array_key.'_type_label'] = (empty($object)) ? '' : $object->getLibType(0); + } + } + // Fetch project information if there is a project assigned to this object if ($object->element != "project" && !empty($object->fk_project) && $object->fk_project > 0) { if (!is_object($object->project)) { diff --git a/htdocs/install/doctemplates/invoices/template_invoice.odt b/htdocs/install/doctemplates/invoices/template_invoice.odt index 925d9f087cd..5d44e1a606c 100644 Binary files a/htdocs/install/doctemplates/invoices/template_invoice.odt and b/htdocs/install/doctemplates/invoices/template_invoice.odt differ diff --git a/htdocs/install/doctemplates/supplier_invoices/template_supplier_invoices.odt b/htdocs/install/doctemplates/supplier_invoices/template_supplier_invoices.odt index 8ece83c989c..b53c0c79f48 100644 Binary files a/htdocs/install/doctemplates/supplier_invoices/template_supplier_invoices.odt and b/htdocs/install/doctemplates/supplier_invoices/template_supplier_invoices.odt differ