/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.fp.frontend.controller.pcustomer;


import com.fp.frontend.controller.armas.solicitud.SolicitudController;
import com.fp.frontend.controller.armas.solicitud.SolicitudTramiteController;
import com.fp.frontend.controller.armas.solicitud.TarmTramiteController;
import com.fp.frontend.controller.pcustomer.PersonAddressController;
import com.fp.frontend.controller.pcustomer.PersonDetailController;
import com.fp.frontend.controller.pcustomer.PersonPhoneController;
import com.fp.frontend.controller.pgeneral.gene.CatalogDetailController;
import com.fp.frontend.controller.pgeneral.gene.CityController;
import com.fp.frontend.controller.pgeneral.gene.ParametersController;

import com.fp.persistence.parmas.param.TarmTramite;
import com.fp.persistence.parmas.soli.TarmSolicitud;
import com.fp.persistence.parmas.soli.TarmSolicitudTramite;
import com.fp.persistence.pcustomer.gene.TcustPersonAddress;
import com.fp.persistence.pcustomer.gene.TcustPersonDetail;
import com.fp.persistence.pcustomer.gene.TcustPersonPhone;
import com.fp.persistence.pgeneral.gene.TgeneCatalogDetail;
import com.fp.persistence.pgeneral.gene.TgeneCity;
import com.fp.persistence.pgeneral.gene.TgeneParameters;

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.ViewScoped;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.persistence.Query;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import com.fp.frontend.controller.AbstractController;
import com.fp.persistence.parmas.soli.TarmArmaPruebas;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.openide.util.Exceptions;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

/**
 *
 * @author developer2
 */
@SuppressWarnings("serial")
@ManagedBean
@ViewScoped
public class FacturaController {
    /**
     * Controlador que maneja los datos de generacion ultima vez del reporte
     */
    private static final long serialVersionUID = 8843091476010012919L;
    
    @ManagedProperty(value = "#{parametersController}")
    private ParametersController parametersController;

    private TgeneParameters sequence;
    private EntityManagerFactory emf;

    
    @PostConstruct
    public void postConstruct(){
        try {
            this.parametersController = new ParametersController();
            //this.crearManager();
        } catch (Exception ex) {
            Exceptions.printStackTrace(ex);
        }
   
    }


    

}
