1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
$pdf=new FPDF();
$pdf->Open();
$pdf->AddPage();
$pdf->AliasNbPages();
$pdf->SetAutoPageBreak(false, 1);
$pdf->SetXY(90,10);
$pdf->SetFont('Arial','B',20);
$pdf->Cell(18,7,'Export distributeur - '.$infoDistrib["nom_fournisseur"],0,0,'C',0);
$pdf->Rect(5, 5, 189, 17);
$pdf->SetXY(95,23);
$pdf->SetFont('Arial','I',13);
$pdf->Cell(18,7,'Entreprise X',0,0,'C',0);
$pdf->SetXY(95,28);
$yvf = 30;
$pdf->SetXY(10,$yvf);
$pdf->SetFont('Arial','B',12);
$pdf->Cell(5, $yvf , 'Casier',0,0,'L',0);
$pdf->SetXY(50,$yvf);
$pdf->SetFont('Arial','B',12);
$pdf->Cell(30, $yvf , 'Disque',0,0,'C',0);
$pdf->SetXY(100,$yvf);
$pdf->SetFont('Arial','B',12);
$pdf->Cell(30, $yvf , 'Quantité',0,0,'C',0);
$pdf->SetXY(150,$yvf);
$pdf->SetFont('Arial','B',12);
$pdf->Cell(30, $yvf , 'Valeur de stock',0,0,'C',0);
$pdf->Line(10, 48, 190, 48);
$yvf = 35;
for($i=0; $i<count($tbCasier); $i++){
$pdf->SetXY(10,$yvf);
$pdf->SetFont('Arial','',10);
$pdf->Cell(5, $yvf , $tbCasier[$i]["ref_etagere"],0,0,'L',0);
$tbDisque = rechercheDisqueCasier($tbCasier[$i]["stock_id"]);
$total = 0;
for($j=0; $j<count($tbDisque); $j++){
$pdf->SetXY(50,$yvf);
$pdf->SetFont('Arial','',10);
$pdf->Cell(30, $yvf , $tbDisque[$j]["ref_label"], 0,0,'C',0);
$pdf->SetXY(100,$yvf);
$pdf->SetFont('Arial','',10);
$pdf->Cell(30, $yvf , $tbDisque[$j]["qte"],0,0,'C',0);
$pdf->SetXY(150,$yvf);
$pdf->SetFont('Arial','',10);
$pdf->Cell(30, $yvf , ($tbDisque[$j]["prix_ha"] * $tbDisque[$j]["qte"]).' ',0,0,'C',0);
$total = $total + ($tbDisque[$j]["prix_ha"] * $tbDisque[$j]["qte"]);
$yvf = $yvf + 3;
}
$dispo = rechercheQteDispo($tbCasier[$i]["stock_id"]);
$pdf->SetXY(50,$yvf);
$pdf->SetFont('Arial','',10);
$pdf->Cell(30, $yvf , "Free space", 0,0,'C',0);
$pdf->SetXY(100,$yvf);
$pdf->SetFont('Arial','',10);
$pdf->Cell(30, $yvf , $dispo,0,0,'C',0);
$pdf->SetXY(150,$yvf);
$pdf->SetFont('Arial','',10);
$pdf->Cell(30, $yvf , '0 ',0,0,'C',0);
$yvf = $yvf + 3;
$pdf->SetXY(150,$yvf);
$pdf->SetFont('Arial','',10);
$pdf->Cell(30, $yvf , 'Total : '.$total.' ',0,0,'C',0);
$nb = count($tbDisque);
$pdf->Line(10, $yvf+2, 190, $yvf+2);
$yvf = $yvf + 5;
} |
Partager