Open asdf00000 opened 2 months ago
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.
No, it's not a question, just a notice. I have researched the issue before I opened the ticket.
I tested it with KOSIT Version 3.0.1_2023-09-22 and Mustang-Validator 2.10.0.
Every X-Rechnung
created with Mustang 2.10.0 with payment type direct-debit
is rejected by KOSIT-Validator and Mustang-Validator because the CreditorReferenceID
-field is not implemented.
The field used to be optional in earlier versions of X-Rechnung, but is now mandatory for payment type direct-debit
.
As I mentioned above, the following line must be adeed so that the X-Rechnung passes the validation.
<ram:CreditorReferenceID>[Bank assigned creditor identifier]</ram:CreditorReferenceID>
I thought about implementing it myself and submitting a pull request, but your current code structure is not suitable for that without major changes.
So I fixed it locally for myself for now by post-processing the XML-string and injecting the missing line.
Last week I had the same issue with a "xRechnung" with a missing "CreditorReferenceID" (BT-90). By manually adding the "CreditorReferenceID" as the first element in "ApplicableHeaderTradeSettlement", the validator declared the X-invoice as valid. I use mustang-validator and mustang-library in version 2.10.0.
For X-Rechnung with payment method direct debit, the now mandatory field
BT-90
CreditorReferenceID
is missing. The current Validator rejects files without that field. This is how it should look like:The problem is, that the field must be inside the
ApplicableHeaderTradeSettlement
-block, not inside the direct-debit-specificSpecifiedTradeSettlementPaymentMeans
-block. So just adding the field intoIZUGFeRDTradeSettlementDebit
won't suffice as it is needed in the higher level xml-block. As a consequence, including the field might require rearranging the code that creates theApplicableHeaderTradeSettlement
-block.Is anyone already working on it?