Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { StreetAndNumber string `json:"street" yaml:"street" dynamodbav:"street"` PostCode string `json:"post-code" yaml:"post-code" dynamodbav:"post-code"` City string `json:"city" yaml:"city" dynamodbav:"city"` Country string `json:"country" yaml:"country" dynamodbav:"country"` }
Address - The address structure is used for both parties when rendering an invoice.
type Bank ¶
type Bank struct { Name string `json:"name" yaml:"name" dynamodbav:"name"` IBAN string `json:"iban" yaml:"iban" dynamodbav:"iban"` Swift string `json:"swift" yaml:"swift" dynamodbav:"swift"` }
Bank - These bank details are meant for the party that generated the invoice. Here is where the payment should go after the invoice is processed by the receiving party.
type Client ¶
type Client struct { ID string `json:"id" yaml:"id" dynamodbav:"id"` Name string `json:"name" yaml:"name" dynamodbav:"name"` Address *Address `json:"address" yaml:"address" dynamodbav:"address"` VATNumber string `json:"vat-number" yaml:"vat-number" dynamodbav:"vat-number"` }
Client - The details of the party receiving the invoice.
type Configuration ¶
type Configuration struct { HeaderText string `json:"header-text" yaml:"header-text" dynamodbav:"header-text"` LogoPath string `json:"logo-path" yaml:"logo-path" dynamodbav:"logo-path"` Issuer *Issuer `json:"issuer" yaml:"issuer" dynamodbav:"issuer"` Clients []Client `json:"clients" yaml:"clients" dynamodbav:"clients"` LastUsedID int `json:"last-used-id" yaml:"last-used-id" dynamodbav:"last-used-id"` // The ID of an invoice is "x/y" where "x" is a number that increments with every use and "y" is the year. If a new year has come, we need to start x from 1, not LastUsedID. YearForLastUsedID int `json:"year-for-last-used-id" yaml:"year-for-last-used-id" dynamodbav:"year-for-last-used-id"` SavedNotes [][]string `json:"saved-notes" yaml:"saved-notes" dynamodbav:"saved-notes"` OutputDirectory string `json:"output-directory" yaml:"output-directory" dynamodbav:"output-directory"` }
Configuration - The information that will be stored in order to fill in the template and generate the invoices on demand.
func (*Configuration) WriteToDisk ¶ added in v0.0.2
func (c *Configuration) WriteToDisk(cfgFile string) error
WriteToDisk - Write the configuration in place, where the specified configuration file is, to save it for later use
type Invoice ¶
type Invoice struct { HeaderText string `json:"header-text" yaml:"header-text" dynamodbav:"header-text"` LogoPath string `json:"logo-path" yaml:"logo-path" dynamodbav:"logo-path"` ID string `json:"id" yaml:"id" dynamodbav:"id"` IssueDate string `json:"issue-date" yaml:"issue-date" dynamodbav:"issue-date"` DueDate string `json:"due-date" yaml:"due-date" dynamodbav:"due-date"` Issuer *Issuer `json:"issuer" yaml:"issuer" dynamodbav:"issuer"` Client *Client `json:"client" yaml:"client" dynamodbav:"client"` Subject []string `json:"subject" yaml:"subject" dynamodbav:"subject"` ProvidedServices []ProvidedService `json:"provided-services" yaml:"provided-services" dynamodbav:"provided-services"` TotalNetPrice float64 `json:"total-net-price" yaml:"total-net-price" dynamodbav:"total-net-price"` TotalVATAmount float64 `json:"total-vat-amount" yaml:"total-vat-amount" dynamodbav:"total-vat-amount"` TotalGrossPrice float64 `json:"total-gross-price" yaml:"total-gross-price" dynamodbav:"total-gross-price"` Notes string `json:"notes" yaml:"notes" dynamodbav:"notes"` }
Invoice - The details of the party receiving the invoice.
type Issuer ¶
type Issuer struct { Name string `json:"name" yaml:"name" dynamodbav:"name"` Address *Address `json:"address" yaml:"address" dynamodbav:"address"` VATNumber string `json:"vat-number" yaml:"vat-number" dynamodbav:"vat-number"` IncomeSalesTaxNumber string `json:"income-sales-tax-number" yaml:"income-sales-tax-number" dynamodbav:"income-sales-tax-number"` Bank *Bank `json:"bank" yaml:"bank" dynamodbav:"bank"` }
Issuer - The details of the party generating the invoice.
type ProvidedService ¶
type ProvidedService struct { Name string `json:"name" yaml:"name" dynamodbav:"name"` Quantity int `json:"quantity" yaml:"quantity" dynamodbav:"quantity"` VATPercentage float64 `json:"vat-percentage" yaml:"vat-percentage" dynamodbav:"vat-percentage"` UnitPrice float64 `json:"unit-price" yaml:"unit-price" dynamodbav:"unit-price"` TotalNetPrice float64 `json:"total-net-price" yaml:"total-net-price" dynamodbav:"total-net-price"` VATAmount float64 `json:"vat-amount" yaml:"vat-amount" dynamodbav:"vat-amount"` TotalGross float64 `json:"total-gross" yaml:"total-gross" dynamodbav:"total-gross"` }
ProvidedService - The items that will be invoiced for will have this structure. Multiple can be present on an invoice.