metadataExtractor

package
v0.0.0-...-19239a5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: EUPL-1.2 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseInvoice

func ParseInvoice(invoice []byte, format string) (*entity.Invoice, error)

Types

type Address

type Address struct {
	StreetName string
	CityName   string
	PostalZone string
	Country    struct {
		IdentificationCode string
	}
}

type Amount

type Amount struct {
	Value      float64 `xml:",chardata"`
	CurrencyID string  `xml:"currencyID,attr"`
}

type Contact

type Contact struct {
	Name           string
	Telephone      string
	ElectronicMail string
}

type InvoiceLine

type InvoiceLine struct {
	ID                  string
	Note                string
	InvoicedQuantity    Quantity
	CreditedQuantity    Quantity
	LineExtensionAmount float64
	AccountingCost      string
	Item                struct {
		Description           string
		Name                  string
		ClassifiedTaxCategory TaxCategory
	}
	Price struct {
		PriceAmount float64
	}
}

type Quantity

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

type TaxCategory

type TaxCategory struct {
	Percent float64
}

type UblInvoice

type UblInvoice struct {
	ID                      string
	IssueDate               string
	AccountingSupplierParty struct {
		Party UblParty
	}
	AccountingCustomerParty struct {
		Party UblParty
	}
	LegalMonetaryTotal struct {
		TaxExclusiveAmount Amount
		TaxInclusiveAmount Amount
	}
}

type UblInvoiceFull

type UblInvoiceFull struct {
	ID                   string
	IssueDate            string
	DueDate              string
	InvoiceTypeCode      string
	Note                 string
	CreditNoteTypeCode   string
	TaxPointDate         string
	DocumentCurrencyCode string
	OrderReference       struct {
		ID string
	}
	BillingReference struct {
		InvoiceDocumentReference struct {
			ID string
		}
	}
	ContractDocumentReference struct {
		ID string
	}
	AccountingSupplierParty struct {
		Party UblParty
	}
	AccountingCustomerParty struct {
		Party UblParty
	}
	Delivery struct {
		ActualDeliveryDate string
		DeliveryLocation   struct {
			Address Address
		}
	}
	PaymentMeans struct {
		PaymentMeansCode      string
		PaymentID             string
		PaymentDueDate        string
		PayeeFinancialAccount struct {
			ID string
		}
	}
	TaxTotal struct {
		TaxAmount   float64
		TaxSubtotal []struct {
			TaxableAmount float64
			TaxAmount     float64
			TaxCategory   TaxCategory
		}
	}
	LegalMonetaryTotal struct {
		TaxExclusiveAmount Amount
		TaxInclusiveAmount Amount
		PayableAmount      Amount
	}
	InvoiceLine    []InvoiceLine
	CreditNoteLine []InvoiceLine
}

type UblParty

type UblParty struct {
	PartyLegalEntity struct {
		RegistrationName string
		CompanyID        string
		CompanyLegalForm string
	}

	PostalAddress  Address
	PartyTaxScheme struct {
		CompanyID string
	}
	Contact Contact
}

Jump to

Keyboard shortcuts

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