From 66a9984c6ec1c2c434670d830a480aa101f0f6d6 Mon Sep 17 00:00:00 2001 From: Sam Lown Date: Fri, 19 Jul 2024 10:31:14 +0000 Subject: [PATCH] Fixing name in party --- parties.go | 3 +-- test/data/invoice-hotel-private.json | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/parties.go b/parties.go index 44076ad..7126b74 100644 --- a/parties.go +++ b/parties.go @@ -62,7 +62,7 @@ type Profile struct { // Name of the organization Name string `xml:"Denominazione,omitempty"` // Natural person's first or given name if no "Denominazione" is provided - Given string `xml:"Name,omitempty"` + Given string `xml:"Nome,omitempty"` // Surname of the person Surname string `xml:"Cognome,omitempty"` // Title of the person @@ -147,7 +147,6 @@ func newProfile(party *org.Party) *Profile { // not a company if len(party.People) > 0 { name := party.People[0].Name - return &Profile{ Given: name.Given, Surname: name.Surname, diff --git a/test/data/invoice-hotel-private.json b/test/data/invoice-hotel-private.json index a604533..43777bb 100644 --- a/test/data/invoice-hotel-private.json +++ b/test/data/invoice-hotel-private.json @@ -46,6 +46,14 @@ "tax_id": { "country": "GB" }, + "people": [ + { + "name": { + "given": "John", + "surname": "Doe" + } + } + ], "addresses": [ { "num": "23",