Txn class

Constructors

Txn({int? amountCents, String? category, String? categoryName, String? date, String? description, String? source_, String? vendor, int? voucherId})
Returns a new Txn instance.

Properties

amountCents ↔ int?
AmountCents is the voucher's total, in whole cents — its total debit, which equals its total credit because every voucher balances. It is the size of the entry and carries no direction; the category says which way it went.
getter/setter pair
category ↔ String?
Category is the chart-of-accounts NUMBER of the income or expense account this voucher touched — where it lands on the P&L, not a free-text label.
getter/setter pair
categoryName ↔ String?
CategoryName is that account's human name, so a caller need not carry the chart to render the row.
getter/setter pair
date ↔ String?
Date is when the voucher POSTED — the accounting date the reports window on, which for an imported bank row is the bank's date and not the day it landed here.
getter/setter pair
description ↔ String?
Description is the line a person reads: the memo carried in from the source.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source_ ↔ String?
Source is where the entry came from: bank_txn for an imported statement line, scan for a receipt or bill read by the scanner, commerce_txn for a sale booked by the store.
getter/setter pair
vendor ↔ String?
Vendor is the counterparty, resolved from whatever the source knew — a bank row's merchant, a scanned bill's supplier. Absent when the source named none.
getter/setter pair
voucherId ↔ int?
VoucherID identifies the underlying double-entry voucher, so a caller can open the full set of legs behind this single register line.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → Txn?
Returns a new Txn instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Txn>
mapFromJson(dynamic json) → Map<String, Txn>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Txn>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.