Documentation ¶
Index ¶
- Constants
- func Behaviours(account string) []string
- func UpsertAll(db *gorm.DB, postings []*Posting)
- type Posting
- func (p *Posting) AddAmount(amount decimal.Decimal)
- func (p *Posting) AddQuantity(quantity decimal.Decimal)
- func (p Posting) Behaviours() []string
- func (p Posting) GroupDate() time.Time
- func (p Posting) HasBehaviour(behaviour string) bool
- func (p Posting) Negate() Posting
- func (p *Posting) Price() decimal.Decimal
- func (p *Posting) RestName(level int) string
- func (p Posting) Split(amount decimal.Decimal) (Posting, Posting)
- func (p Posting) WithAmount(amount decimal.Decimal) Posting
- func (p Posting) WithQuantity(quantity decimal.Decimal) Posting
Constants ¶
View Source
const ( ASSETS = "assets" ASSETS_CASH = "assets:cash" INCOME = "income" INCOME_INTEREST = "income:interest" INCOME_DIVIDEND = "income:dividend" INCOME_CAPITAL_GAINS = "income:capital_gains" EXPENSES = "expenses" EXPENSES_CHARGES = "expenses:charges" EXPENSES_TAXES = "expenses:taxes" LIABILITIES = "liabilities" )
Variables ¶
This section is empty.
Functions ¶
func Behaviours ¶ added in v0.5.6
Types ¶
type Posting ¶
type Posting struct { ID uint `gorm:"primaryKey" json:"id"` TransactionID string `json:"transaction_id"` Date time.Time `json:"date"` Payee string `json:"payee"` Account string `json:"account"` Commodity string `json:"commodity"` Quantity decimal.Decimal `json:"quantity"` Amount decimal.Decimal `json:"amount"` Status string `json:"status"` TagRecurring string `json:"tag_recurring"` TagPeriod string `json:"tag_period"` TransactionBeginLine uint64 `json:"transaction_begin_line"` TransactionEndLine uint64 `json:"transaction_end_line"` FileName string `json:"file_name"` Forecast bool `json:"forecast"` Note string `json:"note"` TransactionNote string `json:"transaction_note"` MarketAmount decimal.Decimal `gorm:"-:all" json:"market_amount"` Balance decimal.Decimal `gorm:"-:all" json:"balance"` // contains filtered or unexported fields }
func (*Posting) AddQuantity ¶ added in v0.2.2
func (Posting) Behaviours ¶ added in v0.5.6
func (Posting) HasBehaviour ¶ added in v0.5.6
func (Posting) WithAmount ¶ added in v0.6.7
Click to show internal directories.
Click to hide internal directories.