Documentation
¶
Overview ¶
Package common provides re-usable regime related structures and data.
Index ¶
Constants ¶
View Source
const (
IdentityTypeDUNS cbc.Code = "DUNS" // Dun & Bradstreet - Data Universal Numbering System
)
Common Identity Type Codes that are not country specific.
View Source
const (
InboxKeyPEPPOL cbc.Key = "peppol-id"
)
Common inbox keys
Variables ¶
View Source
var ( // TaxCodeBadCharsRegexp is used to remove any characters that are not valid in a tax code. TaxCodeBadCharsRegexp = regexp.MustCompile(`[^A-Z0-9]+`) )
Functions ¶
func ComputeLuhnCheckDigit ¶ added in v0.37.3
ComputeLuhnCheckDigit expects as argument a number string excluding the check digit. The returned integer should be checked against the check digit by the caller. Luhn Algorithm definition: https://en.wikipedia.org/wiki/Luhn_algorithm
func InvoiceScenarios ¶ added in v0.63.0
func InvoiceScenarios() *tax.ScenarioSet
InvoiceScenarios provides a standard set of scenarios to either be extended or overridden by the regime.
func InvoiceTags ¶ added in v0.63.0
func InvoiceTags() []*cbc.KeyDefinition
InvoiceTags returns a list of common invoice tag key definitions.
func InvoiceTagsWith ¶ added in v0.63.0
func InvoiceTagsWith(tags []*cbc.KeyDefinition) []*cbc.KeyDefinition
InvoiceTagsWith appends the list of provided key definitions to the base list of tags and returns a new array.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.