Skip to content

Commit a820b5f

Browse files
Merge pull request #541 from tobitege/fix-legal-org
(Fix) TradingBusinessName within legal organisation is independent of ID
2 parents 455e334 + 7c66dba commit a820b5f

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

ZUGFeRD/InvoiceDescriptor23CIIWriter.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,16 +1472,14 @@ private void _writeOptionalLegalOrganization(ProfileAwareXmlTextWriter writer, s
14721472
{
14731473
writer.WriteElementString("ram", "ID", legalOrganization.ID.ID);
14741474
}
1475-
1476-
1477-
// filter according to https://github.com/stephanstapel/ZUGFeRD-csharp/pull/221
1478-
if ((this.Descriptor.Profile == Profile.Extended) ||
1479-
((partyType == PartyTypes.SellerTradeParty) && (this.Descriptor.Profile != Profile.Minimum) ) ||
1480-
((partyType == PartyTypes.BuyerTradeParty) && this.Descriptor.Profile.In(Profile.Comfort, Profile.XRechnung1, Profile.XRechnung, Profile.Extended)))
1481-
{
1482-
writer.WriteOptionalElementString("ram", "TradingBusinessName", legalOrganization.TradingBusinessName, this.Descriptor.Profile);
1483-
}
14841475
}
1476+
// filter according to https://github.com/stephanstapel/ZUGFeRD-csharp/pull/221
1477+
if ((this.Descriptor.Profile == Profile.Extended) ||
1478+
((partyType == PartyTypes.SellerTradeParty) && (this.Descriptor.Profile != Profile.Minimum)) ||
1479+
((partyType == PartyTypes.BuyerTradeParty) && this.Descriptor.Profile.In(Profile.Comfort, Profile.XRechnung1, Profile.XRechnung, Profile.Extended)))
1480+
{
1481+
writer.WriteOptionalElementString("ram", "TradingBusinessName", legalOrganization.TradingBusinessName, this.Descriptor.Profile);
1482+
}
14851483
writer.WriteEndElement();
14861484
} // !_writeOptionalLegalOrganization()
14871485

0 commit comments

Comments
 (0)