Ejemplo n.º 1
0
 public NonWorkingDateManagement(User pUser)
     : base(pUser)
 {
     _user = pUser;
     dbParam = ApplicationSettings.GetInstance(pUser.Md5);
     nonWorkingDateHelper = NonWorkingDateSingleton.GetInstance(_user.Md5);
 }
Ejemplo n.º 2
0
        public CreditContractRepayment(Loan contract, CreditContractOptions creditOptions, DateTime pDate,int pInstallmentNumber, User user, ApplicationSettings pGeneralSettings,NonWorkingDateSingleton pNonWorkingDate)
        {
            _generalSettings = pGeneralSettings;
            _nWds = pNonWorkingDate;

            _date = pDate.Date;
            _installmentNumber = pInstallmentNumber;

            PaidIstallments = new List<Installment>();

            _amountToRepayTotalyLoan = new CalculateMaximumAmountToRepayStrategy(creditOptions, contract.Copy(), user, _generalSettings,_nWds);
            _amountToRegradingLoan = new CalculateMaximumAmountToRegradingLoanStrategy(creditOptions, contract.Copy(), user, _generalSettings, _nWds);
            _amountToRepayInstallment = new CalculateAmountToRepaySpecifiedInstallmentStrategy(creditOptions, contract.Copy(), user, _generalSettings, _nWds);

            _calculateInstallments = new Repayment.RepayLateInstallments.CalculateInstallments(creditOptions, contract, user, _generalSettings, _nWds);
            _calculateRealInterestInstallments = new CalculateRealInterestInstallments(creditOptions, _amountToRepayTotalyLoan, contract, _generalSettings, _nWds);

            _feesForAnticipatedRepayment = new CalculateAnticipatedFeesStrategy(creditOptions, contract, _generalSettings);
            _repayNextInstallments = new RepayNextInstallmentsStrategy(contract, creditOptions, user, _generalSettings);
            _repaymentMethod = new RepaymentMethod(contract,creditOptions);

            _loan = contract;

            CalculateMaximumAmountAuthorizedToRepay();
            CalculateAmountToRegradingLoan();
            CalculateMaximumAmountForEscapedMember();
            LoanOptions = creditOptions;
        }
Ejemplo n.º 3
0
 public ClientServices(User pUser, string testDB)
 {
     _user = pUser;
     _clientManagement = new ClientManager(testDB);
     _dataParam = ApplicationSettings.GetInstance(pUser.Md5);
     _picturesServices = new PicturesServices(testDB);
 }
 public CalculateAnticipatedFeesStrategy(CreditContractOptions pCCO,Loan pContract, ApplicationSettings pGeneralSettings)
 {
     if(pCCO.CancelFees || pCCO.KeepExpectedInstallments)
         _cFfar = new AnticipatedFeesNotCalculate();
     else
         _cFfar = new AnticipatedFeesCalculate(pCCO,pContract);
 }
Ejemplo n.º 5
0
 public SavingBookContract(ApplicationSettings pApplicationSettings, User pUser)
 {
     Events = new List<SavingEvent>();
     ApplicationSettings = pApplicationSettings;
     User = pUser;
     _loans = new List<Loan>();
 }
 public DecliningKeepNotExpectedInstallments(Loan contract, User pUser, ApplicationSettings pGeneralSettings)
 {
     _user = pUser;
     _generalSettings = pGeneralSettings;
     _contract = contract;
     _paidInstallments = new List<Installment>();
 }
Ejemplo n.º 7
0
 public FixedInstallmentStrategy(Loan pContract, OCurrency pStartAmount, int pNumberOfInstalments, ApplicationSettings pGeneralSettings)
 {
     _contract = pContract;
     _startAmount = pStartAmount;
     _numberOfInstallmentsToPay = pNumberOfInstalments;
     _roundingPoint = pContract.UseCents ? 2 : 0;
     _generalSettings = pGeneralSettings;
 }
Ejemplo n.º 8
0
 public ClientServices(User pUser)
 {
     _user = pUser;
     _clientManagement = new ClientManager(pUser, true, true);
     _clientManagement.ClientSelected += ClientSelected;
     _dataParam = ApplicationSettings.GetInstance(pUser.Md5);
     _picturesServices = new PicturesServices(pUser);
 }
