Ejemplo n.º 1
0
 $pdf->elementAdd('Inventaire validé : ' . $sValide, 'motif', 'header');
 $pdf->elementAdd('', 'traitEnteteProduit', 'content');
 $pdf->elementAdd('', 'traitEnteteProduitInf', 'content');
 $pdf->elementAdd('Commentaire : ' . $oInv->inv_lbl, 'commentaire', 'content');
 //Ajout trait bas du footer
 $pdf->elementAdd('', 'traitBas', 'footer');
 //Colonnes du tableau
 $pdf->productHeaderAddRow('REFERENCE', 30, 'C');
 $pdf->productHeaderAddRow('PRODUIT ', 25, 'C');
 $pdf->productHeaderAddRow('N°LOT', 20, 'C');
 $pdf->productHeaderAddRow('QTE STOCK', 30, 'C');
 $pdf->productHeaderAddRow('QTE REEL', 25, 'C');
 $pdf->productHeaderAddRow('DLC/DLUO', 25, 'C');
 $pdf->productHeaderAddRow('COMMENTAIRE', 35, 'C');
 //#2 Ajout des infos
 $pdf->initPDF("INVENTAIRE N°" . $oInv->inv_id, "Créé le " . $day . "/" . $month . "/" . $year);
 if (isset($tabLigPdf)) {
     //Création d'une ligne par éléments à l'intérieur de mon tableau
     for ($i = 0; $i < count($tabLigPdf['ref']); $i++) {
         //On formate la date récupéré comme on la souhaite
         list($year, $month, $day) = explode("-", (string) $tabLigPdf['lot'][$i]->lot_dlc);
         $lotDlc = $day . "/" . $month . "/" . $year;
         //Et on ajoute une ligne à notre PDF
         $pdf->productAdd(array((string) $tabLigPdf['ref'][$i]->ref_code, (string) $tabLigPdf['ref'][$i]->ref_lbl, (string) $tabLigPdf['lot'][$i]->lot_id, (string) $tabLigPdf['invLig'][$i]->liginv_qt_stock, (string) $tabLigPdf['invLig'][$i]->liginv_qt_reel, $lotDlc, (string) $tabLigPdf['invLig'][$i]->liginv_lbl));
     }
 }
 require_once $path . '/templatePdf/template.php';
 //------------------Construction du pdf ------------------//
 //# Construction et affichage du pdf
 $pdf->buildPDF();
 $pdf->Output('INVENTAIRE' . $oInv->inv_id . 'pdf', 'I');
Ejemplo n.º 2
0
    $pdf->elementAdd('Commentaire : ' . $oBe->be_com, 'commentaire', 'content');
    if ($oBe->be_fact_num != '') {
        $pdf->elementAdd('N°facture associé : ' . $oBe->be_fact_num, 'champEntete2', 'content');
    }
    //Ajout trait bas du footer
    $pdf->elementAdd('', 'traitBas', 'footer');
    //Colonnes du tableau
    $pdf->productHeaderAddRow('REFERENCE ', 30, 'C');
    $pdf->productHeaderAddRow('PRODUIT ', 30, 'C');
    $pdf->productHeaderAddRow('N°LOT ', 20, 'C');
    $pdf->productHeaderAddRow('LOT QTE ', 25, 'C');
    $pdf->productHeaderAddRow('DLC/DLUO ', 25, 'C');
    $pdf->productHeaderAddRow('DEPOT ', 25, 'C');
    $pdf->productHeaderAddRow('COMMENTAIRE ', 40, 'C');
    //#2 Ajout des infos
    $pdf->initPDF("BON ENTREE N°" . $oBe->be_id, "Caen le " . $day . "/" . $month . "/" . $year);
    //Création d'une ligne par éléments à l'intérieur de mon tableau
    for ($i = 0; $i < count($tabLig['ref']); $i++) {
        //On formate la date récupéré comme on la souhaite
        list($year, $month, $day) = explode("-", (string) $tabLig['lot'][$i]->lot_dlc);
        $lotDlc = $day . "/" . $month . "/" . $year;
        $pdf->productAdd(array((string) $tabLig['ref'][$i]->ref_code, (string) $tabLig['ref'][$i]->ref_lbl, (string) $tabLig['lot'][$i]->lot_id, (string) $tabLig['lig'][$i]->lig_qte, $lotDlc, (string) $tabLig['lig'][$i]->lig_com_dep, (string) $tabLig['lig'][$i]->lig_com));
    }
    require_once $path . '/templatePdf/template.php';
    //------------------Construction du pdf ------------------//
    //# Construction et affichage du pdf
    $pdf->buildPDF();
    $pdf->Output('Bon' . $sTypeBon . $oBe->be_id . 'pdf', 'I');
    //On vide le buffer pour permettre l'affichage du pdf sans problèmes lors du prochain passage.
    ob_end_flush();
} catch (Exception $e) {
Ejemplo n.º 3
0
 //Si bon de sortie associé (cas du bon de retour)
 if ($oBon->bon_sortie_assoc != '') {
     $pdf->elementAdd('Bon de sortie associé : ' . $oBon->bon_sortie_assoc, 'bonSortieAssoc', 'content');
 }
 //Ajout trait bas du footer
 $pdf->elementAdd('', 'traitBas', 'footer');
 //Colonnes du tableau
 $pdf->productHeaderAddRow('REFERENCE ', 30, 'C');
 $pdf->productHeaderAddRow('PRODUIT ', 30, 'C');
 $pdf->productHeaderAddRow('N°LOT ', 20, 'C');
 $pdf->productHeaderAddRow('QTE ', 20, 'C');
 $pdf->productHeaderAddRow('DLC/DLUO ', 25, 'C');
 $pdf->productHeaderAddRow('DEPOT ', 25, 'C');
 $pdf->productHeaderAddRow('COMMENTAIRE ', 40, 'C');
 //#2 Ajout des infos
 $pdf->initPDF("BON N°" . $oBon->bon_id . " " . $sCat, "Caen le " . $day . "/" . $month . "/" . $year);
 if (isset($tabLig)) {
     //Création d'une ligne par éléments à l'intérieur de mon tableau
     for ($i = 0; $i < count($tabLig['ref']); $i++) {
         //On formate la date récupéré comme on la souhaite
         list($year, $month, $day) = explode("-", (string) $tabLig['lot'][$i]->lot_dlc);
         $lotDlc = $day . "/" . $month . "/" . $year;
         $pdf->productAdd(array((string) $tabLig['ref'][$i]->ref_code, (string) $tabLig['ref'][$i]->ref_lbl, (string) $tabLig['lot'][$i]->lot_id, (string) $tabLig['lig'][$i]->lig_qte, $lotDlc, (string) $tabLig['lig'][$i]->lig_com_dep, (string) $tabLig['lig'][$i]->lig_com));
     }
 }
 require_once $path . '/templatePdf/template.php';
 //------------------Construction du pdf ------------------//
 //# Construction et affichage du pdf
 $pdf->buildPDF();
 $pdf->Output('Bon' . $sTypeBon . $oBon->bon_id . 'pdf', 'I');
 //On vide le buffer pour permettre l'affichage du pdf sans problèmes lors du prochain passage.