public AccountingJournals(int mode) { InitializeComponent(); _accountingClosure = new AccountingClosure(); _mode = mode; initializeDateTimePickersFormatting(); }
private void olvClosures_FormatRow(object sender, FormatRowEventArgs e) { AccountingClosure closure = (AccountingClosure)e.Model; if (closure.Deleted) { e.Item.ForeColor = Color.Gray; } }
public void TestClosureEventWithCurrency() { EventStock eventStock = new EventStock { new LoanDisbursmentEvent { Id = 1, Date = new DateTime(2000, 1, 1), Amount = 100, PaymentMethod = new PaymentMethod { Id = 0 }, ClientType = OClientTypes.Person, EconomicActivity = new EconomicActivity(1, "Agriculture", null, false), Currency = new Currency { Id = 1 } }, new RepaymentEvent { Id = 2, Principal = 100, Interests = 5, Penalties = 1, Commissions = 0, Date = new DateTime(2000, 1, 1), Currency = new Currency { Id = 1 }, ClientType = OClientTypes.Person }, }; eventStock.GetRepaymentEvents()[0].LoanProduct = new LoanProduct { Id = 2, Code = "EDE60", Name = "EDEN 60", Currency = new Currency { Id = 1 } }; AccountingClosure closure = new AccountingClosure(); List <FiscalYear> fYears = new List <FiscalYear> { new FiscalYear { OpenDate = new DateTime(1900, 1, 1) } }; List <Booking> bookings = closure.GetBookings(_rules, eventStock, null, null, null, fYears); Assert.AreEqual(bookings[0].Amount, 100); Assert.AreEqual(bookings[0].DebitAccount.Number, "1052"); Assert.AreEqual(bookings[0].CreditAccount.Number, "1020"); }
public void TestClosureTellerEvents() { EventStock eventStock = new EventStock { new TellerCashInEvent { Id = 1, Amount = 1000, Currency = new Currency { Id = 1 }, Date = new DateTime(2000, 1, 1), TellerId = 2 } }; eventStock.Add(new EventStock { new TellerCashOutEvent { Id = 2, Amount = 267, Currency = new Currency { Id = 1 }, Date = new DateTime(2000, 1, 1), TellerId = 3 } }); List <FiscalYear> fYears = new List <FiscalYear> { new FiscalYear { OpenDate = new DateTime(1900, 1, 1) } }; AccountingClosure closure = new AccountingClosure(); List <Booking> bookings = closure.GetBookings(_rules, eventStock, _tellers, null, null, fYears); Assert.AreEqual(bookings[0].Amount, 1000); Assert.AreEqual(bookings[0].CreditAccount.Number, "1991"); Assert.AreEqual(bookings[0].DebitAccount.Number, "1999"); Assert.AreEqual(bookings[1].Amount, 267); Assert.AreEqual(bookings[1].CreditAccount.Number, "1999"); Assert.AreEqual(bookings[1].DebitAccountNumber, "1992"); }
public void TestClosureLodeEvent() { EventStock eventStock = new EventStock { new LoanDisbursmentEvent { Id = 1, Amount = 100, Date = new DateTime(2000, 1, 1), EconomicActivity = new EconomicActivity(1, "Agriculture", null, false), ClientType = OClientTypes.Person, PaymentMethod = new PaymentMethod { Id = 0 }, LoanProduct = new LoanProduct { Id = 1, Code = "EDE34", Name = "EDEN 34", Currency = new Currency { Id = 1 } }, Currency = new Currency { Id = 0 } } }; List <FiscalYear> fYears = new List <FiscalYear> { new FiscalYear { OpenDate = new DateTime(1900, 1, 1) } }; AccountingClosure closure = new AccountingClosure(); List <Booking> bookings = closure.GetBookings(_rules, eventStock, null, null, null, fYears); Assert.AreEqual(bookings[0].Amount, 100); Assert.AreEqual(bookings[0].DebitAccount.Number, "1052"); Assert.AreEqual(bookings[0].CreditAccount.Number, "1020"); }
public AccountingJournals(int mode) { InitializeComponent(); _accountingClosure = new AccountingClosure(); _mode = mode; }
public AccountingJournals() { InitializeComponent(); _accountingClosure = new AccountingClosure(); }