Ejemplo n.º 9
0
        public FlatStrategy(Loan pContract, ApplicationSettings pGeneralSettings, OCurrency pInitialOlbOfContractBeforeRescheduling)
        {
            _roundingPoint = pContract.UseCents ? 2 : 0;

            _initialOlbOfContractBeforeRescheduling = pInitialOlbOfContractBeforeRescheduling;
            _contract = pContract;
            _generalSettings = pGeneralSettings;
        }
 public CalculateAmountToRepaySpecifiedInstallmentStrategy(CreditContractOptions pCCo,Loan pContract, User pUser, 
     ApplicationSettings pGeneralSettings,NonWorkingDateSingleton pNonWorkingDate)
 {
     _user = pUser;
     _generalSettings = pGeneralSettings;
     _nWds = pNonWorkingDate;
     _contract = pContract;
     _cCo = pCCo;
 }
Ejemplo n.º 11
0
 public Tranche(Loan pLoan, ApplicationSettings pGeeneralSettings)
 {
     _currentLoan = pLoan;
     _generalSettings = pGeeneralSettings;
     foreach (Installment installment in _currentLoan.InstallmentList)
     {
         _previousSchedule.Add(installment);
     }
 }
Ejemplo n.º 12
0
        public SavingBookContract(ApplicationSettings pApplicationSettings, User pUser, SavingsBookProduct pProduct)
        {
            base.Product = pProduct;

            Events = new List<SavingEvent>();
            ApplicationSettings = pApplicationSettings;
            User = pUser;
            _loans = new List<Loan>();
            UseTermDeposit = pProduct.UseTermDeposit;
        }
Ejemplo n.º 13
0
        public SavingBookContract(ApplicationSettings pApplicationSettings, User pUser, DateTime pCreationDate, IClient pClient)
        {
            Client = pClient;
            CreationDate = pCreationDate;

            Events = new List<SavingEvent>();
            ApplicationSettings = pApplicationSettings;
            User = pUser;
            _loans = new List<Loan>();
        }
        public CalculateMaximumAmountToRegradingLoanStrategy(CreditContractOptions pCCo,Loan pContract, User pUser, 
            ApplicationSettings pGeneralSettings,NonWorkingDateSingleton pNonWorkingDate)
        {
            _user = pUser;
            _generalSettings = pGeneralSettings;
            _nWds = pNonWorkingDate;

            _contract = pContract;
            _cCo = pCCo;
        }
Ejemplo n.º 15
0
 private static int _CalculatePastDueWithGeneralParameterForRepayment(int pDays, ApplicationSettings pGeneralSettings)
 {
     if (pGeneralSettings.LateDaysAfterAccrualCeases.HasValue)
     {
         if (pDays > pGeneralSettings.LateDaysAfterAccrualCeases.Value && pGeneralSettings.LateDaysAfterAccrualCeases != 0)
             return pGeneralSettings.LateDaysAfterAccrualCeases.Value;
         
         return pDays;
     }
     return pDays;
 }
Ejemplo n.º 16
0
 public CalculateInstallments(CreditContractOptions pCco, Loan pContract, User pUser, ApplicationSettings pGeneralSettings,NonWorkingDateSingleton pNonWorkingDate)
 {
     _generalSettings = pGeneralSettings;
     _nWds = pNonWorkingDate;
     _contract = pContract;
     _cCo = pCco;
     _methodToRepayFees = new RepayFeesStrategy(pCco);
     _methodToRepayInterest = new RepayInterestStrategy(pCco);
     _methodToRepayCommission = new RepayCommisionStrategy(pCco);
     PaidIstallments = new List<Installment>();
 }
