cii

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Rsmns = "urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
	Ramns = "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
	Udtns = "urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"

	// Peppol & XRechnung: Der Business Process
	BusinessProcessType = "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0"

	// Profil ID: XRechnung 3.0
	ProfileXRechnung3 = "urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0"

	// Profil ID: ZUGFeRD 2.3 / Factur-X (Profil EN 16931)
	ProfileZugferdComfort = "urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:en16931"

	TypeCodeCommercialInvoice = "380"
	DateFormatYYYYMMDD        = "102"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Agreement

type Agreement struct {
	BuyerReference string     `xml:"ram:BuyerReference,omitempty"`
	Seller         TradeParty `xml:"ram:SellerTradeParty"`
	Buyer          TradeParty `xml:"ram:BuyerTradeParty"`
}

type Amount

type Amount struct {
	Value string `xml:",chardata"`
}

type AmountWithCurrency

type AmountWithCurrency struct {
	Value    string `xml:",chardata"`
	Currency string `xml:"currencyID,attr"`
}

type BillingPeriod

type BillingPeriod struct {
	Start DateType `xml:"ram:StartDateTime>udt:DateTimeString,omitempty"`
	End   DateType `xml:"ram:EndDateTime>udt:DateTimeString,omitempty"`
}

type CIISerializer

type CIISerializer struct{}

func NewSerializer

func NewSerializer() *CIISerializer

func (*CIISerializer) Serialize

func (s *CIISerializer) Serialize(inv *einvoice.Invoice) ([]byte, error)

type CrossIndustryInvoice

type CrossIndustryInvoice struct {
	XMLName xml.Name `xml:"rsm:CrossIndustryInvoice"`
	Rsm     string   `xml:"xmlns:rsm,attr"`
	Ram     string   `xml:"xmlns:ram,attr"`
	Udt     string   `xml:"xmlns:udt,attr"`

	Context     ExchangedDocumentContext    `xml:"rsm:ExchangedDocumentContext"`
	Header      ExchangedDocument           `xml:"rsm:ExchangedDocument"`
	Transaction SupplyChainTradeTransaction `xml:"rsm:SupplyChainTradeTransaction"`
}

type DateType

type DateType struct {
	Value  string `xml:",chardata"`
	Format string `xml:"format,attr"`
}

type DefinedTradeContact

type DefinedTradeContact struct {
	PersonName string `xml:"ram:PersonName,omitempty"`
	Telephone  *Phone `xml:"ram:TelephoneUniversalCommunication,omitempty"`
	Email      *Email `xml:"ram:EmailURIUniversalCommunication,omitempty"`
}

type Delivery

type Delivery struct {
	Occurrence *Occurrence `xml:"ram:ActualDeliverySupplyChainEvent,omitempty"`
}

type Email

type Email struct {
	URIID string `xml:"ram:URIID"`
}

type ExchangedDocument

type ExchangedDocument struct {
	ID           string   `xml:"ram:ID"`
	TypeCode     string   `xml:"ram:TypeCode"`
	IssueDate    DateType `xml:"ram:IssueDateTime>udt:DateTimeString"`
	IncludedNote *Note    `xml:"ram:IncludedNote,omitempty"`
}

type ExchangedDocumentContext

type ExchangedDocumentContext struct {
	// NEU: Business Process (R001)
	BusinessProcess    IDType `xml:"ram:BusinessProcessSpecifiedDocumentContextParameter>ram:ID,omitempty"`
	GuidelineParameter IDType `xml:"ram:GuidelineSpecifiedDocumentContextParameter>ram:ID"`
}

type IDType

type IDType struct {
	Value string `xml:",chardata"`
}

type IDWithScheme

type IDWithScheme struct {
	Value    string `xml:",chardata"`
	SchemeID string `xml:"schemeID,attr,omitempty"`
}

type LineAgreement

type LineAgreement struct {
	NetPrice Price `xml:"ram:NetPriceProductTradePrice"`
}

type LineDelivery

type LineDelivery struct {
	BilledQuantity Quantity `xml:"ram:BilledQuantity"`
}

type LineDocument

type LineDocument struct {
	LineID string `xml:"ram:LineID"`
}

type LineItem

type LineItem struct {
	DocumentLineDocument LineDocument   `xml:"ram:AssociatedDocumentLineDocument"`
	Product              TradeProduct   `xml:"ram:SpecifiedTradeProduct"`
	Agreement            LineAgreement  `xml:"ram:SpecifiedLineTradeAgreement"`
	Delivery             LineDelivery   `xml:"ram:SpecifiedLineTradeDelivery"`
	Settlement           LineSettlement `xml:"ram:SpecifiedLineTradeSettlement"`
}

type LineMonetarySummation

type LineMonetarySummation struct {
	LineTotalAmount Amount `xml:"ram:LineTotalAmount"`
}

type LineSettlement

type LineSettlement struct {
	Tax       TradeTax              `xml:"ram:ApplicableTradeTax"`
	Summation LineMonetarySummation `xml:"ram:SpecifiedTradeSettlementLineMonetarySummation"`
}

type MonetarySummation

