コード例 #1
0
        private void buttonrealizar_Click(object sender, EventArgs e)
        {
            var FacturasPendientesdeCierre = Cargadatos();

            if (FacturasPendientesdeCierre.Count == 0)
            {
                errorBar1.Mensaje = "No Cierres pendientes";
                errorBar1.Status  = errorType.Info;
                return;
            }
            IPrinterFIOperaciones IP = new ImpresionBematech();
            var proximoreporte       = string.Format("{0:0000000}", Convert.ToInt16(this.label8.Text) + 1);

            if (tipo == Cierreenum.Z)
            {
                fm.Cerrar(FacturasManager.Cierreenum.Z, proximoreporte);
                IP.LecturaZ();
            }
            else
            {
                fm.Cerrar(FacturasManager.Cierreenum.X, proximoreporte);
                IP.LecturaX();
            }



            ProducirReporte();
        }
コード例 #2
0
        private void CierreZFrm_Load(object sender, EventArgs e)
        {
            IPrinterFIOperaciones IP = new ImpresionBematech();
            var aux     = IP.NumerodeCierresZ().Replace("\0", "");
            var numeroc = Convert.ToInt16(aux);

            label8.Text = string.Format("{0:0000000}", numeroc);
            string numero = "      ";


            fechalabel.Text = DateTime.Today.ToShortDateString();

            Totales(ref total);
            ParametrosManager p = new ParametrosManager();
            Global            g = new Global();

            Seriallabel.Text = g.GetParametros().Serial;
            //if (this.txttotal.Text == "0")
            //return;
            DialogResult resp = MessageBox.Show("Esta seguro de efectuar el Cierre Z?", "Confirmación", MessageBoxButtons.YesNo);

            if (resp == DialogResult.No)
            {
                return;
            }
            txtNeto.Text      = string.Format("{0:0.00}", total[1].ToString());
            txtxIva.Text      = string.Format("{0:0.00}", total[2].ToString());
            txttotal.Text     = string.Format("{0:0.00}", total[3].ToString());
            txtxnrofacts.Text = string.Format("{0:0.00}", total[0].ToString());
            txtApertura.Text  = string.Format("{0:0.00}", total[6].ToString());

            desdelabel.Text = string.Format("{0:000000}", total[4]);
            hastalabel.Text = string.Format("{0:000000}", total[5]);
        }
コード例 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            AperturasManager ap = new AperturasManager();
            Global           g  = new Global();

            ap.InsertClase(new AperturaDTO {
                Fecha = DateTime.Now, Monto = Convert.ToDecimal(textoBoxp1.Text), Turno = Convert.ToInt16(comboBox1.SelectedValue), userId = g.Usuario().Iduser, cerrada = false, Idapertura = 0
            });
            IPrinterFIOperaciones IP = new ImpresionBematech();

            IP.AbrirCaja(textoBoxp1.Text);
            this.Close();
        }
コード例 #4
0
ファイル: Botonera.cs プロジェクト: hugoaraujor/GoldenAures
        private void WorkerObj_DoWork(object sender, DoWorkEventArgs e)
        {
            IPrinterFIOperaciones IP = new ImpresionBematech();


            int ACK = 0;
            int ST1 = 0;
            int ST2 = 0;

            var st = IP.Facturar(TicketDoc);

            TicketDoc.totales.factura = st;
            e.Result = st;
        }