Ejemplo n.º 17
0
        public static LoanDisbursmentEvent GenerateLoanDisbursmentEvent(Loan pLoan, ApplicationSettings pGeneralSettings, DateTime pDisburseDate, bool pAlignInstallmentsDatesOnRealDisbursmentDate, bool pDisableFees, User pUser)
        {
            if (pAlignInstallmentsDatesOnRealDisbursmentDate)
            {
                //pLoan.StartDate = pDisburseDate;
                //for (int i = 1; i <= pLoan.NbOfInstallments; i++)
                //{
                //    pLoan.InstallmentList[i - 1].ExpectedDate = pLoan.CalculateInstallmentDate(pLoan.StartDate, i);
                //}
            }
            else
            {
                if (pGeneralSettings.PayFirstInterestRealValue)
                {
                    TimeSpan time = pDisburseDate - pLoan.StartDate;
                    int diffDays = Math.Abs(time.Days);

                    int nbOfDaysInPeriod = pLoan.InstallmentType.NbOfMonths * AVERAGE_NB_OF_DAYS_IN_MONTH + pLoan.InstallmentType.NbOfDays;

                    if (pDisburseDate.CompareTo(pLoan.StartDate) < 0)
                        pLoan.GetInstallment(0).InterestsRepayment += (Convert.ToDecimal(pLoan.InterestRate) * diffDays * pLoan.Amount / (double)nbOfDaysInPeriod);
                    else
                        pLoan.GetInstallment(0).InterestsRepayment -= (Convert.ToDecimal(pLoan.InterestRate) * diffDays * pLoan.Amount / (double)nbOfDaysInPeriod);

                    if (AmountComparer.Compare(pLoan.GetInstallment(0).InterestsRepayment, 0) < 0)
                    {
                        pLoan.GetInstallment(0).InterestsRepayment = 0;
                    }
                    pLoan.GetInstallment(0).InterestsRepayment = Math.Round(pLoan.GetInstallment(0).InterestsRepayment.Value, 2);
                }
            }

            pLoan.Disbursed = true;
            LoanDisbursmentEvent lDe = !pDisableFees
                                           ? new LoanDisbursmentEvent
                                                 {
                                                     Date = pDisburseDate,
                                                     Amount = pLoan.Amount,
                                                     ClientType = pLoan.ClientType
                                                 }
                                           : new LoanDisbursmentEvent
                                                 {
                                                     Date = pDisburseDate,
                                                     Amount = pLoan.Amount,
                                                     Commissions = null,
                                                     ClientType = pLoan.ClientType
                                                 };
            pLoan.Events.Add(lDe);
            return lDe;
        }
        public RepayNextInstallmentsStrategy(Loan contract,CreditContractOptions cCO, User pUser, ApplicationSettings pGeneralSettings)
        {
            if(cCO.LoansType != OLoanTypes.Flat) //declining
            {
                if(cCO.KeepExpectedInstallments)
                    _repayNextInstallments = new DecliningKeepExpectedInstallments(contract, cCO);
                else
                {
                    if (contract.Product.ExoticProduct != null)
                    {
                        if(contract.UseCents)
                            _repayNextInstallments = new DecliningExoticKeepNotExpectedInstallmentsWithCents(contract);
                        else
                            _repayNextInstallments = new DecliningExoticKeepNotExpectedInstallmentsWithNoCents(contract);
                    }
				    //???????????????????????????????????????
                    else
                        _repayNextInstallments = new DecliningKeepNotExpectedInstallments(contract, pUser, pGeneralSettings);
                }
            }
            else //flat
            {
                if (cCO.KeepExpectedInstallments)
                {
                    _repayNextInstallments = new FlateKeepExpectedInstallments(contract, cCO);
                }
                else
                {
                    if (contract.Product.ExoticProduct != null)
                    {
                        if (contract.UseCents)
                        {
                            _repayNextInstallments = new FlatExoticKeepNotExpectedInstallmentsWithCents(contract);
                        }
                        else
                        {
                            _repayNextInstallments = new FlatExoticKeepNotExpectedInstallmentsWithNoCents(contract);
                        }
                    }

                    else
                    {   // ??????????????????????????????????????????????????????????????
                        if (contract.UseCents)
                            _repayNextInstallments = new FlateKeepNotExpectedInstallmentsWithCents(contract, pGeneralSettings);
                        else
                            _repayNextInstallments = new FlateKeepNotExpectedInstallmentsWithNoCents(contract, pGeneralSettings);
                    }
                }
            }
        }
