invoice

package
v0.0.0-...-a449dc4 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: BSD-2-Clause Imports: 24 Imported by: 0

Documentation

Overview

UBL XML Invoice https://www.jortt.nl/online-boekhouden/ubl-factuur/

Index

Constants

View Source
const EUTaxComment = "VAT Reverse charge"

Variables

This section is empty.

Functions

func Balance

func Balance(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Parse bankbalance in CAMT053-format

func Delete

func Delete(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Email

func Finalize

func Finalize(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Lock invoice for changes and set invoiceid

func HourToInvoice

func HourToInvoice(entity, year, project, name, hourStr, email, hourFile, from string, t *db.Txn) (string, error)

Convert hours to concept invoice

func List

func Load

func NextInvoiceID

func NextInvoiceID(entity string, t *db.Txn) (uint64, error)

Mark invoice as paid

func Pdf

func Reset

func Save

func Text

func UBL

func UBL(u *Invoice) (*bytes.Buffer, error)

func Xml

Types

type Counter

type Counter struct {
	InvoiceID uint64
}

type InputError

type InputError struct {
	Error  string
	Fields validator.ErrorMap
}

type Invoice

type Invoice struct {
	Company  string `validate:"nonzero"`
	Entity   InvoiceEntity
	Customer InvoiceCustomer
	Meta     InvoiceMeta
	Lines    []InvoiceLine
	Notes    string
	Total    InvoiceTotal
	Bank     InvoiceBank
	Mail     InvoiceMail
}

type InvoiceBank

type InvoiceBank struct {
	Vat  string `validate:"nonzero"`
	Coc  string `validate:"nonzero"`
	Iban string `validate:"nonzero,iban"`
	Bic  string `validate:"nonzero,bic"`
}

type InvoiceCustomer

type InvoiceCustomer struct {
	Name    string `validate:"nonzero"`
	Street1 string `validate:"nonzero"`
	Street2 string `validate:"nonzero"`
	Vat     string
	Coc     string
}

type InvoiceEntity

type InvoiceEntity struct {
	Name    string `validate:"nonzero"`
	Street1 string `validate:"nonzero"`
	Street2 string `validate:"nonzero"`
}

type InvoiceLine

type InvoiceLine struct {
	Description string `validate:"nonzero"`
	Quantity    string `validate:"nonzero,qty"`
	Price       string `validate:"nonzero,price"`
	Total       string `validate:"nonzero,price"`
}

type InvoiceMail

type InvoiceMail struct {
	From    string
	Subject string
	To      string
	Body    string
}

type InvoiceMeta

type InvoiceMeta struct {
	Conceptid string `validate:"slug"`
	Status    string `validate:"slug"`
	Invoiceid string `validate:"slug"`
	Issuedate string `validate:"date"`
	Ponumber  string `validate:"slug"`
	Duedate   string `validate:"nonzero,date"`
	Paydate   string `validate:"date"`
	Freefield string
	HourFile  string
}

type InvoiceTotal

type InvoiceTotal struct {
	Ex    string `validate:"nonzero,price"`
	Tax   string `validate:"nonzero,price"`
	Total string `validate:"nonzero,price"`
}

type Job

type Job struct {
	To      []string
	Subject string
	Text    string
	Files   []string
}

type ListReply

type ListReply struct {
	Invoices map[string][]*Invoice
	Commits  []*db.CommitMessage
}

type Reply

type Reply struct {
	OK  int
	ERR int
}

Directories

Path Synopsis
camt053 implements low-level XML parsing of the banktransaction file.
camt053 implements low-level XML parsing of the banktransaction file.

Jump to

Keyboard shortcuts

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