internal static decimal GetValorAcrescimo(ProdutosOrcamento p) { if (p._total == null) { return(0); } return(Math.Abs(p._total.Value - GetTotalSemAcrescimo(p))); }
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); }
internal static decimal GetValorDesconto(ProdutosOrcamento p) { if (p._total == null) { return(0); } return(Math.Abs(GetTotalSemDesconto(p) - p._total.Value)); }
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); }
internal static decimal ObterValorDescontoAmbiente(ProdutosOrcamento produtoAmbiente) { return(produtoAmbiente.TipoDesconto == 1 ? (decimal)produtoAmbiente._totalProdutos * (produtoAmbiente.Desconto / 100) : produtoAmbiente.Desconto); }