//Calcular valor total das tarifas
        public static decimal valorTotalTarifas(this TituloReceitaPagamentoVW OPagamento)
        {
            decimal valorTotal = new decimal(0);

            if (OPagamento == null)
            {
                return(valorTotal);
            }

            if (OPagamento.valorTarifasBancarias > 0)
            {
                valorTotal = Decimal.Add(valorTotal, UtilNumber.toDecimal(OPagamento.valorTarifasBancarias));
            }

            if (OPagamento.valorTarifasTransacao > 0)
            {
                valorTotal = Decimal.Add(valorTotal, UtilNumber.toDecimal(OPagamento.valorTarifasTransacao));
            }

            if (OPagamento.valorOutrasTarifas > 0)
            {
                valorTotal = Decimal.Add(valorTotal, UtilNumber.toDecimal(OPagamento.valorOutrasTarifas));
            }

            return(valorTotal);
        }
Ejemplo n.º 2
0
        //
        public static string classeLabelStatus(this TituloReceitaPagamentoVW Opagamento)
        {
            if (Opagamento.idStatusPagamento == StatusPagamentoConst.PAGO)
            {
                return("bg-green");
            }

            if (Opagamento.idStatusPagamento == StatusPagamentoConst.CANCELADO ||
                Opagamento.idStatusPagamento == StatusPagamentoConst.ESTORNADO)
            {
                return("bg-red");
            }

            return("bg-yellow");
        }
Ejemplo n.º 3
0
        //
        public static string descricaoTitulo(this TituloReceitaPagamentoVW Opagamento)
        {
            if (!String.IsNullOrEmpty(Opagamento.descricaoTitulo))
            {
                return(Opagamento.descricaoTitulo);
            }

            if (Opagamento.idTipoReceita == TipoReceitaConst.SOLICITACAO)
            {
                return("Solicitação");
            }

            if (Opagamento.idTipoReceita == TipoReceitaConst.INSCRICAO_EVENTO)
            {
                return("Inscrição para evento.");
            }

            if (Opagamento.idTipoReceita == TipoReceitaConst.PEDIDO)
            {
                return(String.Format("Pedido Nº {0}", Opagamento.idReceita));
            }

            return(string.Empty);
        }