コード例 #1
0
ファイル: GncAccount.cs プロジェクト: rstarkov/GnuCashSharp
        public GncCommodityAmount GetTotalConverted(DateInterval interval, bool withSubaccts, GncCommodity convertTo)
        {
            var result = new GncCommodityAmount(0, convertTo);

            foreach (var split in EnumSplits(withSubaccts).Where(spl => interval.Contains(spl.Transaction.DatePosted)))
            {
                result += split.AmountConverted(convertTo);
            }
            return(result);
        }
コード例 #2
0
ファイル: GncAccount.cs プロジェクト: rstarkov/GnuCashSharp
        public GncCommodityAmount GetBalanceConverted(DateTime asOf, bool withSubaccts, GncCommodity convertTo)
        {
            var result = new GncCommodityAmount(0, convertTo);

            foreach (var split in EnumSplits(withSubaccts).Where(spl => spl.Transaction.DatePosted <= asOf))
            {
                result += split.AmountConverted(convertTo);
            }
            return(result.WithTimepoint(asOf));
        }
コード例 #3
0
ファイル: GncAccount.cs プロジェクト: rstarkov/GnuCashSharp
        public GncCommodityAmount GetTotal(DateInterval interval)
        {
            var result = new GncCommodityAmount(0, Commodity);

            foreach (var split in EnumSplits(false).Where(spl => interval.Contains(spl.Transaction.DatePosted)))
            {
                result += split.Amount;
            }
            return(result);
        }
コード例 #4
0
ファイル: GncAccount.cs プロジェクト: rstarkov/GnuCashSharp
        public GncCommodityAmount GetBalance(DateTime asOf)
        {
            var result = new GncCommodityAmount(0, Commodity);

            foreach (var split in EnumSplits(false).Where(spl => spl.Transaction.DatePosted <= asOf))
            {
                result += split.Amount;
            }
            return(result.WithTimepoint(asOf));
        }