Ejemplo n.º 19
0
        public RescheduleLoanEvent Reschedule(ReschedulingOptions ro, Loan contract, NonWorkingDateSingleton nwdS, ApplicationSettings applicationSettings)
        {
            _contract = contract;
            _nwdS = nwdS;
            _generalSettings = applicationSettings;

            switch (contract.Product.LoanType)
            {
                case OLoanTypes.Flat:
                    _Reschedule_Flat(ro);
                    break;

                case OLoanTypes.DecliningFixedPrincipal:
                    _Reschedule_FixedPrincipal(ro);
                    break;

                case OLoanTypes.DecliningFixedInstallments:
                    _Reschedule_DecliningFixedInstallments(ro);
                    break;
            }

            _Reschedule_AdjustOverpaid();

            RescheduleLoanEvent rSe = new RescheduleLoanEvent
                                          {
                                              Date = ro.ReschedulingDate,
                                              Amount = contract.CalculateActualOlb(),
                                              Interest = contract.GetTotalInterestDue(),
                                              ClientType = contract.ClientType,
                                              BadLoan = contract.BadLoan,
                                              NbOfMaturity = ro.NewInstallments,
                                              DateOffset = ro.RepaymentDateOffset,
                                              GracePeriod = ro.GracePeriod,
                                              ChargeInterestDuringShift = ro.ChargeInterestDuringShift,
                                              ChargeInterestDuringGracePeriod = ro.ChargeInterestDuringGracePeriod,
                                              InstallmentNumber =
                                                  contract.GetLastFullyRepaidInstallment() == null
                                                      ? 1
                                                      : contract.GetLastFullyRepaidInstallment().Number + 1
                                          };
            _contract.CalculateStartDates();
            return rSe;
        }
Ejemplo n.º 20
0
        public static OCurrency FeesBasedOnInitialAmount(Loan pContract, DateTime pDate, int pInstallmentNumber, bool pForClosure,
            ApplicationSettings pGeneralSettings, NonWorkingDateSingleton pNonWorkingDate)
        {
            if (pContract.NonRepaymentPenalties.InitialAmount != 0)
            {
                int pastDueDays = pForClosure ? pContract.CalculatePastDueForClosure(pDate) : pContract.CalculatePastDueSinceLastRepayment(pDate);
                pastDueDays = _CalculatePastDueWithGeneralParameterForRepayment(pastDueDays, pGeneralSettings);
                if (pContract.GracePeriodOfLateFees >= pastDueDays)
                {
                    pastDueDays = 0;
                }
                OCurrency fees = pContract.Amount * Convert.ToDecimal(pContract.NonRepaymentPenalties.InitialAmount) * (double)pastDueDays;

                OCurrency amount = pContract.UseCents ? Math.Round(fees.Value, 2, MidpointRounding.AwayFromZero) : Math.Round(fees.Value, 0, MidpointRounding.AwayFromZero);

                if (pContract.WrittenOff && pGeneralSettings.IsStopWriteOffPenalty)
                    amount = 0;
                return amount;
            }
            return 0;
        }
        public CalculateInstallmentsStrategy(CalculateInstallmentsOptions pCio, OCurrency pStartAmount, int pNumberOfInstallments, ApplicationSettings pGeneralSettings)
        {
            _generalSettings = pGeneralSettings;
            OCurrency initialOlbOfContractBeforeRescheduling = Loan.InitialOlbOfContractBeforeRescheduling;

            if (pCio.IsExotic)
            {
                if (pCio.LoanType == OLoanTypes.Flat)
                    _iCi = new Flat.ExoticStrategy(pCio.Contract, _generalSettings);
                else
                    _iCi = new Declining.ExoticStrategy(pCio.Contract, _generalSettings);
            }
            else
            {
                if (pCio.Contract.InterestRate == 0)
                {
                    _iCi = new FlatStrategy(pCio.Contract, _generalSettings, initialOlbOfContractBeforeRescheduling);
                }
                else
                {
                    switch (pCio.LoanType)
                    {
                        case OLoanTypes.Flat:
                            _iCi = new FlatStrategy(pCio.Contract, _generalSettings, initialOlbOfContractBeforeRescheduling);
                            break;
                        case OLoanTypes.DecliningFixedInstallments:
                            _iCi = new FixedInstallmentStrategy(pCio.Contract, pStartAmount, pNumberOfInstallments,
                                                                _generalSettings);
                            break;
                        case OLoanTypes.DecliningFixedPrincipal:
                            _iCi = new FixedPrincipalStrategy(pCio.Contract, _generalSettings);
                            break;
                        case OLoanTypes.DecliningFixedPrincipalWithRealInterest:
                            _iCi = new FixedPrincipalWithRealInterest(pCio.Contract, _generalSettings);
                            break;
                    }
                }
            }
        }
