struct

Finfry::Transaction

Inherits JSON::Serializable < Struct < Value < Object

A double-entry transaction: a dated, described set of postings whose signed amounts must sum to zero.

Constructors

new(id : Int32, date : String, description : String, postings : Array(Finfry::Posting), recurrence : Nil | String = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

balanced?
Source
date
Source
date=(date : String)
Source
description
Source
description=(description : String)
Source
imbalance

Sum of all posting amounts; zero for a balanced transaction.

Source
in_month?(month : String) : Bool
Source
postings
Source
postings=(postings : Array(Posting))
Source
recurrence

Cadence this transaction recurs on (e.g. "monthly"), or nil for one-offs. Used only for per-day amortization, not for auto-posting.

Source
recurrence=(recurrence : String | Nil)

Cadence this transaction recurs on (e.g. "monthly"), or nil for one-offs. Used only for per-day amortization, not for auto-posting.

Source
touches?(account : String) : Bool

True if any posting touches account or one of its descendants.

Source