invoice

package
v0.0.0-...-52ba237 Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(config Config) error

Types

type Address

type Address struct {
	Country     string `yaml:"country"`
	State       string `yaml:"state"`
	City        string `yaml:"city"`
	PostalCode  string `yaml:"postal_code"`
	Street      string `yaml:"street"`
	HouseNumber string `yaml:"house_number"`
}

type Bank

type Bank struct {
	Name  string `yaml:"name"`
	BIC   string `yaml:"bic"`
	IBAN  string `yaml:"iban"`
	SWIFT string `yaml:"swift"`
}

type Client

type Client struct {
	Company         Company `yaml:"company"`
	MaxPaymentDelay string  `yaml:"max_payment_delay"`
}

type Company

type Company struct {
	Name      string  `yaml:"name"`
	Address   Address `yaml:"address"`
	TaxNumber string  `yaml:"tax_number"`
	VATNumber string  `yaml:"vat_number"`
	Bank      Bank    `yaml:"bank"`
}

type Config

type Config struct {
	Client          Client           `yaml:"client"`
	Self            Self             `yaml:"self"`
	TemplatePath    string           `yaml:"template_path"`
	WorkHoursSource workhours.Source `yaml:"work_hours_source"`

	Year  int
	Month int
}

func ParseConfig

func ParseConfig(path string) (Config, error)

type Self

type Self struct {
	Company Company `yaml:"company"`
	Service Service `yaml:"service"`
}

type Service

type Service struct {
	Name     string `yaml:"name"`
	Currency string `yaml:"currency"`
	PerHour  int    `yaml:"per_hour"`
	PerMonth int    `yaml:"per_month"`
}

type TemplateData

type TemplateData struct {
	Client    Client           `json:"client"`
	Self      Self             `json:"self"`
	WorkHours workhours.Report `json:"work_hours"`
}

Jump to

Keyboard shortcuts

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