Ejemplo n.º 22
0
        public static bool CheckDegradeToBadLoan(Loan pLoan, ApplicationSettings settings, ProvisionTable pProvisionTable, DateTime pDate, bool authorizeSeveralPastDueEventByPeriod, int? pPstDueDays,User pUser)
        {
            DateTime date;
            int pastDueDays;
            if (pPstDueDays.HasValue)
            {
                pastDueDays = pPstDueDays.Value;
                date = pDate.AddDays(pastDueDays - pLoan.GetPastDueDays(pDate));
            }
            else
            {
                date = pDate;
                pastDueDays = pLoan.GetPastDueDays(date);
            }

            //In this case, the loan is not considered as bad loan
            if (pastDueDays < PAST_DUE_MIN_DAYS)
            {
                return false;
            }

           //A loan is only degraded from cash credit to bad loan one time
            OCurrency cashBalance = 0; //pLoan.ChartOfAccounts.GetAccountByNumber(OAccounts.CASH_CREDIT, pLoan.Product.Currency.Id, pLoan, OBookingDirections.Both).Balance;
            if (cashBalance != 0)
            {
                pLoan.BadLoan = true;
            }
            else
            {
                //Downgrading the loan to unrecoverable bad loans is done once for loan with past due days greater than 180
                if (pastDueDays > settings.BadLoanDays)
                {
                    pLoan.BadLoan = true;
                }
            }
            return true;
        }
Ejemplo n.º 23
0
        private static int CountDaysOff(DateTime beginDate, DateTime endDate, ApplicationSettings pGeneralSettings, 
            NonWorkingDateSingleton pNonWorkingDate)
        {
            var dt = new DateTime();
            int countDayOff = 0;

            if (!pGeneralSettings.IsCalculationLateFeesDuringHolidays)
            {
                //count day off
                for (int day = 1; day <= (endDate - beginDate).Days; day++)
                {
                    //week end
                    if (!pGeneralSettings.DoNotSkipNonWorkingDays)
                    if (((int)(dt.DayOfWeek) == pGeneralSettings.WeekEndDay1) || ((int)(dt.DayOfWeek) == pGeneralSettings.WeekEndDay2))
                        countDayOff++;
                    
                    //holidays
                    countDayOff += pNonWorkingDate.PublicHolidays.Keys.Count(publicHoliday => dt == publicHoliday);
                    dt = beginDate.AddDays(day);
                }
            }

            return countDayOff;
        }
 public void TestFixtureSetUp()
 {
     ProvisionTable provisionTable = ProvisionTable.GetInstance(new User());
     provisionTable.Add(new ProvisioningRate { Number = 1, NbOfDaysMin = 0, NbOfDaysMax = 30, ProvisioningValue = 10, ProvisioningInterest = 10, ProvisioningPenalty = 10 });
     provisionTable.Add(new ProvisioningRate { Number = 2, NbOfDaysMin = 31, NbOfDaysMax = 60, ProvisioningValue = 25, ProvisioningInterest = 25, ProvisioningPenalty = 25 });
     provisionTable.Add(new ProvisioningRate { Number = 3, NbOfDaysMin = 61, NbOfDaysMax = 90, ProvisioningValue = 50, ProvisioningInterest = 50, ProvisioningPenalty = 50 });
     provisionTable.Add(new ProvisioningRate { Number = 4, NbOfDaysMin = 91, NbOfDaysMax = 180, ProvisioningValue = 75, ProvisioningInterest = 75, ProvisioningPenalty = 75 });
     provisionTable.Add(new ProvisioningRate { Number = 5, NbOfDaysMin = 181, NbOfDaysMax = 365, ProvisioningValue = 100, ProvisioningInterest = 100, ProvisioningPenalty = 100 });
     provisionTable.Add(new ProvisioningRate { Number = 6, NbOfDaysMin = 366, NbOfDaysMax = 99999, ProvisioningValue = 100, ProvisioningInterest = 100, ProvisioningPenalty = 100 });
     nonWorkingDateHelper = NonWorkingDateSingleton.GetInstance("");
     nonWorkingDateHelper.WeekEndDay1 = 6;
     nonWorkingDateHelper.WeekEndDay2 = 0;
     nonWorkingDateHelper.PublicHolidays = new Dictionary<DateTime, string>
                                               {
                                                   {new DateTime(2006, 1, 1), "New Year Eve"},
                                                   {new DateTime(2006, 12, 25), "Christmas"}
                                               };
     dataParam = ApplicationSettings.GetInstance("");
     dataParam.DeleteAllParameters();
     dataParam.AddParameter(OGeneralSettings.PAYFIRSTINSTALLMENTREALVALUE, true);
     dataParam.AddParameter(OGeneralSettings.OLBBEFOREREPAYMENT, true);
     dataParam.AddParameter(OGeneralSettings.DONOTSKIPWEEKENDSININSTALLMENTSDATE, false);
     dataParam.AddParameter(OGeneralSettings.INCREMENTALDURINGDAYOFF, true);
 }
