Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The use of SpecifiedTradeSettlementPaymentMeans several times #385

Open
simon-gotomaxx opened this issue May 23, 2024 · 4 comments
Open

Comments

@simon-gotomaxx
Copy link

According to the documentation, SpecifiedTradeSettlementPaymentMeans can be used multiple times to specify multiple banks. If I do this, I get an error message when validating:

<error type="18">schema validation fails:org.xml.sax.SAXParseException; lineNumber: 273; columnNumber: 46; cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element '{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":SpecifiedTradeSettlementPaymentMeans}' gefunden. '{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":ApplicableTradeTax}' wird erwartet.</error> <error type="4" location="/*[local-name()='CrossIndustryInvoice']/*[local-name()='SupplyChainTradeTransaction']/*[local-name()='ApplicableHeaderTradeSettlement']" criterion="count(ram:SpecifiedTradeSettlementPaymentMeans)&lt;=1">Element 'ram:SpecifiedTradeSettlementPaymentMeans' may occur at maximum 1 times. from /xslt/ZF_221/FACTUR-X_EN16931.xslt)</error>

When I check the same XML via the KoSIT Valitator, there are no problems.

Here is an excerpt of the corresponding passage from the XML:

.
.
.
<ram:ApplicableHeaderTradeSettlement>
			<ram:PaymentReference>Zahlungshinweis 12345</ram:PaymentReference>
			<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
			<ram:SpecifiedTradeSettlementPaymentMeans>
				<ram:TypeCode>30</ram:TypeCode>
				<ram:Information>Banküberweisung</ram:Information>
				<ram:PayeePartyCreditorFinancialAccount>
					<ram:IBANID>DE23123812000023423</ram:IBANID>
					<ram:AccountName>Mustershop 24</ram:AccountName>
				</ram:PayeePartyCreditorFinancialAccount>
				<ram:PayeeSpecifiedCreditorFinancialInstitution>
					<ram:BICID>HAP223N23445</ram:BICID>
				</ram:PayeeSpecifiedCreditorFinancialInstitution>
			</ram:SpecifiedTradeSettlementPaymentMeans>
			<ram:SpecifiedTradeSettlementPaymentMeans>
				<ram:TypeCode>30</ram:TypeCode>
				<ram:Information>Banküberweisung</ram:Information>
				<ram:PayeePartyCreditorFinancialAccount>
					<ram:IBANID>DE111111111111</ram:IBANID>
					<ram:AccountName>Mustershop 24</ram:AccountName>
				</ram:PayeePartyCreditorFinancialAccount>
				<ram:PayeeSpecifiedCreditorFinancialInstitution>
					<ram:BICID>HAP323232323</ram:BICID>
				</ram:PayeeSpecifiedCreditorFinancialInstitution>
			</ram:SpecifiedTradeSettlementPaymentMeans>
.
.
.
@jstaerk
Copy link
Collaborator

jstaerk commented May 24, 2024

If your issue is a question if a mustang generated file is valid(?) please include either the complete source code and/or the complete output so that I can have a look and run it through a validator

@simon-gotomaxx
Copy link
Author

I create the ZUGFeRD file in a custom application (Mustang is not used). I use Mustang (Mustang-CLI-2.11.0.jar) for validation and am wondering about the error message.
Attached is the XML that produces the above error during validation.
factur-x.zip

The error only occurs when I use SpecifiedTradeSettlementPaymentMeans multiple times. This should be possible according to the general ZUGFeRD documentation.

image

@IsThatUniqueEnough
Copy link

In the FACTUR-X schemas below the EXTENDED profile the cardinality of SpecifiedTradeSettlementPaymentMeans is [0..1].

@simon-gotomaxx
Copy link
Author

Ah ok now I see it.
<assert test=‘count(ram:SpecifiedTradeSettlementPaymentMeans)<=1’>
Element ‘ram:SpecifiedTradeSettlementPaymentMeans’ may occur a maximum of 1 time.</assert
(from the FACTUR-X_EN16931.sch schematron)

It is just a bit confusing as it is described in the documentation and even more so if it is allowed in xRechnung (EN16931).

Heavenfighter pushed a commit to Heavenfighter/mustangproject that referenced this issue May 30, 2024
…rking on a feature to visualize xml into pdf but the feature did not yet make it and the files were not cleanly removed, thanks for spotting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants