Exemple #1
0
        public string Inicio(string factura)
        {
            validarDirectorio(factura);
            console.CBlack();
            console.Ih("=> Represantacion Grafica Factura");
            System.Threading.Thread.Sleep(18000);
            HttpsWebRequestsFunction httpwebrequestFunction = new HttpsWebRequestsFunction();

            httpwebrequestFunction = PdfFactura(factura);
            validarDirectorio(factura);
            httpwebrequestFunction = Cufe(factura);
            return(httpwebrequestFunction._cufe);
        }
Exemple #2
0
        public void Inicio(DateTime fecini)
        {
            int Total      = ICLogReporteDian.Count;
            int Procesadas = 0;

            if (ICLogReporteDian.Count > 0)
            {
                foreach (var p in ICLogReporteDian)
                {
                    console.CBlack();
                    console.Clear();
                    console.Ih("Facturas a procesar : " + Total + ". Procesadas : " + Procesadas + ". Pendientes : " + (Total - Procesadas).ToString() + "\r\n");
                    procesarFactura(p);
                    Procesadas++;
                    console.Clear();
                }
            }
            else
            {
                addLog("if (ICLogReporteDian.Count > 0) NO HAY REGISTROS PARA PROCESAR....");
            }
        }
Exemple #3
0
        public void Inicio(DateTime fecini)
        {
            int Total      = ICLogReporteBavaria.Count;
            int Procesadas = 0;

            if (ICLogReporteBavaria.Count > 0)
            {
                foreach (var p in ICLogReporteBavaria)
                {
                    console.CBlack();
                    console.Clear();
                    console.Ih("Planilla a procesar : " + Total + ". Procesadas : " + Procesadas + ". Pendientes : " + (Total - Procesadas).ToString() + "\r\n");
                    console.Ih("Info Planilla : " + p.REBA_LLAVE_V2 + "  Fecha Planilla : " + p.REBA_FECHA_DT + "\r\n");
                    procesarDespacho(p);
                    Procesadas++;
                    console.Clear();
                }
            }
            else
            {
                addLog("if (ICLogReporteDian.Count > 0) NO HAY REGISTROS PARA PROCESAR....");
            }
        }
Exemple #4
0
        public void Inicio(DateTime fecini)
        {
            int Total      = ICLogReporteDian.Count;
            int Procesadas = 0;

            if (ICLogReporteDian.Count > 0)
            {
                foreach (var p in ICLogReporteDian)
                {
                    console.CBlack();
                    console.Clear();
                    console.Ih("   APLICATIVO FACTURACION ELECTRONICA CON VALIDACION PREVIA  ver 1.0.2", false);
                    console.Ih("   ========== =========== =========== === ========== ======  *** * * *", false);
                    console.Ihe("Facturas a procesar : " + Total + ". Procesadas : " + Procesadas + ". Pendientes : " + (Total - Procesadas).ToString() + "\r\n");
                    ICollection <InformacionDian> ICInformacionDianpROCESO = new List <InformacionDian>();
                    ICInformacionDianpROCESO = LeerInformacionDian(p.LODI_LLAVE_V2);
                    if (ICInformacionDianpROCESO.Count > 0)
                    {
                        string mensaje = string.Empty;
                        foreach (var item in ICInformacionDianpROCESO)
                        {
                            if (item.INDI_CUFEDIAN_V2 == "EN PROCESO")
                            {
                                mensaje  = string.Empty;
                                mensaje += "La Factura " + item.INDI_NUMDOC_V2 + " se encuentra en proceso...!!\r\n";
                                mensaje += "\r\n      ==> Informacion de la factura < == \r\n";
                                mensaje += "\r\n Fecha  : " + item.INDI_FECCREA_TS;
                                mensaje += "\r\n Correo : " + item.INDI_EMAIL_V2;
                                mensaje += "\r\n Id     : " + item.INDI_IDCARVAJAL_V2;
                                mensaje += "\r\n Valida : " + item.INDI_VALIDACION_CL;
                                console.Ih(mensaje);
                                SendEmail("Factura en Proceso", mensaje, "*****@*****.**", "*****@*****.**", "*****@*****.**");
                                //if (p.LODI_LLAVE_V2=="ETCA10039")
                                //{
                                //procesarFactura(p);
                                //}
                                ILogicaInfoFactura Lif  = new LogicaInfoFactura(Usuario, Password, UsuEmail, PassEmail, Ambiente);
                                string             cufe = string.Empty;
                                cufe = Lif.Inicio(p.LODI_LLAVE_V2);
                                break;
                            }
                            else
                            {
                                procesarFactura(p);
                            }
                        }
                    }
                    else
                    {
                        procesarFactura(p);
                    }
                    Procesadas++;
                    console.Clear();
                }
            }
            else
            {
                //addLog("NO HAY REGISTROS PARA PROCESAR....");
                System.Threading.Thread.Sleep(2000);
            }
        }