D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
rosario
/
adm
/
app
/
gre
/
Views
/
Venda
/
Filename :
VieVendaSemestreImprime.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\ModVendaSemestreLer(); $arr = $Lanc->lerLanc($Dados); $num_linhas = 40; $cont_linha = 99999; $cont_reg = 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 == 99999){ $datai1 = $data1; $datai2 = $data2; $datai3 = $data3; $datai4 = $data4; $datai5 = $data5; $datai6 = $data6; } 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, 'VENDA SEMESTRE ' ,'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(20,7,'Filial: ','1',0,'L'); $pdf->SetFont('arial','',10); $pdf->Cell(183,7, ' '.utf8_decode($fili_nome) ,'1',1,'L'); $pdf->SetX(5); $pdf->SetFont('arial','BI',10); $pdf->Cell(20,7,utf8_decode('Seção: '),'1',0,'L'); $pdf->SetFont('arial','',10); $pdf->Cell(84,7, ' '.utf8_decode($secao_nome) ,'1',0,'L'); $pdf->SetFont('arial','BI',10); $pdf->Cell(15,7,utf8_decode('Grupo: '),'1',0,'L'); $pdf->SetFont('arial','',10); $pdf->Cell(84,7, ' '.utf8_decode($grupo_nome) ,'1',1,'L'); $pdf->SetX(5); $pdf->SetFont('arial','BI',10); $pdf->Cell(20,7,utf8_decode('Subgrupo: '),'1',0,'L'); $pdf->SetFont('arial','',10); $pdf->Cell(84,7, ' '.utf8_decode($subgrupo_nome) ,'1',0,'L'); $pdf->SetFont('arial','BI',10); $pdf->Cell(15,7,utf8_decode('Classe: '),'1',0,'L'); $pdf->SetFont('arial','',10); $pdf->Cell(84,7, ' '.utf8_decode($classe_nome) ,'1',1,'L'); $pdf->SetX(5); $pdf->SetFont('arial','BI',10); $pdf->Cell(104,7,utf8_decode('Qtde Limite: ').$qtde_limite,'1',0,'L'); $pdf->SetFont('arial','B',10); $pdf->Cell(99,7,utf8_decode('Exclui Ultimos 3 Meses?: ').$exclui,'1',1,'L'); $pdf->SetX(5); $pdf->SetFont('arial','B',7); $pdf->Cell(15,6, utf8_decode('Cod.'),'1',0,'C'); $pdf->Cell(80,6, utf8_decode('Descrição'),'1',0,'C'); $pdf->Cell(12,6, $datai1,'1',0,'C'); $pdf->Cell(12,6, $datai2,'1',0,'C'); $pdf->Cell(12,6, $datai3,'1',0,'C'); $pdf->Cell(12,6, $datai4,'1',0,'C'); $pdf->Cell(12,6, $datai5,'1',0,'C'); $pdf->Cell(12,6, $datai6,'1',0,'C'); $pdf->Cell(12,6, utf8_decode('Mês'),'1',0,'C'); $pdf->Cell(12,6, 'Total','1',0,'C'); $pdf->Cell(12,6, utf8_decode('Média'),'1',1,'C'); $cont_linha = 0; } $pdf->SetFont('arial','',7); $pdf->SetX(5); $pdf->Cell(15,6, number_format($sem_produto_id,0,',','.'),'1',0,'R'); $pdf->Cell(80,6, ' ' . utf8_decode($prod_nome),'1',0,'L'); $pdf->Cell(12,6, ' ' . utf8_decode($sem_1),'1',0,'C'); $pdf->Cell(12,6, ' ' . utf8_decode($sem_2),'1',0,'C'); $pdf->Cell(12,6, ' ' . utf8_decode($sem_3),'1',0,'C'); $pdf->Cell(12,6, ' ' . utf8_decode($sem_4),'1',0,'C'); $pdf->Cell(12,6, ' ' . utf8_decode($sem_5),'1',0,'C'); $pdf->Cell(12,6, ' ' . utf8_decode($sem_6),'1',0,'C'); $pdf->Cell(12,6, ' ' . utf8_decode($sem_curso),'1',0,'C'); $pdf->Cell(12,6, ' ' . ($sem_1 + $sem_2 + $sem_3 + $sem_4 + $sem_5 + $sem_6 + $sem_curso),'1',0,'C'); $pdf->Cell(12,6, ' ' . number_format(round(($sem_1 + $sem_2 + $sem_3 + $sem_4 + $sem_5 + $sem_6 + $sem_curso)/$dias,4),4,',','.'),'1',1,'C'); $cont_linha = $cont_linha + 1; $cont_reg = $cont_reg + 1; } $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(); ?>