mandiri

package
v0.0.0-...-11fa6ca Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScanFromBytes

func ScanFromBytes(filename string, pdfReader pdf.PDFReader) (*types.ScanResult, error)

Types

type Header struct {
	Product  string
	Rekening string
	Periode  string
}

type Transaction

type Transaction struct {
	Date         time.Time `json:"date,omitempty"`
	Description1 string    `json:"description1,omitempty"`
	Description2 string    `json:"description2,omitempty"`
	Branch       string    `json:"branch,omitempty"`
	Change       float64   `json:"change,omitempty"`
	DirectionCr  *bool     `json:"directionCr,omitempty"`
	Balance      float64   `json:"balance,omitempty"`
}

func IngestRow

func IngestRow(
	prevT *Transaction,
	row *types.Row,
	year string,
) (isNew bool, t *Transaction, shouldStopProcessing bool)

a row with a new date signifies a new transaction

as a PDF text row might not be a new transaction, but adds detail to the previous transaction, prevT is added as argument to add transaction detail

the returned isNew tells whether the returned *transaction is a new transaction that should be added to a transaction slice

type Transactions

type Transactions []*Transaction

Jump to

Keyboard shortcuts

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