$reception->loadRefsBack(); } $pdf = new CMbPdf(); $pdf->setFont("vera", '', "10"); // Définition des marges de la pages //$pdf->SetMargins(15, 15); $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); $pdf->SetAutoPageBreak(0); // Creation d'une nouvelle page $pdf->AddPage(); if ($reception->_id) { $lots = $reception->_ref_reception_items; } else { $lot = new CProductOrderItemReception(); $lot->load($lot_id); $lots = array($lot); } $data = array(); $j = 0; foreach ($lots as &$item) { $item->loadRefsBack(); $item->loadRefsFwd(); $item->_ref_order_item->loadReference(); $reference = $item->_ref_order_item->_ref_reference; $reference->loadRefsFwd(); $reference->_ref_product->loadRefsFwd(); if (!$item->barcode_printed || $force_print) { for ($i = 0; $i < $item->quantity / $reference->quantity; $i++) { $data[$j] = array(); $d =& $data[$j];