Skip to content

Commit

Permalink
Adding hungarian add-on
Browse files Browse the repository at this point in the history
  • Loading branch information
Menendez6 committed Oct 28, 2024
1 parent bbf7fcc commit b914fbe
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/hu/osa/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const (
ExtKeyExemptionValue = "hu-exemption-Value"
)

var extensionKeys = []*cbc.KeyDefinition{
var extensions = []*cbc.KeyDefinition{
{
Key: ExtKeyExemptionValue,
Name: i18n.String{
Expand Down
28 changes: 28 additions & 0 deletions addons/hu/osa/osa.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Package osa handles the extensions and validation rules in order to use GOBL with the
// Hungarian OSA format.
package osa

import (
"github.com/invopop/gobl/cbc"
"github.com/invopop/gobl/i18n"
"github.com/invopop/gobl/tax"
)

const (
// V3 for Hungary OSA XML v3.x
V3 cbc.Key = "hu-osa-v3"
)

func init() {
tax.RegisterAddonDef(newAddon())

Check warning on line 17 in addons/hu/osa/osa.go

View check run for this annotation

Codecov / codecov/patch

addons/hu/osa/osa.go#L16-L17

Added lines #L16 - L17 were not covered by tests
}

func newAddon() *tax.AddonDef {
return &tax.AddonDef{
Key: V3,
Name: i18n.String{
i18n.EN: "Hungary OSA v3.x",
},
Extensions: extensions,
}

Check warning on line 27 in addons/hu/osa/osa.go

View check run for this annotation

Codecov / codecov/patch

addons/hu/osa/osa.go#L20-L27

Added lines #L20 - L27 were not covered by tests
}

0 comments on commit b914fbe

Please sign in to comment.