D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
rosario
/
adm
/
app
/
gre
/
Views
/
Ruptura
/
Filename :
VieRupMarcaCompImprime.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\ModRupMarcaCompLer(); $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',11 ); $pdf->SetX(15); // $pdf->Image(URLADM . 'assets/imagens/logo_login/'.$_SESSION['id_user'].'/logo_header.png',20,13,20,0,'PNG'); $pdf->Cell(65,10, 'MARCAS DO COMPRADOR ' ,'1',0,'C'); $pdf->Cell(50,10,utf8_decode($data_imp.' hs'),1,1,'C'); $pdf->SetX(15); $pdf->SetFont('arial','BI',11); $pdf->Cell(30,7,'Comprador: ','1',0,'L'); $pdf->SetFont('arial','',11); $pdf->Cell(85,7, ' '.$comp_id.' - '.utf8_decode($comp_nome) ,'1',1,'L'); $pdf->SetX(15); $pdf->SetFont('arial','B',11); $pdf->Cell(35,6, utf8_decode('Cod. da Marca'),'1',0,'C'); $pdf->Cell(80,6, utf8_decode('Descrição'),'1',1,'C'); $cont_linha = 0; } $pdf->SetFont('arial','',11); $pdf->SetX(15); $pdf->Cell(35,6, number_format($marca_id,0,',','.'),'1',0,'R'); $pdf->Cell(80,6, ' ' . utf8_decode($marca_nome),'1',1,'L'); $cont_linha = $cont_linha + 1; $cont_reg = $cont_reg + 1; } $pdf->SetFont('arial','B',10); $pdf->SetX(15); $pdf->SetFont('arial','I',10); $pdf->Cell(115,6, 'Total de Marcas... '.number_format($cont_reg,0,',','.'),'0',0,'L'); //$pdf->Ln(8); $pdf->Output(); //ob_end_flush(); ?>