Incorrect (IMHO) default value for BasisQuantity aka UnitQuantity #625
PeterSawatzki-MGGM
started this conversation in
General
Replies: 3 comments
-
|
Yes, thanks for the suggestion. Please go ahead. Can you do this for all profiles and add a test case? ZUGFeRD-csharp/ZUGFeRD.Test/ZUGFeRD22Tests.cs Line 3113 in 9b5c40f |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
will do. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I changed this and added a test "TestTradeLineItemUnitChargeFreePackageQuantity" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In InvoiceDescriptor23CIIReader.cs, method _parseTradeLineItem: the UnitQuantity gets a default value of 1:
UnitQuantity = XmlUtils.NodeAsDecimal(tradeLineItem, ".//ram:BasisQuantity", nsmgr, 1),
Wouldn't it be better to not assign a defualt value at all:
UnitQuantity = XmlUtils.NodeAsDecimal(tradeLineItem, ".//ram:BasisQuantity", nsmgr),
for example reading and writing zugferd232de\Beispiele\4. EXTENDED\EXTENDED_Warenrechnung\factur-x.xml would then suppress unnecessary (and wrong?) output:
original was:
I can make a pull request on this if you agree.
Beta Was this translation helpful? Give feedback.
All reactions