예제 #1
0
 private static OCurrency _BadLoanBalance(Loan pCredit, int badLoanDays)
 {
     int pastDueDays = pCredit.GetPastDueDays(TimeProvider.Today);
     if (pastDueDays <= badLoanDays && pastDueDays != 0)
         return pCredit.GetOlb();
     return 0;
 }
예제 #2
0
파일: Cash.cs 프로젝트: Ramazanov/FomsNet
        private static OCurrency _CashCreditBalance(Loan pCredit)
        {
            if (!pCredit.Disbursed || pCredit.Rescheduled) return 0;

            if (pCredit.GetPastDueDays(TimeProvider.Today) == 0)
                return pCredit.GetOlb();
            else
                return 0;
        }
예제 #3
0
파일: Cash.cs 프로젝트: Ramazanov/FomsNet
        private static OCurrency _IncomeLoanLossBalance(Loan pCredit, ProvisionTable pProvisionningTable)
        {
            OCurrency olb = pCredit.GetOlb();
            OCurrency rate = Convert.ToDecimal(pProvisionningTable.GetProvisiningRateByNbOfDays(0).Rate);
            if (pCredit.GetPastDueDays(TimeProvider.Today) != 0) olb = 0;
            if (pCredit.WrittenOff) return 0;

            if (!pCredit.Disbursed) return 0;

            if (pCredit.AllInstallmentsRepaid) return 0;

            if (!pCredit.BadLoan) return (pCredit.Amount - olb) * rate;

            else return (pCredit.Amount) * rate;
        }
예제 #4
0
 private static OCurrency _UnrecoverableBadLoanBalance(Loan pCredit, int badLoanDays, int writeOffDays)
 {
     int pastDueDays = pCredit.GetPastDueDays(TimeProvider.Today);
     if (pastDueDays > badLoanDays && pastDueDays <= writeOffDays)
         return pCredit.GetOlb();
     return 0;
 }
예제 #5
0
 private static OCurrency _RescheduledLoanBalance(Loan pCredit)
 {
     return pCredit.Rescheduled ? pCredit.GetOlb() : 0;
 }
예제 #6
0
        private static OCurrency _ProvisionWriteOffBalance(Loan pCredit, int writeOffDays)
        {
            OCurrency balance = 0;
            if (pCredit.WrittenOff || pCredit.GetPastDueDays(TimeProvider.Today) > writeOffDays) return pCredit.GetOlb();

            foreach (BadLoanRepaymentEvent e in pCredit.Events.GetEventsByType(typeof(BadLoanRepaymentEvent)))
            {
                balance += e.AccruedProvision;
            }
            return balance;
        }
예제 #7
0
        private static OCurrency _LoanLossReserveBalance(Loan pCredit, ProvisionTable pProvisionningTable, int writeOffDays)
        {
            OCurrency theoricBalance = 0;
            if (!pCredit.Disbursed) return theoricBalance;

            if (pCredit.GetPastDueDays(TimeProvider.Today) == 0) return theoricBalance;
            if (pCredit.GetPastDueDays(TimeProvider.Today) > writeOffDays) return theoricBalance;

            foreach (Installment installment in pCredit.InstallmentList)
            {
                if (installment.ExpectedDate >= TimeProvider.Today)
                    break;
                theoricBalance += (installment.InterestsRepayment - installment.PaidInterests);
            }

            theoricBalance += pCredit.GetUnpaidLatePenalties(TimeProvider.Today);

            int pastDueDays = pCredit.GetPastDueDays(TimeProvider.Today);
            theoricBalance += pCredit.GetOlb() * Convert.ToDecimal(pProvisionningTable.GetProvisiningRateByNbOfDays(pastDueDays).Rate);

            OCurrency realBalance = 0;
            return theoricBalance > realBalance ? theoricBalance : realBalance;
        }
예제 #8
0
 private static OCurrency _LoanLossBalance(Loan pCredit, int writeOffDays)
 {
     if (pCredit.WrittenOff || pCredit.GetPastDueDays(TimeProvider.Today) > writeOffDays) return pCredit.GetOlb();
     return 0;
 }
예제 #9
0
 private static OCurrency _LiabilitiesLoanLossBalance(Loan pCredit, ProvisionTable pProvisionningTable)
 {
     if (pCredit.Disbursed && !pCredit.BadLoan)
         return pCredit.GetPastDueDays(TimeProvider.Today) == 0
                    ? pCredit.GetOlb()* Convert.ToDecimal(pProvisionningTable.GetProvisiningRateByNbOfDays(0).Rate)
                    : 0;
     return 0;
 }
예제 #10
0
파일: Cash.cs 프로젝트: Ramazanov/FomsNet
 private static OCurrency _RescheduledLoanBalance(Loan pCredit)
 {
     if (pCredit.Rescheduled)
         return pCredit.GetOlb();
     else
         return 0;
 }