public static Int32 NearRoundDown(decimal valueDec, Int32 nearest = 100) { decimal dividRet = DecOperations.Divide(valueDec, nearest); decimal multiRet = DecOperations.Multiply(RoundDown(dividRet), nearest); return(RoundToInt(multiRet)); }
private Int32 EmployeeContributionWithFactor(decimal generalBasis, decimal mandatoryEmpee, decimal compoundFactor) { decimal decimalResult1 = HealthOperations.DecFactorResult(mandatoryEmpee, compoundFactor); decimal decimalResult2 = HealthOperations.DecFactorResult(generalBasis, compoundFactor); decimal decimalResult3 = DecOperations.Divide(decimalResult2, 3); Int32 resultPaymentValue = HealthOperations.IntRoundUp(decimal.Add(decimalResult1, decimalResult3)); return(resultPaymentValue); }
private Int32 HealthIncreaseWithFactor(decimal taxableIncome, decimal compoundFactor) { decimal compoundPaymentValue = HealthCompoundIncreaseWithFactor(taxableIncome, compoundFactor); decimal employeePaymentValue = DecOperations.Divide(compoundPaymentValue, 3); Int32 resultCompoundValue = TaxingOperations.IntRoundUp(compoundPaymentValue); Int32 resultEmployeeValue = TaxingOperations.IntRoundUp(employeePaymentValue); Int32 resultPaymentValue = (resultCompoundValue - resultEmployeeValue); return(resultPaymentValue); }