Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BankDetails ¶
type BankDetails struct { TransferType string `yaml:"transfer_type"` Name string Address string AccountType string `yaml:"account_type"` AccountNumber string `yaml:"account_number"` RoutingNumber string `yaml:"routing_number"` IBAN string SortCode string `yaml:"sort_code"` SWIFTBIC string `yaml:"swift_bic"` }
func (*BankDetails) Strings ¶
func (b *BankDetails) Strings() []string
type Bill ¶
type Bill struct {
// contains filtered or unexported fields
}
func (*Bill) RenderToFile ¶
type BillDetails ¶
type BillDetails struct { Department string `yaml:"department"` Currency string `yaml:"currency"` PaymentTerms string `yaml:"payment_terms"` DueDate string `yaml:"due_date"` Date string `yaml:"date"` }
func (*BillDetails) Strings ¶
func (b *BillDetails) Strings() []string
type BillToDetails ¶
type BillableItem ¶
type BillableItem struct { Quantity float64 Description string UnitPrice float64 `yaml:"unit_price"` Currency string }
func (*BillableItem) Strings ¶
func (b *BillableItem) Strings() []string
func (*BillableItem) Total ¶
func (b *BillableItem) Total() float64
type BillingConfig ¶
type BillingConfig struct { Business *BusinessDetails `yaml:"business"` Bill *BillDetails `yaml:"bill"` BillTo *BillToDetails `yaml:"bill_to"` Billables []BillableItem `yaml:"billables"` Bank *BankDetails `yaml:"bank"` Colors *BillColor `yaml:"colors"` }
func ParseConfig ¶
func ParseConfig(filename string, billingDate string) (*BillingConfig, error)
ParseConfig parses the YAML config file which contains the settings for the bill we're going to process. It uses a simple FuncMap to template the text, allowing the billing items to describe the current date range.
type BusinessDetails ¶
Click to show internal directories.
Click to hide internal directories.