Ejemplo n.º 25
0
        public FixedPrincipalStrategy(Loan pContract, ApplicationSettings pGeneralSettings)
		{
            _contract = pContract;
            _roundingPoint = pContract.UseCents ? 2 : 0;
            _generalSettings = pGeneralSettings;
		}
        public void TestFixtureSetUp()
        {
            nonWorkingDateHelper = NonWorkingDateSingleton.GetInstance("");
            nonWorkingDateHelper.WeekEndDay1 = 6;
            nonWorkingDateHelper.WeekEndDay2 = 0;
            nonWorkingDateHelper.PublicHolidays = new Dictionary<DateTime, string>();
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,1,1),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,3,8),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,3,21),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,3,22),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,5,1),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,5,9),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,6,27),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,9,9),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,11,6),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,11,26),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,1,6),"Christmas");

            _provisionningTable = ProvisionTable.GetInstance(new User());
            _provisionningTable.ProvisioningRates = new List<ProvisioningRate>();
            _provisionningTable.Add(new ProvisioningRate { Number = 1, NbOfDaysMin = 0, NbOfDaysMax = 0, ProvisioningValue = 0.02 });
            _provisionningTable.Add(new ProvisioningRate { Number = 2, NbOfDaysMin = 1, NbOfDaysMax = 30, ProvisioningValue = 0.1 });
            _provisionningTable.Add(new ProvisioningRate { Number = 3, NbOfDaysMin = 31, NbOfDaysMax = 60, ProvisioningValue = 0.25 });
            _provisionningTable.Add(new ProvisioningRate { Number = 4, NbOfDaysMin = 61, NbOfDaysMax = 90, ProvisioningValue = 0.5 });
            _provisionningTable.Add(new ProvisioningRate { Number = 5, NbOfDaysMin = 91, NbOfDaysMax = 180, ProvisioningValue = 0.75 });
            _provisionningTable.Add(new ProvisioningRate { Number = 6, NbOfDaysMin = 181, NbOfDaysMax = 365, ProvisioningValue = 1 });
            _provisionningTable.Add(new ProvisioningRate { Number = 7, NbOfDaysMin = 366, NbOfDaysMax = 99999, ProvisioningValue = 1 });

            dataParam = ApplicationSettings.GetInstance("");
            dataParam.DeleteAllParameters();

            dataParam.AddParameter(OGeneralSettings.CALCULATIONLATEFEESDURINGPUBLICHOLIDAYS, true);
            dataParam.AddParameter(OGeneralSettings.DONOTSKIPWEEKENDSININSTALLMENTSDATE, false);
            dataParam.AddParameter(OGeneralSettings.ACCOUNTINGPROCESS, OAccountingProcesses.Cash);
            dataParam.AddParameter(OGeneralSettings.INCREMENTALDURINGDAYOFF, true);
            dataParam.AddParameter(OGeneralSettings.PAYFIRSTINSTALLMENTREALVALUE, true);
            dataParam.AddParameter(OGeneralSettings.STOP_WRITEOFF_PENALTY, true);
            dataParam.AddParameter(OGeneralSettings.BAD_LOAN_DAYS, "180");
            dataParam.AddParameter(OGeneralSettings.INTEREST_RATE_DECIMAL_PLACES, 2);
            dataParam.AddParameter(OGeneralSettings.USE_DAILY_ACCRUAL_OF_PENALTY, false);
        }
