<?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"]);

$jsonFac = (isset($_GET['printFacturas'])) ? ($_GET['printFacturas']) : ($_SESSION['printFacturas']);

$arrayError=array();

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

$db = new dbExec();
$func = new functions();

# GENERAR PDF
$pdf = new generatePDF("P", "cm", "Letter");
foreach ($jsonFac as $rec) {
    $tipoNomFEL = $rec["tipoNomFEL"];
    $tipoFEL = $rec["tipoFEL"];
    $nom = utf8_decode($rec["nom"]);
    $nit = $rec["nit"];
    $dir = utf8_decode($rec["dir"]);
    $fec = $rec["fec"];
    $tcam = $rec["tcam"];
    $tot = $rec["tot"];
    $totLetras = $rec["totLetras"];
    $detalle = $rec["det"];

    include('../felPrint/FEL.php');
}
$pdf->Output('','I');

$db->close();
?>