Пример #1
0
        public RepaymentEvent CopyAsRepaymentEvent()
        {
            RepaymentEvent rPe;

            if (Code == "PRLR")
                rPe = new RescheduledLoanRepaymentEvent();
            else if (Code == "PBLR")
                rPe = new BadLoanRepaymentEvent();
            else if (Code == "PRWO")
                rPe = new RepaymentOverWriteOffEvent();
            else
                rPe = new RepaymentEvent();

            rPe.AccruedInterest = this.AccruedInterest;
            rPe.Cancelable = this.Cancelable;
            rPe.ClientType = this.ClientType;
            rPe.Commissions = this.Commissions;
            rPe.Date = this.Date;
            rPe.InstallmentNumber = this.InstallmentNumber;
            rPe.InterestPrepayment = this.InterestPrepayment;
            rPe.Interests = this.Interests;
            rPe.PastDueDays = this.PastDueDays;
            rPe.Penalties = this.Penalties;
            rPe.Principal = this.Principal;
            rPe.RepaymentType = this.RepaymentType;

            return rPe;
        }
Пример #2
0
 public PendingRepaymentEvent(RepaymentEvent pEvent)
 {
     if (pEvent is RescheduledLoanRepaymentEvent)
         Code = "PRLR";
     else if (pEvent is BadLoanRepaymentEvent)
         Code = "PBLR";
     else if (pEvent is RepaymentOverWriteOffEvent)
         Code = "PRWO";
     else
         Code = "PERE";
 }
Пример #3
0
        /// <summary>
        /// Test if the client has repaid the total principal, interests and penalties owed at date D
        /// </summary>
        /// <param name="rPe"></param>
        /// <param name="date"></param>
        /// <returns></returns>
        public bool _IsBadLoan(RepaymentEvent rPe, DateTime date)
        {
            if (rPe is BadLoanRepaymentEvent)
            {
                ((BadLoanRepaymentEvent) rPe).OLB = CalculateActualOlb();

                if (AmountComparer.Equals(0, CalculateRemainingInterests(date)) &&
                    AmountComparer.Equals(0, CalculateActualOlb(date)))
                {
                    ((BadLoanRepaymentEvent) rPe).AccruedProvision += 0;
                    return false;
                }
                return true;
            }
            return false;
        }