add invoice type label

This commit is contained in:
tnegre 2024-12-16 11:10:52 +01:00
parent 8fcf8a4712
commit e0e5594669

View file

@ -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)) {