Esempio n. 1
0
        public ContractChartOfAccounts Copy()
        {
            ContractChartOfAccounts chartOfAccounts = new ContractChartOfAccounts(_accounts)
            {
                _accountingRules = _accountingRules
            };

            return(chartOfAccounts);
        }
Esempio n. 2
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.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;
        }
Esempio n. 3
0
        public Loan(LoanProduct pAckage, OCurrency pAmount, decimal 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);
            CalculateStartDates();
        }
Esempio n. 4
0
 public ContractChartOfAccounts Copy()
 {
     ContractChartOfAccounts chartOfAccounts = new ContractChartOfAccounts(_accounts)
                                                   {_accountingRules = _accountingRules};
     return chartOfAccounts;
 }