Exemple #1
0
        public void BuatCashFlow()
        {
            string id             = _periode.GetId();
            string cabang         = _periode.GetCabang();
            double totalSales     = _sales.GetTotalSales();
            double totalSalesLain = _salesLain.GetTotalSalesLain();
            double totalNota      = _notaPengeluaran.GetTotalNota();

            var cashFlowEntry         = new CashFlowEntry(id, cabang, 20000.0, 30000.0, totalSales, totalSalesLain, totalNota);
            CashFlowEntryDto snapshot = cashFlowEntry.SnapShot();

            var expect = new CashFlowEntryDto()
            {
                Id             = id,
                Cabang         = cabang,
                SaldoAwal      = 20000.0,
                SaldoAkhir     = 30000.0,
                TotalSales     = totalSales,
                TotalSaleslain = totalSalesLain,
                TotalNota      = totalNota
            };

            Assert.AreEqual(expect, snapshot);
        }
 public void AddEntry(CashFlowEntry entry)
 {
     Entries.Add(entry);
 }
 public void AddEntry(int accountId, DateTime date, decimal  value)
 {
     var entry = new CashFlowEntry(accountId, date, value);
     Entries.Add(entry);
 }