예제 #1
0
        internal static decimal GetValorAcrescimo(ProdutosOrcamento p)
        {
            if (p._total == null)
            {
                return(0);
            }

            return(Math.Abs(p._total.Value - GetTotalSemAcrescimo(p)));
        }
예제 #2
0
        internal static decimal GetTotalSemAcrescimo(ProdutosOrcamento p)
        {
            if (p._total == null)
            {
                return(0);
            }

            return(p.TipoAcrescimo == 1 ? p._total.Value * (100 / (100 - p.Acrescimo)) : p._total.Value - p.Acrescimo);
        }
예제 #3
0
        internal static decimal GetValorDesconto(ProdutosOrcamento p)
        {
            if (p._total == null)
            {
                return(0);
            }

            return(Math.Abs(GetTotalSemDesconto(p) - p._total.Value));
        }
예제 #4
0
        internal static decimal GetTotalSemDesconto(ProdutosOrcamento p)
        {
            if (p._total == null)
            {
                return(0);
            }

            return(!PedidoConfig.RatearDescontoProdutos ? p._total.Value :
                   p.TipoDesconto == 1 ? p._total.Value * (100 / (100 - p.Desconto)) : p._total.Value + p.Desconto);
        }
예제 #5
0
 internal static decimal ObterValorDescontoAmbiente(ProdutosOrcamento produtoAmbiente)
 {
     return(produtoAmbiente.TipoDesconto == 1 ? (decimal)produtoAmbiente._totalProdutos * (produtoAmbiente.Desconto / 100) : produtoAmbiente.Desconto);
 }