Versions in this module Expand all Collapse all v0 v0.49.0 Oct 28, 2026 v0.48.0 Oct 16, 2026 v0.47.0 Oct 9, 2026 v0.46.0 Oct 5, 2026 v0.45.0 Sep 16, 2026 Changes in this version + const NoteSourceFooter + const RootElementName + const XMLNamespace + const XSDNamespace + const XSINamespace + func AdjustRounding(inv *bill.Invoice, ksefTotalDue string) error + func MaxRoundingError(inv *bill.Invoice) num.Amount + func ParseKSeF(xmlData []byte) (*gobl.Envelope, error) + func ParsePaymentMeansCode(code string) cbc.Key + func SetTimeNow(fn func() time.Time) + type AdditionalDescriptionLine struct + Key string + LineNumber string + Value string + type Address struct + AddressL1 string + AddressL2 string + CountryCode string + GLN string + type AdvanceInvoiceRef struct + AdvanceInvoiceNo string + KSeFAdvanceInvoiceNo string + KSeFMarker int + type AdvancePayment struct + OtherPaymentMean string + OtherPaymentMeanMarker int + PaymentAmount string + PaymentDate string + PaymentMean string + type Annotations struct + CashAccounting string + MarginScheme *MarginScheme + NewTransportMeans *NewTransportMeans + ReverseCharge string + SelfBilling string + SimplifiedProcedureBySecondTaxpayer string + SplitPaymentMechanism string + TaxExemption *TaxExemption + type AuthorizedEntity struct + Address *Address + CorrespondenceAddress *Address + EORI string + Email string + NIP string + Name string + Phone string + Role int + type BankAccount struct + AccountDescription string + AccountNumber string + BankName string + BankSelfAccountMarker int + SWIFT string + type Buyer struct + Address *Address + BuyerID string + Contact *ContactDetails + CorrespondenceAddress *Address + CountryCode string + CustomerNumber string + EORI string + GV string + IDNumber string + JST string + NIP string + Name string + NoID int + UECode string + UEVatNumber string + func NewFavatBuyer(customer *org.Party) *Buyer + func (b *Buyer) ToGOBL() *org.Party + type Carrier struct + Address *Address + IdentificationData *Buyer + type ChargeOrDeduction struct + Amount string + Reason string + type ContactDetails struct + Email string + Phone string + type Contract struct + Date string + Number string + type CorrectedInv struct + CorrectedBuyer []*Buyer + CorrectedInvoiceNo string + CorrectedSeller *Seller + CorrectionPeriod string + IssueDate string + KsefNumber string + KsefNumberPresent int + NoKsefNumberPresent int + SequentialNumber string + func NewCorrectedInv(prc *org.DocumentRef) *CorrectedInv + type Discount struct + Amount string + Conditions string + type DueDate struct + Date string + TermDescription *TermDescription + type FormCode struct + FormCode string + SchemaVersion string + SystemCode string + type Header struct + CreationDate string + FormCode *FormCode + FormVariant int + SystemInfo string + func NewFavatHeader() *Header + type Inv struct + AdditionalDescription []*AdditionalDescriptionLine + AdvanceInvoices []*AdvanceInvoiceRef + AmountBeforeCorrection string + Annotations *Annotations + CompletionDate string + CorrectedInv []*CorrectedInv + CorrectionReason string + CorrectionType string + CurrencyCode string + DomesticReverseChargeNetSale string + ExchangeRate string + ExciseTaxRefund int + ExportNetSale string + FP int + IntraCommunityNetSale string + InvoiceType string + IssueDate string + IssuePlace string + Lines []*Line + MarginNetSale string + OSSNetSale string + OSSTax string + Order *Order + OutsideScopeNetSale string + PartialAdvancePayments []*PartialAdvancePayment + Payment *Payment + Period *InvoicePeriod + ReducedRateNetSale string + ReducedRateTax string + ReducedRateTaxConvertedToPln string + ReverseChargeNetSale string + SequentialNumber string + Settlement *Settlement + StandardRateNetSale string + StandardRateTax string + StandardRateTaxConvertedToPln string + SuperReducedRateNetSale string + SuperReducedRateTax string + SuperReducedRateTaxConvertedToPln string + TP int + TaxExemptNetSale string + TaxiRateNetSale string + TaxiRateTax string + TaxiRateTaxConvertedToPln string + TotalAmountDue string + TransactionConditions *TransactionConditions + WarehouseDocuments []string + ZeroTaxExceptIntraCommunityNetSale string + func NewFavatInv(invoice *bill.Invoice) *Inv + type Invoice struct + Buyer *Buyer + Footer *Stopka + Header *Header + Inv *Inv + Seller *Seller + ThirdParties []*ThirdParty + XMLName xml.Name + XMLNamespace string + XSDNamespace string + XSINamespace string + func BuildFavat(env *gobl.Envelope) (*Invoice, error) + func (d *Invoice) Bytes() ([]byte, error) + func (d *Invoice) ToGOBL() (*bill.Invoice, error) + type InvoicePeriod struct + EndDate string + StartDate string + type Line struct + Attachment15GoodsMarker int + BeforeCorrectionMarker int + CN string + CompletionDate string + CurrencyRate string + Discount string + ExciseDuty string + GTIN string + GrossPriceTotal string + GrossUnitPrice string + InternalCode string + LineNumber int + Measure string + Name string + NetPriceTotal string + NetUnitPrice string + OSSTaxRate string + PKOB string + PKWiU string + Procedure string + Quantity string + SpecialGoodsCode string + UniqueID string + VATAmount string + VATRate string + func NewLines(lines []*bill.Line) []*Line + func NewLinesForInvoice(invoice *bill.Invoice) []*Line + func (l *Line) ToGOBL() (*bill.Line, error) + type MarginScheme struct + ArtWorksMargin string + CollectiblesAndAntiquesMargin string + Marker string + NoMarginScheme string + TravelAgencyMargin string + UsedGoodsMargin string + type NewTransportMeans struct + Art42Obligation string + Marker int + NewTransportMeansItems []*NewTransportMeansItem + NoNewTransportMeans string + type NewTransportMeansItem struct + BodyNumber string + Brand string + ChassisNumber string + Color string + FactoryNumber string + FirstUseDate string + FrameNumber string + HullNumber string + LineNumber int + Mileage string + Model string + OperatingHoursAir string + OperatingHoursWater string + ProductionYear string + RegistrationNumber string + VIN string + VehicleType string + type Order struct + LineItems []*OrderLine + OrderAmount string + type OrderLine struct + Attachment15GoodsMarker int + BeforeCorrectionMarker int + CN string + ExciseDuty string + GTIN string + InternalCode string + LineNumber int + Measure string + Name string + NetPriceTotal string + NetUnitPrice string + OSSTaxRate string + PKOB string + PKWiU string + Procedure string + Quantity string + SpecialGoodsCode string + TaxValue string + UniqueID string + VATRate string + type OrderRef struct + Date string + Number string + type PartialAdvancePayment struct + CurrencyExchangeRate string + PaymentAmount string + PaymentDate string + type Payment struct + AdvancePayments []*AdvancePayment + BankAccounts []*BankAccount + Discount *Discount + DueDates []*DueDate + FactorBankAccounts []*BankAccount + KSeFPaymentID string + OtherPaymentMean string + OtherPaymentMeanMarker string + PaidMarker string + PartiallyPaidMarker string + PaymentDate string + PaymentLink string + PaymentMean string + func NewPayment(pay *bill.PaymentDetails, totals *bill.Totals) *Payment + type RoundingError struct + Calculated num.Amount + Diff num.Amount + Expected num.Amount + MaxAllowed num.Amount + func (e *RoundingError) Error() string + type Seller struct + Address *Address + Contact *ContactDetails + CorrespondenceAddress *Address + EORI string + NIP string + Name string + TaxpayerStatus int + VATPrefix string + func NewFavatSeller(supplier *org.Party) *Seller + func (s *Seller) ToGOBL() *org.Party + type Settlement struct + AmountToPay string + AmountToSettle string + Charges []*ChargeOrDeduction + Deductions []*ChargeOrDeduction + TotalCharges string + TotalDeductions string + type Stopka struct + Informacje []*StopkaInformacje + func NewFavatFooter(inv *bill.Invoice) *Stopka + type StopkaInformacje struct + StopkaFaktury string + type TaxExemption struct + EUDirectiveBasis string + Marker string + NoExemption string + OtherLegalBasis string + PolishLawBasis string + type TaxRateInfo struct + Key cbc.Key + Percent *num.Percentage + Rate cbc.Key + TaxCategory cbc.Code + type TermDescription struct + Quantity int + StartingEvent string + Unit string + type ThirdParty struct + Address *Address + BuyerID string + Contact *ContactDetails + CorrespondenceAddress *Address + CountryCode string + CustomerNumber string + EORI string + IDNumber string + InternalID string + NIP string + Name string + NoID int + OtherRole int + OtherRoleDescription string + Role string + Share string + UECode string + UEVatNumber string + func NewThirdParties(invoice *bill.Invoice) []*ThirdParty + type TransactionConditions struct + BatchNumbers []string + ContractCurrency string + ContractRate string + Contracts []*Contract + DeliveryTerms string + IntermediaryParty int + Orders []*OrderRef + Transport []*Transport + type Transport struct + CargoType string + Carrier *Carrier + OtherCargoDesc string + OtherCargoType int + OtherTransportDesc string + OtherTransportType int + PackagingUnit string + ShipFrom *Address + ShipTo *Address + ShipVia []*Address + TransportEndTime string + TransportOrderNumber string + TransportStartTime string + TransportType string