Esempio n. 1
0
        public void TestIfLocalAccountNumberCorrectlyRetrievedWhenRepayAGoodLoan()
        {
            ChartOfAccounts chartOfAccounts = ChartOfAccounts.GetInstance(User.CurrentUser);

            Credit contract = contractForAPerson.Copy();

            contract.Disburse(new DateTime(2006, 1, 1), true, false);
            CashReceipt cashReceipt = new CashReceipt(contract, _person, 0, "USD", "en-US", new ExchangeRate(new DateTime(2006, 3, 1), 3), new DateTime(2006, 3, 1), false, User.CurrentUser, GeneralSettings.GetInstance(""), ChartOfAccounts.GetInstance(User.CurrentUser), true);

            Assert.AreEqual(chartOfAccounts.GetAccountByNumber(OAccounts.INTERESTS_ON_CASH_CREDIT_INDIVIDUAL_LOAN).LocalNumber, cashReceipt.InterestLocalAccountNumber);
            Assert.AreEqual(chartOfAccounts.GetAccountByNumber(OAccounts.CASH_CREDIT_INDIVIDUAL_LOAN).LocalNumber, cashReceipt.PrincipalLocalAccountNumber);
            Assert.AreEqual(chartOfAccounts.GetAccountByTypeCode("COMMISSIONS").LocalNumber, cashReceipt.FeesLocalAccountNumber);
        }
 public void TestGetAccountByNumber()
 {
     Assert.AreEqual("CASH", chartOfAccounts.GetAccountByNumber("1011", 1).TypeCode);
 }