ZUGFeRD-csharp: XRechnung UBL PaymentTerms with LineBreak
Should the UBL-Writer respect Business Rules?
So it should look like
<cac:PaymentTerms>
<cbc:Note>
#SKONTO#TAGE=14#PROZENT=0.00#BASISBETRAG=219.80#
</cbc:Note>
</cac:PaymentTerms>
and the actual implementation produces:
<cac:PaymentTerms>
<cbc:Note>#SKONTO#TAGE=14#PROZENT=0.00#BASISBETRAG=219.80#</cbc:Note>
</cac:PaymentTerms>
If I add a verbatim string with line break at the beginning and end, the result looks like
<cac:PaymentTerms>
<cbc:Note>
#SKONTO#TAGE=14#PROZENT=0.00#BASISBETRAG=219.80#</cbc:Note>
</cac:PaymentTerms>
So the line break at the end is ignored.
Do you think this is a thing? Is the Writer used able to produce this?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 23 (23 by maintainers)
What I painfully noticed is that the sequence of elements is of importance which led to the weird way of implementation in the CII writer regarding the DueDate.
it appeared to be necessary for the validator.
basically yes. The new thing here is correct indention of the node content like here:
https://github.com/stephanstapel/ZUGFeRD-csharp/issues/388#issuecomment-2413207892
Just tested the CII-export and it is coming out like this (I did not insert it with a linebreak):
But the validator did not say anything about this. So it just does not look very goodâŚ
Without the manual indentation the result is the following:
Surely. Then one could pass a bool that there should be an additional indentation which is
2 * this.XmlStack.Count()âŚ