accounting

package
v0.0.0-...-22fa60e Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coinlot

type Coinlot struct {
	Date      time.Time
	Currency  string
	Quantity  decimal.Decimal
	UnitPrice decimal.Decimal
	SalePrice decimal.Decimal
	CostBasis decimal.Decimal
}

func (*Coinlot) String

func (coinlot *Coinlot) String() string

type Form8949

type Form8949 struct {
	LongHolds  []Form8949LineItem
	ShortHolds []Form8949LineItem
}

func (*Form8949) WriteCSV

func (form *Form8949) WriteCSV(filename string) error

type Form8949LineItem

type Form8949LineItem struct {
	Currency         string
	Description      string
	DateAcquired     time.Time
	DateSold         time.Time
	Proceeds         string
	CostBasis        string
	AdjustmentCode   string
	AdjustmentAmount string
	GainOrLoss       string
}

func (*Form8949LineItem) Record

func (item *Form8949LineItem) Record() []string

type Report

type Report struct {
	Transactions []common.Transaction
	Deposits     []common.Transaction
	Withdrawals  []common.Transaction
	Trades       []common.Transaction
	Income       []common.Transaction
	Spends       []common.Transaction
	// contains filtered or unexported fields
}

func NewFifoReport

func NewFifoReport(ctx common.Context, transactions []common.Transaction) *Report

func (*Report) Run

func (report *Report) Run(start, end time.Time) *Form8949

Jump to

Keyboard shortcuts

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