示例#1
0
        public PeriodDeprItemDto CalculateDepreciation(DepreciableBookDto deprBook, DateTime runDate)
        {
            IBAPeriodDeprItem   pdItem           = GetPeriodDeprItem();
            IBADeprScheduleItem deprScheduleItem = transformDepreciableBookDtoToDeprScheduleItem(deprBook);

            IBAPeriodDetailDeprInfo periodDetails = _calcEngine.CalculateDepreciation(deprScheduleItem, ref pdItem, runDate);

            return(transformPeriodDeprItemToDto(periodDetails));
        }
示例#2
0
 public bool SplitPDItem(IBAPeriodDeprItem source, DateTime rightDate, out IBAPeriodDeprItem left, out IBAPeriodDeprItem right)
 {
     left  = new PeriodDeprItem();
     right = new PeriodDeprItem();
     if (source == null)
     {
         return(false);
     }
     return(source.Split2ways(rightDate, m_pObjCalendar, m_dtPISDate, m_dtDeemedEndDate, ref left, ref right));
     //return true;
 }
示例#3
0
        public List <PeriodDeprItemDto> CalculateMonthlyProjection(DepreciableBookDto deprBook, DateTime startDate, DateTime endDate)
        {
            IBAPeriodDeprItem              pdItem           = GetPeriodDeprItem();
            IBADeprScheduleItem            deprScheduleItem = transformDepreciableBookDtoToDeprScheduleItem(deprBook);
            List <IBAPeriodDetailDeprInfo> objPDItems       = null;

            bool isCalculateProjectionSuccess = _calcEngine.CalculateMonthlyProjection(deprScheduleItem, ref pdItem, startDate, endDate, out objPDItems);

            if (isCalculateProjectionSuccess)
            {
                return(objPDItems.Select(item => transformPeriodDeprItemToDto(item)).ToList());
            }

            return(null);
        }
示例#4
0
 public void CalculateMonthlyProjectionTest()
 {
     List <IBAPeriodDetailDeprInfo> objPDItems = null;
     IBAPeriodDeprItem pdItem     = GetPeriodDeprItem();
     bool isMonthlyProjCalculated = _calcEngine.CalculateMonthlyProjection(GetDeprScheduleItem(), ref pdItem, DateTime.Now, DateTime.Now.AddDays(365), out objPDItems);
 }
示例#5
0
 public void CalculateProjectionTest()
 {
     List <IBAPeriodDetailDeprInfo> objPDItems = null;
     IBAPeriodDeprItem pdItem          = GetPeriodDeprItem();
     bool isCalculateProjectionSuccess = _calcEngine.CalculateProjection(GetDeprScheduleItem(), ref pdItem, out objPDItems);
 }
示例#6
0
 public void CalculateDepreciationTest()
 {
     IBAPeriodDeprItem       pdItem        = GetPeriodDeprItem();
     IBAPeriodDetailDeprInfo periodDetails = _calcEngine.CalculateDepreciation(GetDeprScheduleItem(), ref pdItem, DateTime.Now);
 }
示例#7
0
        public void FlipSign(ref IBADeprScheduleItem m_schedule, ref IBAPeriodDeprItem m_begin)
        {
            decimal cy;
            double  dbl;

            //
            // First process the depr schedule item.
            //
            dbl = m_schedule.SalvageDeduction;
            dbl = -dbl;
            m_schedule.SalvageDeduction = dbl;
            cy = m_schedule.ACEBasis;
            cy = -cy;
            m_schedule.ACEBasis = cy;
            dbl = m_schedule.BasisAdjustment;
            dbl = -dbl;
            m_schedule.BasisAdjustment = dbl;
            dbl = m_schedule.Section179;
            dbl = -dbl;
            m_schedule.Section179 = dbl;
            dbl = m_schedule.Section179A;
            dbl = -dbl;
            m_schedule.Section179A = dbl;
            dbl = m_schedule.ElectricCar;
            dbl = -dbl;
            m_schedule.ElectricCar = dbl;
            dbl = m_schedule.ITCBasisReduction;
            dbl = -dbl;
            m_schedule.ITCBasisReduction = dbl;
            dbl = m_schedule.BonusAmount;
            dbl = -dbl;
            m_schedule.BonusAmount = dbl;
            dbl = m_schedule.AcquisitionValue;
            dbl = -dbl;
            m_schedule.AcquisitionValue = dbl;
            dbl = m_schedule.ReplacementValueBasis;
            dbl = -dbl;
            m_schedule.ReplacementValueBasis = dbl;
            dbl = m_schedule.ITCAmount;
            dbl = -dbl;
            m_schedule.ITCAmount = dbl;
            dbl = m_schedule.ITCReduce;
            dbl = -dbl;
            m_schedule.ITCReduce = dbl;
            //
            // Now process the begin period depr item.
            //
            if (m_begin == null)
            {
                return;
            }

            cy = m_begin.BeginYearAccum;
            cy = -cy;
            m_begin.BeginYearAccum = cy;
            cy = m_begin.BeginYTDExpense;
            cy = -cy;
            m_begin.BeginYTDExpense = cy;
            cy = m_begin.DeprAmount;
            cy = -cy;
            m_begin.DeprAmount = cy;
            cy = m_begin.AdjustAmount;
            cy = -cy;
            m_begin.AdjustAmount = cy;
            cy = m_begin.Section179Change;
            cy = -cy;
            m_begin.Section179Change = cy;
            cy = m_begin.CalcOverride;
            cy = -cy;
            m_begin.CalcOverride = cy;
            cy = m_begin.EndDateBeginYearAccum;
            cy = -cy;
            m_begin.EndDateBeginYearAccum = cy;
            cy = m_begin.EndDateDeferredAccum;
            cy = -cy;
            m_begin.EndDateDeferredAccum = cy;
            cy = m_begin.EndDateYTDDeferred;
            cy = -cy;
            m_begin.EndDateYTDDeferred = cy;
            cy = m_begin.EndDatePersonalUseAccum;
            cy = -cy;
            m_begin.EndDatePersonalUseAccum = cy;
            cy = m_begin.EndDateYTDPersonalUse;
            cy = -cy;
            m_begin.EndDateYTDPersonalUse = cy;
            //cy = m_begin.NetBookValue;
            //cy = -cy;
            //m_begin.NetBookValue = cy;
            //cy = m_begin.CostBasis;
            //cy = -cy;
            //m_begin.CostBasis = cy;
        }