ZUGFeRD / mustangproject

Open Source Java e-Invoicing library, validator and tool (Factur-X/ZUGFeRD, UNCEFACT/CII XRechnung)
http://www.mustangproject.org
Apache License 2.0
193 stars 112 forks source link

Missing interfaces for Recipient.PersonName and SpecifiedLegalOrganization.TradingBusinessName #447

Open relhussein opened 4 weeks ago

relhussein commented 4 weeks ago

I'm using the Mustang framework to generate ZUGFeRD files for version 2 / profile EN16931.

I try setting PersonName for recpient and sender. For sender it works, but not for recipient. Then I found out why: class ZUGFeRD2PullProvider (Line 147) only sets DefinedTradeContact for sender, but not for recipient. Is this a bug or a feature?

Also, I didn't find an interface for the attribute TradingBusinessName (this attribute is directly under SpecifiedLegalOrganization). I grepped the whole project but found nothing.

langfr commented 4 weeks ago

The TradeContact is set also for recipient, but only if profile is EXTENDED or XRECHNUNG, not for profile EN16931. Don't know if it would be legal to add profile EN16931 here. According to FACTUR-X_EN16931.sch and FACTUR-X_EN16931.xsd it seems to be okay.

I started working on the second issue.

jstaerk commented 3 weeks ago

TradingBusinessName is Extended Only but having TradeContact for recipients not in EN16931 was most probably my fault, in particular if it's enabled for XRechnung, only the SalesAgentTradeParty TradeContact is extended only

relhussein commented 3 weeks ago

thank you guys for the quick reponse, awesome :)