コード例 #1
0
 public CreditContractOptions(OLoanTypes pLoanType, bool pKeepExpectedInstallments,
     bool pCancelFees, OCurrency pManualFeesAmount, OCurrency pManualCommissionAmount,
     bool pCancelInterests, OCurrency pManualInterestsAmount,
     OAnticipatedRepaymentPenaltiesBases pAnticipatedTotalRepaymentPenaltiesBase)
 {
     _loanType = pLoanType;
     _keepExpectedInstallments = pKeepExpectedInstallments;
     _cancelFees = pCancelFees;
     _manualFeesAmount = pManualFeesAmount;
     _manualCommissionAmount = pManualCommissionAmount;
     _cancelInterests = pCancelInterests;
     _manualInterestsAmount = pManualInterestsAmount;
     _anticipatedTotalRepaymentPenaltiesBase = pAnticipatedTotalRepaymentPenaltiesBase;
 }
コード例 #2
0
 public CreditContractOptions(OLoanTypes pLoanType, bool pKeepExpectedInstallments,
                              bool pCancelFees, OCurrency pManualFeesAmount, OCurrency pManualCommissionAmount,
                              bool pCancelInterests, OCurrency pManualInterestsAmount,
                              OAnticipatedRepaymentPenaltiesBases pAnticipatedTotalRepaymentPenaltiesBase)
 {
     _loanType = pLoanType;
     _keepExpectedInstallments = pKeepExpectedInstallments;
     _cancelFees             = pCancelFees;
     _manualFeesAmount       = pManualFeesAmount;
     _manualCommissionAmount = pManualCommissionAmount;
     _cancelInterests        = pCancelInterests;
     _manualInterestsAmount  = pManualInterestsAmount;
     _anticipatedTotalRepaymentPenaltiesBase = pAnticipatedTotalRepaymentPenaltiesBase;
 }
        private static Loan _SetContract(OAnticipatedRepaymentPenaltiesBases pAnticipatedRepaymentBase, double pAnticipated, bool pKeepExpectedInstallment, bool useCents)
        {
            LoanProduct package = new LoanProduct
            {
                InstallmentType = new InstallmentType(1, "Monthly", 0, 1),
                LoanType        = OLoanTypes.Flat,
                ChargeInterestWithinGracePeriod        = true,
                KeepExpectedInstallment                = pKeepExpectedInstallment,
                AnticipatedTotalRepaymentPenaltiesBase = pAnticipatedRepaymentBase,
                Currency = new Currency {
                    Id = 1, UseCents = useCents
                }
            };

            return(new Loan(package, 1000, 0.03m, 6, 1, new DateTime(2006, 1, 1), new User(), ApplicationSettings.GetInstance(""), NonWorkingDateSingleton.GetInstance(""), ProvisionTable.GetInstance(new User()), ChartOfAccounts.GetInstance(new User()))
            {
                BadLoan = false,
                AnticipatedTotalRepaymentPenalties = pAnticipated,
                NonRepaymentPenalties = { InitialAmount = 0.003 }
            });
        }
コード例 #4
0
        private static Loan _SetContract(OLoanTypes pLoansType, int pNumberOfInstallments, int pGracePeriod, NonRepaymentPenalties pNonRepaymentPenalties, bool pKeepExpectedInstallment,
                                         OAnticipatedRepaymentPenaltiesBases pAnticipatedBase, double pAnticipatedPenalties, bool pBadLoan)
        {
            LoanProduct package = new LoanProduct
                                      {
                                          InstallmentType = new InstallmentType(1, "Monthly", 0, 1),
                                          LoanType = pLoansType,
                                          ChargeInterestWithinGracePeriod = true,
                                          Currency = new Currency {Id = 1, UseCents = true},
                                          KeepExpectedInstallment = pKeepExpectedInstallment,
                                          AnticipatedTotalRepaymentPenaltiesBase = pAnticipatedBase,
                                          RoundingType = ORoundingType.Approximate
                                      };

            Loan myContract = new Loan(package, 1000, 0.03m, pNumberOfInstallments, pGracePeriod, new DateTime(2006, 1, 1), new User(), ApplicationSettings.GetInstance(""), NonWorkingDateSingleton.GetInstance(""), ProvisionTable.GetInstance(new User()), ChartOfAccounts.GetInstance(new User()))
                                  {
                                      BadLoan = pBadLoan,
                                      AnticipatedTotalRepaymentPenalties = pAnticipatedPenalties,
                                      NonRepaymentPenalties = pNonRepaymentPenalties
                                  };

            return myContract;
        }
コード例 #5
0
 private static Loan _SetContract(OLoanTypes pLoansType, int pNumberOfInstallments, int pGracePeriod, NonRepaymentPenalties pNonRepaymentPenalties, bool pKeepExpectedInstallment,
                                  OAnticipatedRepaymentPenaltiesBases pAnticipatedBase, bool pBadLoan)
 {
     return _SetContract(pLoansType,pNumberOfInstallments, pGracePeriod, pNonRepaymentPenalties, pKeepExpectedInstallment, pAnticipatedBase, 0.01,pBadLoan);
 }
        private static Loan _SetContract(OAnticipatedRepaymentPenaltiesBases pAnticipatedRepaymentBase, double pAnticipated, bool pKeepExpectedInstallment)
        {
            LoanProduct package = new LoanProduct
                                      {
                                          InstallmentType = new InstallmentType(1, "Monthly", 0, 1),
                                          LoanType = OLoanTypes.Flat,
                                          ChargeInterestWithinGracePeriod = true,

                                          KeepExpectedInstallment = pKeepExpectedInstallment,
                                          AnticipatedTotalRepaymentPenaltiesBase = pAnticipatedRepaymentBase,
                                          Currency = new Currency { Id = 1 }
                                      };

            return new Loan(package, 1000, 0.03m, 6, 1, new DateTime(2006, 1, 1), new User(), ApplicationSettings.GetInstance(""), NonWorkingDateSingleton.GetInstance(""), ProvisionTable.GetInstance(new User()), ChartOfAccounts.GetInstance(new User()))
                                  {
                                      BadLoan = false,
                                      AnticipatedTotalRepaymentPenalties = pAnticipated,
                                      NonRepaymentPenalties = {InitialAmount = 0.003}
                                  };
        }
コード例 #7
0
        private static Loan _SetContract(OLoanTypes pLoansType, int pNumberOfInstallments, int pGracePeriod, NonRepaymentPenalties pNonRepaymentPenalties, bool pKeepExpectedInstallment, 
                                         OAnticipatedRepaymentPenaltiesBases pAnticipatedBase, double pAnticipatedPenalties,bool pBadLoan)
        {
            LoanProduct package = new LoanProduct
                                      {
                                          InstallmentType = new InstallmentType(1, "Monthly", 0, 1),
                                          LoanType = pLoansType,
                                          ChargeInterestWithinGracePeriod = true,
                                          Currency = new Currency { Id = 1 }
                                      };
            package.KeepExpectedInstallment = pKeepExpectedInstallment;
            package.AnticipatedRepaymentPenaltiesBase = pAnticipatedBase;

            Loan myContract = new Loan(package, 1000, 0.03, pNumberOfInstallments, pGracePeriod, new DateTime(2006, 1, 1), new User(), ApplicationSettings.GetInstance(""), NonWorkingDateSingleton.GetInstance(""), ProvisioningTable.GetInstance(new User()));
            myContract.BadLoan = pBadLoan;

            myContract.AnticipatedRepaymentPenalties = pAnticipatedPenalties;
            myContract.NonRepaymentPenalties = pNonRepaymentPenalties;
            return myContract;
        }