type MonetarySummation struct {
	LineTotalAmount      Amount             `xml:"ram:LineTotalAmount"`
	ChargeTotalAmount    Amount             `xml:"ram:ChargeTotalAmount"`
	AllowanceTotalAmount Amount             `xml:"ram:AllowanceTotalAmount"`
	TaxBasisTotalAmount  Amount             `xml:"ram:TaxBasisTotalAmount"`
	TaxTotalAmount       AmountWithCurrency `xml:"ram:TaxTotalAmount"`
	GrandTotalAmount     Amount             `xml:"ram:GrandTotalAmount"`
	DuePayableAmount     Amount             `xml:"ram:DuePayableAmount"`
}

type Note

type Note struct {
	Content string `xml:"ram:Content"`
}

type Occurrence

type Occurrence struct {
	OccurrenceDate DateType `xml:"ram:OccurrenceDateTime>udt:DateTimeString"`
}

type PayeeAccount

type PayeeAccount struct {
	IBANID string `xml:"ram:IBANID"`
}

type PaymentMeans

type PaymentMeans struct {
	TypeCode     string        `xml:"ram:TypeCode"`
	PayeeAccount *PayeeAccount `xml:"ram:PayeePartyCreditorFinancialAccount,omitempty"`
}

type PaymentTerms

type PaymentTerms struct {
	DueDate *DateType `xml:"ram:DueDateDateTime>udt:DateTimeString,omitempty"`
}

type Phone

type Phone struct {
	CompleteNumber string `xml:"ram:CompleteNumber"`
}

type Price

type Price struct {
	ChargeAmount string `xml:"ram:ChargeAmount"`
}

type Quantity

type Quantity struct {
	Value    string `xml:",chardata"`
	UnitCode string `xml:"unitCode,attr"`
}

type Settlement

type Settlement struct {
	InvoiceCurrency      string            `xml:"ram:InvoiceCurrencyCode"`
	PaymentMeans         *PaymentMeans     `xml:"ram:SpecifiedTradeSettlementPaymentMeans,omitempty"`
	ApplicableTradeTaxes []TradeTax        `xml:"ram:ApplicableTradeTax"`
	BillingPeriod        *BillingPeriod    `xml:"ram:BillingSpecifiedPeriod,omitempty"`
	PaymentTerms         *PaymentTerms     `xml:"ram:SpecifiedTradePaymentTerms,omitempty"`
	MonetarySummation    MonetarySummation `xml:"ram:SpecifiedTradeSettlementHeaderMonetarySummation"`
}

type SupplyChainTradeTransaction

type SupplyChainTradeTransaction struct {
	IncludedLineItems []LineItem `xml:"ram:IncludedSupplyChainTradeLineItem"`
	Agreement         Agreement  `xml:"ram:ApplicableHeaderTradeAgreement"`
	Delivery          Delivery   `xml:"ram:ApplicableHeaderTradeDelivery,omitempty"`
	Settlement        Settlement `xml:"ram:ApplicableHeaderTradeSettlement"`
}

type TaxID

type TaxID struct {
	Value    string `xml:",chardata"`
	SchemeID string `xml:"schemeID,attr"`
}

type TaxRegistration

type TaxRegistration struct {
	ID TaxID `xml:"ram:ID"`
}

type TradeAddress

type TradeAddress struct {
	Postcode  string `xml:"ram:PostcodeCode,omitempty"`
	LineOne   string `xml:"ram:LineOne,omitempty"`
	CityName  string `xml:"ram:CityName,omitempty"`
	CountryID string `xml:"ram:CountryID"`
}

type TradeID

type TradeID struct {
	Value    string `xml:",chardata"`
	SchemeID string `xml:"schemeID,attr,omitempty"`
}

type TradeParty

type TradeParty struct {
	ID              []TradeID               `xml:"ram:ID,omitempty"`
	GlobalID        *TradeID                `xml:"ram:GlobalID,omitempty"`
	Name            string                  `xml:"ram:Name"`
	Contact         *DefinedTradeContact    `xml:"ram:DefinedTradeContact,omitempty"`
	PostalAddress   TradeAddress            `xml:"ram:PostalTradeAddress"`
	ElectronicURI   *UniversalCommunication `xml:"ram:URIUniversalCommunication,omitempty"`
	TaxRegistration *TaxRegistration        `xml:"ram:SpecifiedTaxRegistration,omitempty"`
}

type TradeProduct

type TradeProduct struct {
	Name string `xml:"ram:Name"`
}

type TradeTax

type TradeTax struct {
	CalculatedAmount      *Amount `xml:"ram:CalculatedAmount,omitempty"`
	TypeCode              string  `xml:"ram:TypeCode"`
	BasisAmount           *Amount `xml:"ram:BasisAmount,omitempty"`
	CategoryCode          string  `xml:"ram:CategoryCode"`
	RateApplicablePercent string  `xml:"ram:RateApplicablePercent"`
}

type UniversalCommunication

type UniversalCommunication struct {
	URIID *IDWithScheme `xml:"ram:URIID,omitempty"`
}

Jump to

Keyboard shortcuts

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