Ejemplo n.º 1
0
        public void CierreX()
        {
            if (fiscal.VerOpcImpFis(_codImpFis, _codCompTipo, _codCliTipo))
            {
                byte Puerto    = byte.Parse(Variables.GetValue("Fiscal.Puerto").ToString());
                int  Velocidad = int.Parse(Variables.GetValue("Fiscal.Velocidad").ToString());
                if (fiscal.AbrirImpFis(Puerto, Velocidad))
                {
                    ReporteFiscal rf = new ReporteFiscal();
                    //bool proceso = false;
                    fiscal.Reporte('X', rf);
                }
            }

            /*if (rdBttnReporteX.Checked)
             * {
             *      if (fiscal.Reporte('X',rf)) {proceso = true;}
             * }
             * if (rdBttnReporteZ.Checked)
             * {
             *      if (fiscal.Reporte('Z',rf)) {proceso = true;};
             * }*/

            /*listBox2.Items.Add(Fiscal.Mensaje);
             * if (proceso)
             * {
             *      listBox2.Items.Add("Nro. de reporte: " + rf.NroReporte);
             *      listBox2.Items.Add("Ult. comp. A: " + rf.UltA);
             *      listBox2.Items.Add("Ult. comp. B: " + rf.UltB);
             *      listBox2.Items.Add("Total ventas: " + rf.MontoVentas.ToString());
             *      listBox2.Items.Add("Total IVA: " + rf.MontoIVA.ToString());
             * }*/
        }
Ejemplo n.º 2
0
 public void CierreZ()
 {
     if (fiscal.VerOpcImpFis(_codImpFis, _codCompTipo, _codCliTipo))
     {
         byte Puerto    = byte.Parse(Variables.GetValue("Fiscal.Puerto").ToString());
         int  Velocidad = int.Parse(Variables.GetValue("Fiscal.Velocidad").ToString());
         if (fiscal.AbrirImpFis(Puerto, Velocidad))
         {
             ReporteFiscal rf = new ReporteFiscal();
             //bool proceso = false;
             fiscal.Reporte('Z', rf);
         }
     }
 }
Ejemplo n.º 3
0
        public void Commit()
        {
            if (_allowSave)
            {
                tsa_CierresFiscalesDataset.tsa_CierresFiscalesRow row = businessrules.tsa_CierresFiscales.NewRow();

                ReporteFiscal reporte = _iFiscal.ReporteFiscal;
                Console.WriteLine(reporte.NroReporte);
                row.Fecha                     = reporte.Fecha;
                row.Sucursal                  = reporte.Sucursal;
                row.Tipo                      = _tipo.ToString();
                row.Numero                    = reporte.NroReporte;
                row.Comprobantes_Neto         = reporte.MontoVentas - reporte.MontoIVA - reporte.MontoIVANi - reporte.MontoPercep;
                row.Comprobantes_IVA          = reporte.MontoIVA;
                row.Comprobantes_II           = reporte.MontoII;
                row.Comprobantes_NoGravados   = reporte.MontoIVANi;
                row.Comprobantes_Percepciones = reporte.MontoPercep;
                row.Comprobantes_Emitidos     = Convert.ToInt32(reporte.NroEmitidosDF);
                row.Comprobantes_Cancelados   = Convert.ToInt32(reporte.NroCanceladosDF);
                row.NC_Neto                   = reporte.MontoNC - reporte.MontoIVANC - reporte.MontoIVANiNC;
                row.NC_IVA                    = reporte.MontoIVANC;
                row.NC_II                     = reporte.MontoIINC;
                row.NC_NoGravados             = reporte.MontoIVANi;
                row.NC_Percepciones           = reporte.MontoPercepNC;
                row.NC_Emitidos               = 0;
                row.NC_Cancelados             = 0;
                row.UltimoComprobanteA        = Convert.ToInt32(reporte.UltA);
                row.UltimoComprobanteB        = Convert.ToInt32(reporte.UltB);
                row.UltimaNCA                 = Convert.ToInt32(reporte.UltNCA);
                row.UltimaNCB                 = Convert.ToInt32(reporte.UltNCB);
                row.UltimoRemito              = Convert.ToInt32(reporte.UltRemito);
                row.Remitos_Emitidos          = 0;
                row.DocumentosNF_Emitidos     = Convert.ToInt32(reporte.NroEmitidosDNF);
                row.DocumentosNFH_Emitidos    = Convert.ToInt32(reporte.NroEmitidosDNFH);
                row.IdResponsable             = Security.IdPersona;;
                row.Observacion               = "";
                _data.tsa_CierresFiscales.LoadDataRow(((DataRow)row).ItemArray, false);
            }
        }
Ejemplo n.º 4
0
        private void PrinterFiscal()
        {
            _iFiscal = new InterfaceFiscal(this._processParent, this._taskName);
            _iFiscal.OnChangeEstadoFiscal += new EventHandler(this.ListenerChangesInterfaceFiscal);

            switch (_taskName)
            {
            case "EmitirCierreX": _tipo = 'X';
                break;

            case "EmitirCierreZ": _tipo = 'Z';
                break;
            }


            _impresionExitosa = _iFiscal.Cierre(_tipo);

            if (_impresionExitosa)
            {
                ReporteFiscal reporte = _iFiscal.ReporteFiscal;
                Console.WriteLine(reporte.NroReporte);
                _allowSave = true;
            }
        }