Skip to content

Commit

Permalink
Fix LegalOrganization writer
Browse files Browse the repository at this point in the history
  • Loading branch information
danvy committed May 8, 2023
1 parent 6d64b3a commit f05faea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ZUGFeRD-Test/ZUGFeRD21Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ public void TestStoringSepaPreNotification()
city: "München",
street: "Lieferantenstraße 20",
country: CountryCodes.DE,
legalOrganization: new LegalOrganization(GlobalIDSchemeIdentifiers.Sirene, d.Seller.GlobalID.ID, "Lieferant GmbH"));
legalOrganization: new LegalOrganization(GlobalIDSchemeIdentifiers.GLN, "4000001123452", "Lieferant GmbH"));
d.SetBuyer(
id: "GE2020211",
globalID: new GlobalID(GlobalIDSchemeIdentifiers.GLN, "4000001987658"),
Expand Down
4 changes: 3 additions & 1 deletion ZUGFeRD/InvoiceDescriptor21Writer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ private void _writeOptionalLegalOrganization(ProfileAwareXmlTextWriter writer, s
writer.WriteElementString("ram:TradingBusinessName", legalOrganization.TradingBusinessName);
}
}
writer.WriteEndElement();
}
}

Expand Down Expand Up @@ -1217,8 +1218,9 @@ private void _writeOptionalParty(ProfileAwareXmlTextWriter writer, string partyT

if (party.SpecifiedLegalOrganization != null)
{
_writeOptionalLegalOrganization(writer, "ram:SpecifiedLegalOrganization", party.SpecifiedLegalOrganization, Profile.Extended | Profile.XRechnung1 | Profile.XRechnung);
_writeOptionalLegalOrganization(writer, "ram:SpecifiedLegalOrganization", party.SpecifiedLegalOrganization, Profile.Minimum | Profile.XRechnung1 | Profile.XRechnung);
}

if (contact != null)
{
_writeOptionalContact(writer, "ram:DefinedTradeContact", contact, Profile.Extended | Profile.XRechnung1 | Profile.XRechnung);
Expand Down

0 comments on commit f05faea

Please sign in to comment.