cii

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: AGPL-3.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"
	Qdtns = "urn:un:unece:uncefact:data:standard:QualifiedDataType: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 CategoryTradeTax added in v0.2.0

type CategoryTradeTax struct {
	TypeCode              string `xml:"ram:TypeCode"`
	CategoryCode          string `xml:"ram:CategoryCode"`
	RateApplicablePercent string `xml:"ram:RateApplicablePercent"`
}

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"`
	// Qdt is only declared when a qdt element is written, so documents
	// without preceding invoices stay byte-identical to earlier versions.
	Qdt string `xml:"xmlns:qdt,attr,omitempty"`

	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 {
	ShipTo     *TradeParty `xml:"ram:ShipToTradeParty,omitempty"`
	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 Indicator added in v0.2.0

type Indicator struct {
	Value bool `xml:"udt:Indicator"`
}

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"`
	TotalPrepaidAmount   *Amount            `xml:"ram:TotalPrepaidAmount,omitempty"`
	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 ReferencedInvoice added in v0.7.0

type ReferencedInvoice struct {
	ID        string    `xml:"ram:IssuerAssignedID"`
	IssueDate *DateType `xml:"ram:FormattedIssueDateTime>qdt:DateTimeString,omitempty"`
}

ReferencedInvoice is a preceding invoice reference (BG-3).

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"`
	AllowanceCharges     []TradeAllowanceCharge `xml:"ram:SpecifiedTradeAllowanceCharge,omitempty"`
	PaymentTerms         *PaymentTerms          `xml:"ram:SpecifiedTradePaymentTerms,omitempty"`
	MonetarySummation    MonetarySummation      `xml:"ram:SpecifiedTradeSettlementHeaderMonetarySummation"`
	PrecedingInvoices    []ReferencedInvoice    `xml:"ram:InvoiceReferencedDocument,omitempty"`
}

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 TradeAllowanceCharge added in v0.2.0

type TradeAllowanceCharge struct {
	ChargeIndicator Indicator        `xml:"ram:ChargeIndicator"`
	ActualAmount    string           `xml:"ram:ActualAmount"`
	Reason          string           `xml:"ram:Reason,omitempty"`
	CategoryTax     CategoryTradeTax `xml:"ram:CategoryTradeTax"`
}

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"`
	ExemptionReason       string  `xml:"ram:ExemptionReason,omitempty"`
	BasisAmount           *Amount `xml:"ram:BasisAmount,omitempty"`
	CategoryCode          string  `xml:"ram:CategoryCode"`
	ExemptionReasonCode   string  `xml:"ram:ExemptionReasonCode,omitempty"`
	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