Exemplo n.º 1
0
        public frmDevolucion(VntOperacion _one)
        {
            InitializeComponent();

            _listaOperaciones = srvOperacion.GetList("11E7C39A0EACD9A08F1A00E04C6F7E24");

            oneDocumentoOrigen = _one;


            //COTIZACION
            CnfCotizacionClient         srvCotizacion = new CnfCotizacionClient();
            List <CnfCotizacionDetalle> _cotizacion   = srvCotizacion.GetListDetail(oneDocumentoOrigen.id_cotizacion);

            foreach (CnfCotizacionDetalle item in _cotizacion)
            {
                if (item.id_moneda == Globals.logEmpresa.moneda_defecto)
                {
                    factor = item.valor;
                }
            }

            //HEADER
            lblTitle.Text    = "Devolución: " + oneDocumentoOrigen.tipo_documento_nombre;
            lblSubTitle.Text = oneDocumentoOrigen.nro_control;

            lblClienteNombre.Text = oneDocumentoOrigen.cliente_nombre;
            lblClienteRif.Text    = oneDocumentoOrigen.cliente_rif;

            InicializarDevolucion();

            bList              = new BindingList <App.InvMovimientoService.InvMovimiento>(_listaDetalle);
            bs.DataSource      = bList;
            dgvList.DataSource = bs;
            Totalizar();

            lblProgreso.Visible = false;

            this.KeyPreview = true;
            this.KeyDown   +=
                new KeyEventHandler(frmPuntoVenta_KeyDown);
        }
        private void btnPrint_Click(object sender, EventArgs e)
        {
            //ONE
            VntOperacion one = selectedOperacion;
            //DETAIL
            BindingList <App.InvMovimientoService.InvMovimiento> bList   = new BindingList <App.InvMovimientoService.InvMovimiento>(srvMovimiento.GetList(one.id));
            List <App.VntOperacionService.InvMovimiento>         _detail = Globals.ConvertirDetalle(bList);
            //COTIZACION
            double _factor = 1;
            CnfCotizacionClient         srvCotizacion = new CnfCotizacionClient();
            List <CnfCotizacionDetalle> _cotizacion   = srvCotizacion.GetListDetail(one.id_cotizacion);

            foreach (CnfCotizacionDetalle item in _cotizacion)
            {
                if (item.id_moneda == Globals.logEmpresa.moneda_defecto)
                {
                    _factor = item.valor;
                }
            }

            //PRINT
            Globals.ImprimirTicketVenta(one, _detail, _factor);
        }