Ejemplo n.º 1
0
 public ContractChartOfAccounts Copy()
 {
     ContractChartOfAccounts chartOfAccounts = new ContractChartOfAccounts(_accounts);
     chartOfAccounts._accountingRules = _accountingRules;
     //foreach (Account account in _accounts)
     //{
     //    chartOfAccounts.GetAccountByNumber(account.Number, account.Currency_Id).Balance = account.Balance;
     //    chartOfAccounts.GetAccountByNumber(account.Number, account.Currency_Id).StockBalance = account.StockBalance;
     //}
      //   chartOfAccounts.Accounts = _accounts;
     return chartOfAccounts;
 }
Ejemplo n.º 2
0
        public Loan(LoanProduct pAckage, OCurrency pAmount, double pInterestRate, int pNbOfInstallments, int pGracePeriod,
                      DateTime pStartDate, User pUser, ApplicationSettings pGeneralSettings, NonWorkingDateSingleton pNwds, 
                        ProvisionTable pPt, ContractChartOfAccounts pChartOfAccounts)
        {
            _user = pUser;
            _generalSettings = pGeneralSettings;
            _nwdS = pNwds;

            NonRepaymentPenalties = new NonRepaymentPenalties();
            _events = new EventStock();
            _guarantors = new List<Guarantor>();
            _collaterals = new List<ContractCollateral>();
            _chartOfAccounts = pChartOfAccounts;
            Product = pAckage;
            _installmentType = pAckage.InstallmentType;
            _amount = pAmount;
            _interestRate = pInterestRate;
            _nbOfInstallments = pNbOfInstallments;
            GracePeriod = pGracePeriod;
            GracePeriodOfLateFees = pAckage.GracePeriodOfLateFees;
            CreationDate = pStartDate;
            _startDate = pStartDate;

            _firstInstallmentDate = CalculateInstallmentDate(pStartDate, 1);
            _alignAlignDisbursementDate = pStartDate;

            //with this constructor, installment are directly calculated when a new CreditContract is instanciated
            _installmentList = CalculateInstallments(true);
            EntryFeesPercentage = pAckage.EntryFeesPercentage;
        }
Ejemplo n.º 3
0
        protected ContractChartOfAccounts _FillChartOfAccounts(ChartOfAccounts pChartOfAccounts)
        {
            ContractChartOfAccounts contractChartOfAccounts;
            if (pChartOfAccounts.UniqueAccounts.Count > 0)
                contractChartOfAccounts = new ContractChartOfAccounts(pChartOfAccounts.UniqueAccounts.
                    Select(item => new Account(item.Number, item.LocalNumber, item.Label, 0, item.TypeCode, item.DebitPlus, item.AccountCategory, Product != null && Product.Currency != null ? Product.Currency.Id : 1)).ToList());
            else
                contractChartOfAccounts = new ContractChartOfAccounts(pChartOfAccounts.DefaultAccounts.ToList());

            contractChartOfAccounts.AccountingRuleCollection = pChartOfAccounts.AccountingRuleCollection;

            return contractChartOfAccounts;
        }