Ejemplo n.º 27
0
        private void Initialization()
        {
            _generalParameters = ServicesProvider.GetInstance().GetGeneralSettings();
            loanAmount = 0;
            textBoxGroupLoanCycle.Text = "0";
            InitializeUserControlsAddress();
            groupSaved = false;
            InitializeHistoryMembers();

            foreach (Branch branch in User.CurrentUser.Branches)
            {
                cbBranch.Items.Add(branch);
            }
        }
Ejemplo n.º 28
0
        private void DeleteAMember()
        {
            if (listViewOtherMembres.SelectedItems.Count != 0)
            {
                if (GroupHasActiveContracts())
                {
                    Member temPerson = (Member)listViewOtherMembres.SelectedItems[0].Tag;
                    if (group.Leader != null && temPerson.Tiers.Id == group.Leader.Tiers.Id)
                    {
                        MessageBox.Show(
                            MultiLanguageStrings.GetString(Ressource.GroupUserControl, "CannotDeleteLeader.Text"), "",
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Information);
                    }
                    else
                    {
                        try
                        {
                            if (group.Id != 0)
                                ServicesProvider.GetInstance().GetClientServices().CheckMinNumberOfMembers(group);

                            group.DeleteMember(temPerson);
                            historyPersons.Add(temPerson);
                            DisplayHistoryPersons(historyPersons);
                            DisplayMembers();
                            if (MembersChanged != null)
                                MembersChanged(this, null);
                            _generalParameters = ApplicationSettings.GetInstance("");
                            ServicesProvider.GetInstance().GetContractServices().DeleteLoanShareAmountWhereNotDisbursed(group.Id);
                            if (group.Id != 0)
                                buttonSave_Click(this, null);

                        }
                        catch (Exception ex)
                        {
                            new frmShowError(CustomExceptionHandler.ShowExceptionText(ex)).ShowDialog();
                        }

                    }
                }
            }
            else
            {
                string message = MultiLanguageStrings.GetString(Ressource.GroupUserControl, "SelectMember");
                MessageBox.Show(message, "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 29
0
        private void Initialization()
        {
            _generalParameters = ServicesProvider.GetInstance().GetGeneralSettings();
            loanAmount = 0;
            textBoxGroupLoanCycle.Text = "0";
            InitializeUserControlsAddress();
            groupSaved = false;
            InitializeHistoryMembers();

            foreach (Branch branch in User.CurrentUser.Branches)
            {
                cbBranch.Items.Add(branch);
            }

            dateTimePickerDateOfEstablishment.Format = DateTimePickerFormat.Custom;
            dateTimePickerDateOfEstablishment.CustomFormat = ApplicationSettings.GetInstance("").SHORT_DATE_FORMAT;
        }
Ejemplo n.º 30
0
 public NonWorkingDateManagement(string testDB)
     : base(testDB)
 {
     dbParam = ApplicationSettings.GetInstance("");
     nonWorkingDateHelper = NonWorkingDateSingleton.GetInstance("");
 }