Documentation ¶
Index ¶
- Constants
- func DivideTimesRate(a, b, rate float64) float64
- func Euro(a, rate float64) float64
- func Half(a float64) float64
- func HalfTimesRate(a, rate float64) float64
- func Kenmerk(now time.Time) string
- func TeXFiles(dir string) ([]string, error)
- type Invoice
- func (i *Invoice) CalendarLink(t1, t2 time.Time) string
- func (i *Invoice) Create(tmplDir, tmpl string) ([]byte, error)
- func (i *Invoice) ExecuteTemplateAndWrite(t *template.Template, name, dst string) error
- func (i *Invoice) FillOut() (err error)
- func (i *Invoice) MailBody() (*bytes.Buffer, error)
- func (i *Invoice) MailSubject() string
- type InvoiceMail
Constants ¶
View Source
const Template = "invoice.tex.tmpl"
Variables ¶
This section is empty.
Functions ¶
func DivideTimesRate ¶
func HalfTimesRate ¶
Types ¶
type Invoice ¶
type Invoice struct { FileName string // Name of the generated PDF. Kenmerk string // Unique kenmerk of this invoice. Tour string Persons int Time string Duration string // 2:00 Cost float64 Date string // YYYY/MM/DD form Name string FullName string Email string // Has become optional. Where string // Where to pickup. How string // Ends in "om". Rate float64 // current GBP:EUR rate, autofill Day string // autofill OrigDate string // original values of Time and Data (before we converted to NL). OrigTime string }
Invoice holds all the data we need to generate an invoice
func (*Invoice) CalendarLink ¶
CalendarLink returns a Google calendar link that can be used to add the tour directly in the calendar.
func (*Invoice) Create ¶
Create parses the templates and runs pdflatex on the resulting tex file. It returns generated PDF.
func (*Invoice) ExecuteTemplateAndWrite ¶
ExecuteTemplateAndWrite executes the template and writes the buffer to dst.
func (*Invoice) FillOut ¶
FillOut fills in these missing fields in i, such as: Rate, Day, Filename and makes Date Dutch.
func (*Invoice) MailSubject ¶
type InvoiceMail ¶
Invoice is a customer invoice form.
Click to show internal directories.
Click to hide internal directories.