bl

package
v0.0.0-...-7b2f526 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package bl provides a simplified interface to GOBL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Number      string
	Street      string
	StreetExtra string
	Locality    string
	Code        string
	Country     string
}

func (*Address) GOBLAddress

func (a *Address) GOBLAddress() *org.Address

type Amount

type Amount = num.Amount

type BillLine

type BillLine struct {
	Quantity    int
	Name        string
	Description string
	Price       Amount
}

type CreditTransfer

type CreditTransfer struct {
	Bank string
	IBAN IBAN
}

type Currency

type Currency = currency.Code

type Date

type Date = cal.Date

type Delivery

type Delivery struct {
	Date   *Date
	Period Period
}

type IBAN

type IBAN string

type Invoice

type Invoice struct {
	*InvoiceSrc
	IssueTime time.Time
	Supplier  *Party
	Customer  *Party

	Currency Currency
	Totals   Totals

	ZUGFeRDV2XML []byte
	// contains filtered or unexported fields
}

func (*Invoice) Calculate

func (inv *Invoice) Calculate() error

func (*Invoice) GOBLData

func (inv *Invoice) GOBLData() *gobl.Envelope

type InvoiceSrc

type InvoiceSrc struct {
	Code       string
	CustomerID string
	SupplierID string
	Ordering   Ordering

	Delivery Delivery

	Lines []BillLine
}

type Name

type Name = org.Name

type Ordering

type Ordering struct {
	Code        string // FIXME N/A if empty
	ProjectID   string // FIXME
	ProjectName string
}

type Party

type Party struct {
	ID            string
	Name          string
	TradeName     string
	Address       Address
	ReturnAddress string
	Email         string
	Phone         string
	Contact       Person
	MachineEmail  string
	TaxID         string
	Payments      Payments
}

type Payments

type Payments struct {
	Terms struct {
		DueDays int
	}
	Instr struct {
		SEPA *CreditTransfer
	}
}

type Period

type Period = cal.Period

type Person

type Person struct {
	Name       Name
	Department string
	Email      string
}

type TaxAmount

type TaxAmount struct {
	Pct Amount
	Tax Amount
}

type Totals

type Totals struct {
	BaseNet Amount
	Taxes   []TaxAmount
	Payable Amount
}

Jump to

Keyboard shortcuts

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