stephanstapel / zugferd-csharp Goto Github PK
View Code? Open in Web Editor NEWC# assembly for creating and reading ZUGFeRD invoices
License: Apache License 2.0
C# assembly for creating and reading ZUGFeRD invoices
License: Apache License 2.0
See "ZUGFeRD-2.1.1 - Spezifikation_TA.pdf", Page 24.
Currently, we have 380, 381, 383, 389 and 1380 which should be 384 (1380 should be kept for compatibilty, but only accepted for reading purposes).
Of the recommended codes 261, 386 and 326 are missing.
For MINIMUM and BASIC WL profiles, 751 is required (in Germany).
The given UNTDID 1001 subset contains many more coders which should be supported.
_translateInvoiceType and _encodeInvoiceType should be handled like other enumerations instead of being copied to each InvoiceDescriptor_Writer.
Parts of those other EnumExtentions are ugly enough.
Instead of creating an EnumToString function, which in turn doesn't do anything else than ToString with g format which itself is just the default for a plain ToString, one should just use ToString directly.
Some Enums do not set Unkown = 0, which is a bad thing.
The CountryCodes should have their numeric value attached.
SubjectCodes should also be updated accoring to the documentation for 2.1.1.
2.0 support is missing now. The tag to search vor are now in Reader2 but in fact is reader2 support for 2.1
when I test a 2.1 XML I got the error
"Auf eine geschlossene Datei kann nicht zugegriffen werden."
"stream.Position = 0;" is not allow for closed streams ;)
Checking for version1 close the stream
Edit:
I transmit a file stream, not a FullPath
The attribute currencyID seems to be only relevant in the extended profile. But is being written in every profile.
I switched to the Comfort/EN 16931 profile.
<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedLineTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:GrossPriceProductTradePrice[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:ChargeAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>
<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedLineTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:NetPriceProductTradePrice[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:ChargeAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>
<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedLineTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementLineMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:LineTotalAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>
<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:ApplicableTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:CalculatedAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>
<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:ApplicableTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:BasisAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>
<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:LineTotalAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>
<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:TaxBasisTotalAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>
<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:GrandTotalAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>
<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:DuePayableAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="not(@currencyID)">[CII-DT-031] - currencyID should not be present</error>
The validation of the xml says, that the ram:BasisAmount (in SpecifiedSupplyChainTradeAgreement) will not be evaluated in the comfort profile.
In previous versions the BasisAmount was not written, too.
FYI:
We just forked the project to the @ZUGFeRD Community. We are building up a cross Open Source community that will promote ZUGFeRD projects.
We will communicate more details in the next weeks.
Hi Stephan,
thanks for this library, i am trying to get it to work.
But it seems i can't generate a xml schema that satisfies the online validator: Vaildator
I always get an error:
schema validation fails:org.xml.sax.SAXParseException; lineNumber: 11; columnNumber: 15; cvc-complex-type.2.4.a: Invalid content was found starting with element '{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":Name}'. One of '{"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100":IssueDateTime}' is expected.
Even though "IssueDateTime" is in my xml schema.. Maybe it has to be in another order?
When referencing this project from a .NET Core 3.1 project, the following warning is shown:
warning NU1701: Package 'ZUGFeRD-csharp 2.10.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.
It seems that the project (or the NuGet build) is somehow still configured as .NET framework instead of .NET Standard/Core.
Any chance this could be sorted out?
Thanks!
So i got to test again, new version looks promising.
Now i noticed the typecodes for the paymentmeans are wrong (v2.1 haven't tested other versions).
According to the documentation possible values are:
Code | Type |
---|---|
10 | Bargeld |
20 | Scheck |
30 | Überweisung |
42 | Payment to bank account |
48 | Kartenzahlung |
49 | Lastschrift |
57 | Dauerauftrag |
58 | SEPA Credit Transfer |
59 | SEPA Direct Debit |
97 | Report |
Hallo zusammen,
erstmal Glückwunsch zu diesem tollen Projekt!
Ist es Absicht das als QuantityCode nur Unknown, C62, KGM, MTK angeboten werden?
Die Liste sollte um folgende Werte ergänzt werden: DAY, HAR, HUR, KTM, KWH, LS, LTR, MIN, MMK, MMT, MTQ, MTR, NAR, NPR, P1, SET, TNE, WEE
Diese Einheiten sind zumindest in der offiziellen ZUGFeRD Codeliste enthalten.
Hello all,
I am trying to generate a COMFORT level zugferd xml, using your library.
I have a time-based line-item whose basis_quantity is defined as more than 1. Here is the example:
If I understand the documentation correctly, the corresponding line-item XML node (IncludedSupplyChainTradeLineItem) should be defined as following:
Should the unit code used in BasisQuantity be the same as the one in BilledQuantity? Or, can I use a period multiplier like it is in the PDF invoice (x0.25) which effectively has a different unit_code (not hours).
Your library multiplies the unit price and the billed quantity, but in the case where the basis_quantity is not 1, like the above, the multiplication result would be false (6 x 240,00 = 1440,00 instead of 60,00)
_total = tradeLineItem.NetUnitPrice * tradeLineItem.BilledQuantity;
Reading the specification, it is completely unclear for me if my XML representation is correct or not. So, I ask you if you have any knowledge to share regarding this?
Hallo,
planst du eventuell schon das ZUGFeRD Format 2.0 zu unterstützen?
Neu ist unter anderem ein neues Profil EN16931.
Das Comfort Profil wurde zum Profil EN16931 umbenannt und erweitert.
Dieses ist identisch mit dem XRechnung Standard. Somit hätte man mit einer Schnittstelle zwei Standards unterstützt.
XRechnung wird ab 2020 für diverse öffentlichen Verwaltungen als Pflicht vorgeschrieben.
Bei XRechnung wird nur das XML versendet ohne PDF Datei.
Was ist der Unterschied zwischen ZUGFeRD 2.0 und der XRechnung und worin genau liegt hier der Vorteil von ZUGFeRD 2.0?
Was ist der Unterschied zwischen „ZUGFeRD Version 1“ und „ZUGFeRD Version 2"?
So i'm receiving these errors, even though i have the field BT-31 present, do i need the other fields?
<ram:SellerTradeParty>
<ram:Name>Company Name</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>Person</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>01234567890</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID>[email protected]</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>00000</ram:PostcodeCode>
<ram:LineOne>Street 12</ram:LineOne>
<ram:CityName>Any City</ram:CityName>
<ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">TaxRegistration1</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
This folder should named zugferd20 ;)
Hallo,
erstmal vielen Dank für die Umsetzung dieses tollen Projekts.
Könntest du vielleicht noch, wenn es möglich wäre ein Beispiel für das Profile.Basic ergänzen.
<ram:SellerTradeParty>
<ram:GlobalID schemeID="0088">4000001123452</ram:GlobalID>
<ram:Name>Lieferant GmbH</ram:Name>
<ram:DefinedTradeContact />
<ram:PostalTradeAddress>
<ram:PostcodeCode>80333</ram:PostcodeCode>
<ram:LineOne>Lieferantenstraße 20</ram:LineOne>
<ram:CityName>München</ram:CityName>
<ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="FC">201/113/40209</ram:ID>
</ram:SpecifiedTaxRegistration>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">DE123456789</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
Example:
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:IncludedNote>
<ram:Content>Wir erlauben uns Ihnen folgende Positionen aus der Lieferung Nr. 2013-51112 in Rechnung zu stellen:</ram:Content>
</ram:IncludedNote>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct />
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>0.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>0.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="Unknown">0.00</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>A</ram:CategoryCode>
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>0.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<error type="4" location="/*[local-name()='CrossIndustryInvoice' and namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100']/*[local-name()='SupplyChainTradeTransaction' and namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100']/*[local-name()='ApplicableHeaderTradeSettlement' and namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100']/*[local-name()='SpecifiedTradeSettlementHeaderMonetarySummation' and namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100']" criterion="(ram:GrandTotalAmount = round(ram:TaxBasisTotalAmount*100 + ram:TaxTotalAmount[@currencyID=/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode]*100 +0) div 100) or ((ram:GrandTotalAmount = ram:TaxBasisTotalAmount) and not (ram:TaxTotalAmount[@currencyID=/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode]))">Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).</error>
<error type="24" location="/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]" criterion="(ram:GrandTotalAmount = round( ram:TaxBasisTotalAmount*100 + ram:TaxTotalAmount[@currencyID=/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode]*100 +0) div 100) or ((ram:GrandTotalAmount = ram:TaxBasisTotalAmount) and not (ram:TaxTotalAmount[@currencyID=/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode]))">[BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).</error>
The error is pretty clear, but the generated xml, displays the right amount.
<?xml version="1.0" encoding="utf-8"?>
<rsm:CrossIndustryInvoice xmlns:a="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:10" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>NUMMER2</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20200706</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>Rechnung NUMMER2 vom 06.07.2020 00:00:00.</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>Rechnungsbetrag</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>24245.80</ram:ChargeAmount>
<ram:BasisQuantity unitCode="LS">1.00</ram:BasisQuantity>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>20374.62</ram:ChargeAmount>
<ram:BasisQuantity unitCode="LS">1.00</ram:BasisQuantity>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="LS">1.00</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>20374.62</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeDelivery />
<ram:ApplicableHeaderTradeSettlement>
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>3871.18</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>20374.62</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>Zahlbar innerhalb 30 Tagen netto bis 05.08.2020 00:00:00</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20200805</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>20374.62</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>20374.62</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount>3871.18</ram:TaxTotalAmount>
<ram:GrandTotalAmount>24245.80</ram:GrandTotalAmount>
<ram:DuePayableAmount>24245.80</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>
The fields BT-109 + BT-110 equal the sum (BT-112), i am not sure where the problem is.
Hey,
I'm trying to read a ZUGFERD xml but I'm getting the error "Wrong length of datetime element".
What am I doing wrong here?
Thanks,
DasNeo.
line 51 ...
<ram:ID>urn:ferd:CrossIndustryDocument:invoice:1p0:E</ram:ID>
... should be "...:1p0:comfort":
<ram:ID>urn:ferd:CrossIndustryDocument:invoice:1p0:comfort</ram:ID>
Hallo,
erst einmal vielen, vielen Dank für die tolle Arbeit.
Können Sie bitte für Netto-Rechnungen bei VAT category code (BT-119) den Code AE (VAT Reverse Charge) hinzufügen?
Und dann in VAT exemption reason text (BT-120) den Text „Umkehrung der Steuerschuldnerschaft“?
Danke und Grüße
Alexander Wittwer
Hi.
Vielen Dank für die tolle Arbeit die du hier geleistet hast.
Ich hab die neuste Version vom NuGet package in Visual Studio heruntergeladen.
Kommentare aus dem Quelltext werden jedoch in Intellisense nicht angezeigt.
Diese sind aber super praktisch um die Bedeutung eines Enums zu verstehen z.B. TaxRegistrationSchemeID.VA
Es scheint das die XML Dokumentation nicht mit ausgegeben wird.
https://stackoverflow.com/questions/43305578/show-comments-in-nuget-package
Wäre toll wenn du diese noch hinzufügen könntest.
Danke!
Schöne Grüße
Michel
Actual I got a result or not.
If not, there ist no info why!
I like to have a error flag perhaps IsError and in this case an ErrorMessage
Example:
We check the version of the XML but for some reason we can#t get the correct version.
actual the result is not filled or empty.
In this case we can set IsError to true and ErrorMessage to "not supported version"
Currently, there are no git version tags at all.
(And I would like to know from which version our internal fork was derived - probably this would help to get rid of some historical ballast.)
Wenn ich bei einem TradeLineItem zusätzlich zu einem Namen eine mehrzeilige Description angebe, so ist der darin enthaltene Zeilenumbruch u.U. für das Verständnis notwendig.
Derzeit wird der übergebene Text jedoch einfach direkt so ins XML gerendert, oder?
D.h. dass ein Zeilenumbruch für einen XML-Parser einfach zu einem Whitespace wird, oder ist hier ein anderer Standard definiert?
Müsste man potentiell mehrzeilige Texte nicht in ein <![CDATA[...]> einpacken?
Sollte das nicht von der Bibliothek übernommen werden?
Gruß,
Bernd
Following replacements:
to be continued
This is the starting tu discuss the needed changes for 2.1
Dieses ist der Start um die nötigen Anpassungen für 2.1 zu diskutieren.
Im Repo fehlt die Datei "PaymentMeansTypeCodes.cs".
Im Projekt ist diese vorhanden. Daher ist das Projekt aktuell nicht kompilierbar.
During a test run there is a error findening a file
......\demodata\ZUGFeRD_1p0_COMFORT_Einfach_Original.xml
According to ZUGFeRD 1.0 scheme:
<xs:simpleType name="DateMandatoryDateTimeType">
<xs:union memberTypes="xs:dateTime xs:date"/>
</xs:simpleType>
DateMandatoryDateTimeType can also be just a date, e.g. 2020-01-01
.
Invoices with such dates lead to exceptions on reading.
Example:
<ram:BuyerOrderReferencedDocument>
<ram:IssueDateTime>2013-08-01</ram:IssueDateTime>
<ram:ID>123</ram:ID>
</ram:BuyerOrderReferencedDocument>
Hello!
excellent library for creating ZUGFeRD XML files.
unfortunately i cant find a way to set the price unit correct.
i can set the gross/net unitprice and the billedquantity. if i have a Price 3814 Eur for 1000 pieces = 3,814 for ONE Piece. the price in the XML file always will by 3,81 - if i calculate the Prices in the XML file the quantity * Piece-price is not the correct total amout.
is it possible to use price-units and i only file no way?
many thanks for your help!
regards,
Chris
In a lot of places ', false' was removed from lines like
Writer.WriteValue(_formatDate(tradeLineItem.BuyerOrderReferencedDocument.IssueDateTime.Value, false));
but not from line 180 of ZUGFeRD/InvoiceDescriptor21Writer.cs
The generated file ZUGFeRD/s2industries.ZUGFeRD.xml (in my tests, this file did not appear directly in ZUGFeRD) contains information about badly formatted XML in the following lines
53
1379
Between lines 1421 and 1422 the information, in which profiles this is availabe, is missing.
Line 1469 contains additional '///'.
Line 1539 misses a 'd'.
Line 1575 shoud read 'Quadratmeter'.
Lines 2094, 2124 and 2129 lack a non-empty summary.
ZUGFeRD-csharp/ZUGFeRD/Profile.cs
Line 93 in dc5e8ff
Hallo,
ich habe das ZUGFeRD Nuget Paket von Version 2.6 auf Version 2.7 in meinem Projekt aktualisiert.
Seid dem bekomme ich folgende Fehlermeldung:
Die Datei oder Assembly "s2industries.ZUGFeRD, Version=2.7.0.0, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Eine Assembly mit starkem Namen ist erforderlich. (Ausnahme von HRESULT: 0x80131044)
Die DLL hat seid Version 2.7 auch keinen Strong Name mehr.
Ist dies so gewollt?
Hallo zusammen,
ich habe mir den Source Code inkl. Test Project runtergeladen.
Wenn ich die Rechnung mit:
string path = "output.xml";
InvoiceDescriptor desc = _createInvoice();
desc.Save(path, ZUGFeRDVersion.Version21, Profile.XRechnung);
speicher, bekomme ich mit jedem Validator Fehlermeldung !
Was mache ich da falsch ?
Man kann doch XRechnung erstellen, oder ?
Oder muss ich warten bis V2.1.1 kommt ?
I am trying to create a XRechnung invoice, with the validator i get the error "[BR-DE-15] Das Element "Buyer reference" (BT-10) muss übermittelt werden." which is the "ram:BuyerReference" field, which is not possible to write with this library. (It's in a comment)
ZUGFeRD/ZUGFeRD.csproj references DocumentationFile E:\develop\ZUGFeRD\s2industries.ZUGFeRD.xml.
I don't have a drive E:.
Issue can be fixed by unsing GenerateDocumentationFile instead and setting this to true (and moving this to the main PropertyGroup without conditions.
I've fixed this in my fork.
Hallo,
wurden die generierten Daten validiert?
Habe meine generierten Dateien mal auf dieser Seite getestet: https://www.din-zugferd-validation.org
Ergebnis: Sehr viele Fehler im Bereich von (fehlenden) Namespaces und auch fehlende Elemente.
ValidationResult.txt
Die strukur enspricht an vielen Stellen auch nicht den Beispiel dateien von Zugferd und als sich auch nicht mit deren xsd validieren.
Hat dies auch schon jemand anderes beobachten können, bzw. hat eine Lösung parat?
Ansonsten bemühe ich mich um einen Hotfix...
File not found
Perhaps use:
@"..\..\..\demodata\zugferd10\ZUGFeRD_1p0_BASIC_Einfach.xml"
public void addTradeLineCommentItem(string comment)
{
TradeLineItem item = new TradeLineItem()
{
//AW
Name="ComentItem",
AssociatedDocument = new ZUGFeRD.AssociatedDocument(),
GrossUnitPrice = 0m,
NetUnitPrice= 0m,
BilledQuantity = 0m
};
item.AssociatedDocument.Notes.Add(new Note(
content: comment,
subjectCode: SubjectCodes.Unknown,
contentCode: ContentCodes.Unknown
));
//AW
item.AssociatedDocument.LineID=0;
this.TradeLineItems.Add(item);
} // !addTradeLineCommentItem()
Hello,
ZUGFeRD 2.1 is out since 24.03.2020.
Actually it is not supported by ZUGFeRD-csharp and InvoiceDescriptor.Load(zugferdFile); returns an empty descriptor with Type = Unknown.
Do you have any plans to support this ZUGFeRD Version?
version 2.0 does not implement BasicWL profile. Throw exception just like in InvoiceDescriptor1Writer.
The file is still in use, when I like to use it again, I got an file is in use error
Hallo,
erstmal vielen Dank für das Einbauen meiner Code Ergänzungen.
Mit ist gerade noch aufgefallen, dass der Writer noch keine SEPA Lastschrift mit Prenotification kann.
Könntest du das vielleicht noch zeitnah einbauen?
Alternativ würde ich mich daran versuchen.
Beispiel 37 aus der ZUGFeRD Formatbeschreibung Seite 86/131:
<ram:ApplicableSupplyChainTradeSettlement>
...
<ram:PaymentReference>Rechnung Nummer 4711/2014</ram:PaymentReference>
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>49</ram:TypeCode>
<ram:Information>Betrag wird per SEPA-Lastschrift eingezogen</ram:Information>
<ram:ID schemeAgencyID="DE98ZZZ09999999999">REF A-123</ram:ID>
<ram:PayerPartyDebtorFinancialAccount>
<ram:IBANID>DE21860000000086001055</ram:IBANID>
<ram:AccountName>Bundeskasse Halle -Darlehen-</ram:AccountName>
</ram:PayerPartyDebtorFinancialAccount>
<ram:PayerSpecifiedDebtorFinancialInstitution>
<ram:BICID>MARKDEF1860</ram:BICID>
<ram:Name>Deutsche Bundesbank -Filiale Leipzig-</ram:Name>
</ram:PayerSpecifiedDebtorFinancialInstitution>
</ram:SpecifiedTradeSettlementPaymentMeans>
...
</ram:ApplicableSupplyChainTradeSettlement>
Hallo,
die Methode _parseTradeLineItem im InvoiceDescriptorReader wird abegbrochen wenn AssociatedDocumentLineDocument/IncludedNote/Content gefüllt ist (InvoiceDescriptorReader.cs Zeile ca. 166).
In der Beispieldatei ZUGFeRD_1p0_COMFORT_Rabatte.pdf wird hierdurch aber eine relevante Zeile (Pfand) übersprungen bzw. nur die Bemerkung erfasst aber nicht Menge, Einheit, Preis...
I don't know how to interpret whether the invoice xml is ZUGFeRD 1.0 or 2.0
On July 1st the 2.1.1 version of ZUGFeRD released, it added the profile XRECHNUNG.
The difference in the example is minimal to the comfort (en16391/) profile.
I've gone ahead and compared the two profiles: diffchecker.com
Specification: download link
Siehe z.B.:
ID wurder zu IssuerAssignedID in ZUGFeRD 2.1 bei den folgenden XML Knoten:
EDIT: ebenso im Writer
Hallo,
sehe ich es richtig, dass es beim Import einer ZUGFeRD-Datei nicht möglich ist auf den Zeilenbetrag zuzugreifen?
Gemeint ist das Element mit dem XPath /rsm:CrossIndustryDocument/rsm:SpecifiedSupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedSupplyChainTradeSettlement/ram:SpecifiedTradeSettlementMonetarySummation/ram:LineTotalAmount
Gerade bei Rechnung im Basic-Profile wäre dies wichtig, da hier (zumindest im FeRD Beispiel
ZUGFeRD_1p0_BASIC_Einfach.pdf) außer Menge und Zeilenbetrag nichts enhalten ist.
Hi,
In Your solution, there are test files from ZUGFeRD 2.0 but Your solution seems to not support it.
In the description, I see that You have information that the readers are working with standards 1 and 2.
Question do You plan to implement readers for these standards or this is a bug?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.