diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 9f91c462a40..be9e23afecc 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2233,7 +2233,7 @@ if (empty($reshook)) { setEventMessages($mesg, null, 'errors'); } else { // Add batchinfo if the detail_batch array is defined - if (!empty($lines[$i]->detail_batch) && is_array($lines[$i]->detail_batch) && !empty($conf->global->INVOICE_INCUDE_DETAILS_OF_LOTS_SERIALS)) { + if (!empty($conf->productbatch->enabled) && !empty($lines[$i]->detail_batch) && is_array($lines[$i]->detail_batch) && !empty($conf->global->INVOICE_INCUDE_DETAILS_OF_LOTS_SERIALS)) { $langs->load('productbatch'); foreach ($lines[$i]->detail_batch as $batchline) { $desc .= ' '.$langs->trans('Batch').' '.$batchline->batch.' '.$langs->trans('printQty', $batchline->qty).' ';