private static bool isAMethodWithALimit(DeprMethod deprMethod) { switch (deprMethod.Type) { case DeprMethodTypeEnum.MacrsFormula: case DeprMethodTypeEnum.MacrsTable: case DeprMethodTypeEnum.AdsSlMacrs: case DeprMethodTypeEnum.AcrsTable: case DeprMethodTypeEnum.StraightLineAltAcrsFormula: case DeprMethodTypeEnum.StraightLineAltAcrsTable: return(true); default: return(false); } }
public bool isAmountOverLimit(DateTime pisDate, PropertyType propType, DeprMethod deprMethod) { if (Amount == 0.0) { return(false); } double limit = amountLimit(pisDate, propType, deprMethod); if (limit != -1.0 && Amount > limit) { return(true); } else { return(false); } }
public static double amountLimit(DateTime pisDate, PropertyType propType, DeprMethod deprMethod) { double limit = 0.0; if (propType.Type != PropertyTypeEnum.Automobile && propType.Type != PropertyTypeEnum.LtTrucksAndVans) { return(-1.0); } if (isAMethodWithALimit(deprMethod) == false) { return(-1.0); } if (pisDate < new DateTime(1984, 6, 19)) { limit = -1.0; } else if (pisDate <= new DateTime(1984, 12, 31)) { limit = 1000.0; } else if (pisDate <= new DateTime(1985, 4, 2)) { limit = 1000.0; } else if (pisDate <= new DateTime(1986, 12, 31)) { limit = 675.0; } else if (pisDate >= new DateTime(1992, 1, 1)) { limit = 0.0; } return(limit); }
public DeprMethodCode(DeprMethod obj) : base(obj) { _stable = true; }
public DeprMethod(DeprMethod obj) { _pct = 0; copyFrom(obj); }
public void copyFrom(DeprMethod obj) { Type = obj.Type; Percentage = obj.Percentage; }
public override bool Equals(object obj) { DeprMethod that = obj as DeprMethod; return(this == that); }