posting

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpsertAll

func UpsertAll(db *gorm.DB, postings []*Posting)

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             float64   `json:"quantity"`
	Amount               float64   `json:"amount"`
	Status               string    `json:"status"`
	TagRecurring         string    `json:"tag_recurring"`
	TransactionBeginLine uint64    `json:"transaction_begin_line"`
	TransactionEndLine   uint64    `json:"transaction_end_line"`
	FileName             string    `json:"file_name"`

	MarketAmount float64 `gorm:"-:all" json:"market_amount"`
}

func (*Posting) AddAmount added in v0.2.5

func (p *Posting) AddAmount(amount float64)

func (*Posting) AddQuantity added in v0.2.2

func (p *Posting) AddQuantity(quantity float64)

func (Posting) GroupDate added in v0.4.5

func (p Posting) GroupDate() time.Time

func (Posting) Negate added in v0.4.3

func (p Posting) Negate() Posting

func (*Posting) Price added in v0.2.2

func (p *Posting) Price() float64

func (*Posting) RestName added in v0.2.8

func (p *Posting) RestName(level int) string

func (Posting) WithQuantity added in v0.2.6

func (p Posting) WithQuantity(quantity float64) Posting

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL