Пример #1
0
        public decimal CalculateGains(MarketPrice marketPrice, EmployeeBonus employeeBonus, int soldUnits)
        {
            if (employeeBonus != null)
            {
                return(CalculatePrice(marketPrice, GetMultiplier(employeeBonus, marketPrice), NumberOfUnits - soldUnits));
            }

            return(CalculatePrice(marketPrice, 1.00M, NumberOfUnits - soldUnits));
        }
Пример #2
0
        private decimal CalculatePrice(MarketPrice marketPrice, decimal bonusMultiplier, int numberOfUnits)
        {
            if (VestDate > marketPrice.MarketPriceDate ||
                (marketPrice.Price - GrantPrice < 0.00M))
            {
                return(0.00M);
            }

            return(Math.Round((marketPrice.Price * (numberOfUnits * bonusMultiplier)) - (GrantPrice * (numberOfUnits * bonusMultiplier)), 2, MidpointRounding.AwayFromZero));
        }
Пример #3
0
 private decimal GetMultiplier(EmployeeBonus employeeBonus, MarketPrice marketPrice)
 {
     return(employeeBonus.BonusDate > VestDate && employeeBonus.BonusDate <= marketPrice.MarketPriceDate ? employeeBonus.Multiplier : 1.00M);
 }
Пример #4
0
 public decimal CalculateGains(MarketPrice marketPrice)
 {
     return(CalculatePrice(marketPrice, 1.00M, NumberOfUnits));
 }