Merge pull request #32394 from Easya-Solutions/develop_new_odt_invoice_type

NEW : ODT {object_type_label} for Invoices and Supplier Invoices
This commit is contained in:
Laurent Destailleur 2025-01-05 18:02:18 +01:00 committed by GitHub
commit 377233d998
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 0 deletions

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