D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
rosario
/
adm
/
app
/
gre
/
Views
/
Ruptura
/
Filename :
VieRupCompProdImprime.php
back
Copy
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); ob_start(); $path = getcwd(); //VAR_DUMP(URLFPDF); $Dados = $_GET; //var_dump($Dados); //$filial_nome = $Dados['filial_nome']; //$gre_filial_id = $Dados['gre_filial_id']; $Lanc = new \App\gre\Models\ModRupCompProdLer(); $arr = $Lanc->lerLanc($Dados); $num_linhas = 40; $cont_linha = 99999; $cont_reg = 0; $total_dia = 0; //var_dump($arr); //REQUIRE($_SERVER['DOCUMENT_ROOT'].'idoso/adm/app/gre/Views/include/fpdf/fpdf.php'); $data_imp = date("d/m/Y H:i:s"); //REQUIRE($_SERVER['DOCUMENT_ROOT'].URLFPDF.'app/gre/Views/include/fpdf/fpdf.php'); REQUIRE($_SERVER['DOCUMENT_ROOT'].'/rosario/adm/app/gre/Views/include/fpdf/fpdf.php'); define('FPDF_FONTPATH','font/'); $pdf = new FPDF(); $pdf->SetAutoPageBreak(0); foreach ($arr as $lcto) { extract($lcto); if ($cont_linha > $num_linhas) { $pdf->AddPage('P','A4'); $pdf->SetFont('Arial','B',10 ); $pdf->SetX(5); // $pdf->Image(URLADM . 'assets/imagens/logo_login/'.$_SESSION['id_user'].'/logo_header.png',20,13,20,0,'PNG'); $pdf->Cell(153,10, 'FALTAS POR COMPRADOR ' ,'1',0,'C'); $pdf->Cell(50,10,utf8_decode($data_imp.' hs'),1,1,'C'); $pdf->SetX(5); $pdf->SetFont('arial','BI',10); $pdf->Cell(30,7,'Comprador: ','1',0,'L'); $pdf->SetFont('arial','',10); $pdf->Cell(138,7, ' '.utf8_decode($comp_nome) ,'1',0,'L'); $pdf->SetFont('arial','BI',10); $pdf->Cell(15,7,'Curva: ','1',0,'L'); $pdf->SetFont('arial','',10); $pdf->Cell(20,7, ' '.utf8_decode($curva_sel) ,'1',1,'L'); $pdf->SetX(5); $pdf->SetFont('arial','B',8); $pdf->Cell(15,6, utf8_decode('Cod.'),'1',0,'C'); $pdf->Cell(80,6, utf8_decode('Descrição'),'1',0,'C'); $pdf->Cell(20,6, utf8_decode('Inclusão'),'1',0,'C'); $pdf->Cell(23,6, utf8_decode('Qtde Filiais'),'1',0,'C'); $pdf->Cell(15,6, utf8_decode('Est. CD'),'1',0,'C'); $pdf->Cell(25,6, utf8_decode('Venda/Dia'),'1',0,'C'); $pdf->Cell(25,6, utf8_decode('Falta/Dia'),'1',1,'C'); $cont_linha = 0; } $pdf->SetFont('arial','',8); $pdf->SetX(5); $pdf->Cell(15,6, number_format($produto_id,0,',','.'),'1',0,'R'); $pdf->Cell(80,6, ' ' . utf8_decode($nome),'1',0,'L'); $pdf->Cell(20,6, ' ' . utf8_decode($data_inclusao),'1',0,'C'); $pdf->Cell(23,6, ' ' . $qtde_filiais,'1',0,'C'); $pdf->Cell(15,6, ' ' . number_format($estoque_cd,0,',','.'),'1',0,'C'); $pdf->Cell(25,6, ' ' . number_format($qtde_dia,4,',','.'),'1',0,'C'); $pdf->Cell(25,6, ' ' . 'R$ '.number_format($valor_dia,2,',','.'),'1',1,'R'); $cont_linha = $cont_linha + 1; $cont_reg = $cont_reg + 1; $total_dia += $valor_dia; } $pdf->SetFont('arial','B',10); $pdf->SetX(5); $pdf->Cell(15,6, ' ','1',0,'R'); $pdf->Cell(80,6, ' ','1',0,'L'); $pdf->Cell(20,6, ' ','1',0,'C'); $pdf->Cell(23,6, ' ','1',0,'C'); $pdf->Cell(15,6, ' ','1',0,'C'); $pdf->Cell(25,6, ' ' . 'TOTAL','1',0,'C'); $pdf->Cell(25,6, ' ' . 'R$ '.number_format($total_dia,2,',','.'),'1',1,'R'); $pdf->SetX(5); $pdf->SetFont('arial','I',10); $pdf->Cell(100,6, 'Total de Registros... '.number_format($cont_reg,0,',','.'),'0',0,'L'); //$pdf->Ln(8); $pdf->Output(); //ob_end_flush(); ?>