invoice

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

ciicodes

Index

Constants

View Source
const (
	CURRENCIES string = "currencies"
	COUNTRIES  string = "countries"
	UNITS      string = "units"
	PAYMENTS   string = "payments"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Street  string
	Zip     string
	City    string
	Country *CacheItem // ISO 3166
}

type CacheItem

type CacheItem struct {
	ID    string // stunden
	Code  string // XRechnung (HUR)
	Label string // PDF (Std)
}

func (*CacheItem) GetCode

func (c *CacheItem) GetCode() string

func (*CacheItem) GetLabel

func (c *CacheItem) GetLabel() string

type Contact

type Contact struct {
	Name  string
	Phone string
	Email string
	Fax   string
}

type Footers

type Footers struct {
	Addresses string
	Contacts  string
	Bank      string
	Legal     string
}

type Headers

type Headers struct {
	SenderLine  string
	PostalNote1 string
	PostalNote2 string
	PostalNote3 string
	Department  string
	InfoDate    time.Time
}

type Invoice

type Invoice struct {
	// Identität & Kontext
	InvoiceID string
	Profile   Profile    // EN16931 (enum)
	Currency  *CacheItem // ISO 4217
	IssueDate time.Time

	// Parteien
	Seller Party
	Buyer  Party

	// Referenzen & Perioden
	BuyerReference string
	ServicePeriod  *ServicePeriod
	ServiceDate    time.Time

	// Inhalte
	Lines  []LineItem
	Vats   []VatItem
	Totals Totals

	// Zahlungsbedingungen
	PaymentTerms *PaymentTerms
	PaymentMean  *CacheItem
}

type LineItem

type LineItem struct {
	Pos         int
	ID          string
	Description string

	Quantity  float64
	Unit      *CacheItem // normiert (UNECE)
	UnitPrice float64

	LineTotal float64
	TaxRate   float64
}

type Mandant

type Mandant struct {
	MandantID string
	Seller    string
}

type Options

type Options struct {
	Queue          string
	PDFSource      string
	TemplateSource string
	FacturXSource  string
	Attachments    []string
}

type Party

type Party struct {
	ID      string // interne Referenz
	Name    string
	Name2   string
	Name3   string
	Address Address
	Contact *Contact
	IBAN    string
	TaxID   string // VAT-ID
}

type Paths

type Paths struct {
	OTTfile     string
	ODTfile     string
	PDFfile     string
	PARfile     string
	XMLfile     string
	PARtemplate string
	XMLtemplate string
}

type PaymentTerms

type PaymentTerms struct {
	DueDate     time.Time
	Description string
}

type Profile

type Profile string
const (
	ProfileEN16931 Profile = "EN16931"
	SepaCT                 = "58"
)

type ServicePeriod

type ServicePeriod struct {
	Start time.Time
	End   time.Time
}

type Totals

type Totals struct {
	LineTotalAmount      float64
	TaxExclusiveAmount   float64
	ChargeTotalAmount    float64
	AllowanceTotalAmount float64
	DuePayableAmount     float64
	TaxTotalAmount       float64
	GrandTotalAmount     float64
}

type VatItem

type VatItem struct {
	TaxRate     float64
	Category    string // S, Z, AE, ...
	Description string
	BasisAmount float64
	VatAmount   float64
}

type ZUGFeRDmaster

type ZUGFeRDmaster struct {
	Mandant *Mandant
	Options *Options
	Invoice *Invoice
	Paths   *Paths
	Headers *Headers
	Footers *Footers
}

func New

func New() *ZUGFeRDmaster

func (*ZUGFeRDmaster) CsvLoader

func (m *ZUGFeRDmaster) CsvLoader(searchKey string, source string) (interface{}, error)

Loader für cache

func (*ZUGFeRDmaster) NormalizeAndValidate

func (m *ZUGFeRDmaster) NormalizeAndValidate(in *input.InputJob) error

Jump to

Keyboard shortcuts

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