public ValoresController GetValoresController(Valor valor)
        {
            ValoresController valorescontroller = new ValoresController(valor, 0, valor.Monto, this);

            //valorescontroller.ReglasDeValidacionAuxiliares = _recargos.ReglasDeValidacion;
            return(valorescontroller);
        }
Пример #2
0
        public ValoresController GetValoresController()
        {
            Valor             valor             = _currentFormaDePago.Valor;
            ValoresController valorescontroller = new ValoresController(valor, _currentFormaDePago.Recargo, this);

            valorescontroller.ReglasDeValidacionAuxiliares = _recargos.ReglasDeValidacion;
            return(valorescontroller);
        }
Пример #3
0
        public ValoresController GetValoresController(string IdTDCompTesoreria, string IdMoneda, bool Agrupado, decimal ValorDefault, decimal PorcentajeRecargo, string IdValor, ITaskController taskController)
        {
            Valor             valor             = _currentFormaDePago.Valor;
            ValoresController valorescontroller = new ValoresController(IdTDCompTesoreria, IdMoneda, Agrupado, ValorDefault, PorcentajeRecargo, IdValor, this, this._recargos.IdCuenta);

            valorescontroller.ReglasDeValidacionAuxiliares = _recargos.ReglasDeValidacion;
            return(valorescontroller);
        }
        public ValoresController GetValoresController()
        {
            bool              _agrupado         = true;
            string            tdcomp            = "4";
            string            moneda            = "1";
            ValoresController valorescontroller = new ValoresController(tdcomp, moneda, _agrupado, null, this);

            //seteo valores por defecto para la ventana de valores
            valorescontroller.AllowEditTDCompTesoreria  = true;
            valorescontroller.IdTDCompTesoreriaReadOnly = false;
            valorescontroller.AllowEditMoneda           = true;
            valorescontroller.IdMonedaOrigenReadOnly    = false;
            return(valorescontroller);
        }
        public ValoresController GetValoresController(decimal Importe)
        {
            bool              _agrupado         = true;
            string            tdcomp            = _brClass.IdTDCompTesoreriaDefault;
            string            moneda            = ComprobantesRules.Contabilidad_MonedaReferencia;
            ValoresController valorescontroller = new ValoresController(tdcomp, moneda, _agrupado, Importe, 0, null, this, string.Empty);

            //seteo valores por defecto para la ventana de valores
            valorescontroller.AllowEditTDCompTesoreria  = true;
            valorescontroller.IdTDCompTesoreriaReadOnly = false;
            valorescontroller.AllowEditMoneda           = true;
            valorescontroller.IdMonedaOrigenReadOnly    = false;
            valorescontroller.AllowEditImportes         = _brClass.CantidadComprobantesSeleccionados <= 1;
            return(valorescontroller);
        }
        public ValoresController GetValoresController()
        {
            bool _agrupado = false;

            tfi_TDCompTesoreriaDataset.tfi_TDCompTesoreriaRow rowTdcomp = (tfi_TDCompTesoreria.GetByPk(ValorTDCompTesoreria));
            if (rowTdcomp != null)
            {
                _agrupado = rowTdcomp.Agrupado;
            }
            decimal _total = 0;

            if (_agrupado)
            {
                decimal totalValoresAgrupadoOrigen    = System.Math.Abs(this.TotalValoresAgrupadoOrigen());
                decimal totalValoresAgrupadoAjustados = System.Math.Abs(this.ValoresAjustados());
                decimal totalSinAjustar = totalValoresAgrupadoOrigen - totalValoresAgrupadoAjustados;
                decimal totalValor      = System.Math.Abs(ValorTotal);
                if (totalSinAjustar > 0)
                {
                    if (totalValor > totalSinAjustar)
                    {
                        _total = totalSinAjustar;
                    }
                    else
                    {
                        _total = totalValor;
                    }
                }
                if (_model.DetalleValorAgrupadoOrigen != null)
                {
                    string     IdCotizacion = _model.DetalleValorAgrupadoOrigen.IdCotizacionMoneda;
                    Cotizacion cot          = mz.erp.businessrules.tfi_CotizacionesMonedas.GetCotizacion(IdCotizacion);
                    _total = _total * cot.Valor;
                }
            }

            ValoresController valorescontroller = new ValoresController(ValorTDCompTesoreria, ValorMoneda, _agrupado, _total, 0, null, this, string.Empty);

            //seteo valores por defecto para la ventana de valores
            valorescontroller.AllowEditTDCompTesoreria  = _model.ValorAllowEditIdTDCompTesoreria;
            valorescontroller.IdTDCompTesoreriaReadOnly = _model.ValorIdTDCompTesoreriaReadOnly;
            valorescontroller.AllowEditMoneda           = _model.ValorAllowEditIdMoneda;
            valorescontroller.IdMonedaOrigenReadOnly    = _model.ValorIdMonedaReadOnly;

            return(valorescontroller);
        }