<?php
include_once("../../../php/sessionStart.php"); 
include_once("../../../php/db/dbExec.php");
include_once('../../../php/functions.php');
include_once("../../../php/fpdf/functions.php");
include_once('../../../php/timezone.php');
include_once('../../../php/maxExecTime.php');
include_once('../ws/COFIDI/wsExec.php');

$empNom=utf8_decode($_SESSION["empNom"]);
$empNomc=utf8_decode($_SESSION["empNomc"]);
$empDir=utf8_decode($_SESSION["empDir"]);
$empNit=str_replace('-','',$_SESSION["empNit"]);

class generatePDF extends PDF_MC_Table {
    function Header() {
    }
    
    function Footer() { 
    }
}

$func = new functions();

# GENERAR PDF
$pdf = new generatePDF("P", "cm", "Letter");

$tipoNomFEL = $_SESSION["printFacturas"]["tipoNomFEL"];
$tipoFEL = $_SESSION["printFacturas"]["tipoFEL"];
$nom = utf8_decode($_SESSION["printFacturas"]["nom"]);
$nit = $_SESSION["printFacturas"]["nit"];
$dir = utf8_decode($_SESSION["printFacturas"]["dir"]);
$fec = $_SESSION["printFacturas"]["fec"];
$tcam = $_SESSION["printFacturas"]["tcam"];
$tot = $_SESSION["printFacturas"]["tot"];
$totLetras = $_SESSION["printFacturas"]["totLetras"];
$detalle = json_decode($_SESSION["printFacturas"]["det"], true);

for ($i=0; $i < count($detalle); $i++) { 
    $detalle[$i]["descrip"]=utf8_decode($detalle[$i]["descrip"]);
}

include('../felPrint/FEL.php');

$pdf->Output('','I');
$db->close();
?>