public static bool CalculateDiscountedTaxes(PXCache cache, ARTaxTran artax, decimal cashDiscPercent) { bool? result = null; object value = null; IBqlCreator whereTaxable = (IBqlCreator)Activator.CreateInstance(typeof(WhereTaxable <Required <ARTaxTran.taxID> >)); whereTaxable.Verify(cache, artax, new List <object> { artax.TaxID }, ref result, ref value); artax.CuryDiscountedTaxableAmt = cashDiscPercent == 0m ? artax.CuryTaxableAmt : PXDBCurrencyAttribute.RoundCury(cache, artax, (decimal)(artax.CuryTaxableAmt * (1 - Decimal.Round(cashDiscPercent, 4)))); artax.CuryDiscountedPrice = cashDiscPercent == 0m ? artax.CuryTaxAmt : PXDBCurrencyAttribute.RoundCury(cache, artax, (decimal)(artax.TaxRate / 100m * artax.CuryDiscountedTaxableAmt)); return(result == true); }
public void Verify(PXCache cache, object item, List <object> pars, ref bool?result, ref object value) => _where.Verify(cache, item, pars, ref result, ref value);