コード例 #5
0
ファイル: Botonera.cs プロジェクト: hugoaraujor/GoldenAures
        private void button8_Click(object sender, EventArgs e)
        {
            if (TicketDoc.totales.mesa.Siglas != "0")
            {
                grabaItemsCompra();
                TicketDoc.lista = TicketManager.GetList(TicketDoc.totales.mesa.Siglas);
                GetSuma();
                refreshView();
            }
            if (TicketDoc.totales.mesa.Siglas != "0" || TicketDoc.totales.mesa.Siglas.Contains("LL"))
            {
                TicketDoc.totales.servicio = calcularservicio();
            }

            var paga = GetSuma();

            eliminarBorrados();

            IPrinterFIOperaciones IP = new ImpresionBematech();

            if (IP.estaConectada() == 0)
            {
                MessageBox.Show("Impresora No Conectada");
                return;
            }
            TotalForm TF = new TotalForm(TicketDoc.totales.mesa, paga, TicketDoc.totales.servicio, Ivatipo.General);

            TF.impresoraconectada = 0;
            TF.ShowDialog();
            TicketDoc.totales = TF.TotalesPago;

            if (TF.TotalesPago.resta <= 0.03M && TF.impresoraconectada == 1)
            {            // cambiar el printer antes de llamar operacion para trabajar con otro printer ppoe ejemplo
                         //	IPrinterFIOperaciones IP = new ImpresionBixolon();
                         //Doble Abstract Factory Printer y Documento
                         //workerObj.RunWorkerAsync();
                auxilio();
            }

            TF.Dispose();
            TF = null;
        }
コード例 #6
0
        private void ProducirReporte()
        {
            IPrinterFIOperaciones IP = new ImpresionBematech();

            reporte.Add(("REPORTE CIERRE" + "  " + tipo.ToString()).PadRight(47) + "\n\n");
            reporte.Add("APERTURA".PadRight(47) + "\n\n");
            reporte.Add("01 Efectivo".PadRight(26) + this.txtApertura.Text.PadLeft(21) + "\n\n");                   reporte.Add("Formas de Pago".PadRight(47) + "\n\n");
            reporte.Add("01 Efectivo".PadRight(26) + this.textoBoxp1.Text.PadLeft(21) + "\n");
            reporte.Add("02 Debito".PadRight(26) + this.textoBoxp2.Text.PadLeft(21) + "\n");
            reporte.Add("03 Crédito".PadRight(26) + this.textoBoxp3.Text.PadLeft(21) + "\n");
            reporte.Add("04 Cesta Ticket".PadRight(26) + this.textoBoxp4.Text.PadLeft(21) + "\n");
            reporte.Add("05 Cheque".PadRight(26) + this.textoBoxp5.Text.PadLeft(21) + "\n");
            reporte.Add("06 Alimentación".PadRight(26) + this.textoBoxp6.Text.PadLeft(21) + "\n");
            reporte.Add("TOTAL PAGOS ".PadRight(26) + this.label19.Text.PadLeft(21) + "\n\n");
            reporte.Add("Facturación".PadRight(47) + "\n");
            reporte.Add("TOTAL NETO".PadRight(26) + this.txtNeto.Text.PadLeft(21) + "\n");
            reporte.Add("TRIBUTADO".PadRight(26) + this.txtxIva.Text.PadLeft(21) + "\n");
            reporte.Add("TOTALES FACTURACION".PadRight(26) + this.txttotal.Text.PadLeft(21) + "\n");
            reporte.Add("Facturas".PadRight(26) + this.txtxnrofacts.Text.PadLeft(21) + "\n");
            reporte.Add("Intervalo".PadRight(26) + (this.desdelabel.Text + "-" + this.hastalabel.Text).PadLeft(21) + "\n");
            IP.ImprimeReporteGerencial(reporte);
        }
コード例 #7
0
ファイル: Botonera.cs プロジェクト: hugoaraujor/GoldenAures
        private void auxilio()
        {
            IPrinterFIOperaciones IP = new ImpresionBematech();
            var st = IP.Facturar(TicketDoc);

            TicketDoc.totales.factura = st;

            if (!(st == ""))
            {
                Console.WriteLine(st);
                DocumentManager DocM = new DocumentManager(TicketDoc);
                DocM.Guardar(st);
                if (st != "")
                {
                    actualiza();
                }
            }
            else
            {
                IP.isAnulada();
            }
            g.store.SaveFactura(st);
            nuevoTicket();
        }
コード例 #8
0
ファイル: MainFrm.cs プロジェクト: hugoaraujor/GoldenAures
      private void cierreXToolStripMenuItem_Click(object sender, EventArgs e)
      {
          IPrinterFIOperaciones IP = new ImpresionBematech();

          IP.LecturaX();
      }