Comments (9)
I will check this and come back a.s.a.p
from einvoicing-en16931.
Mapping corrected - SG 3 is now mapped correctly.
Please crosscheck.
from einvoicing-en16931.
The SG3 stuff is fixed. There is one difference left:
Example 1 generated:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<List>
<M_INVOIC>
Checked in file:
<?xml version="1.0" encoding="utf-8"?>
<M_INVOIC>
Same for example 2, 3, 4 and 5 (I stopped there).
Additionally when validating example 2, the following error occurs:
Usage validate_transaction example_number
Conversion to XSD java -jar map2xml-1.0-SNAPSHOT.jar "..\instance\EDIFACT_EXAMPLE2.txt"
Mapping Application
Warning: Line 143 column 38 (offset 0xd82): Envelope / Interchange / Group / Object / UNP: Segment 'SlZCRVJpMHhMalVOQ2lV
TkNqRWdNQ0J2WW1vT3k2SlRaWDliY2dSVnhJVkcuLi50Ykxvc0NoVTJYUmY5eGIvb21zY2dUWS9sWEVoVWI=UNP' is unrecognized.
Warning: Line 143 column 145 (offset 0xded): Envelope / Interchange / Group / Object / UNP: Segment 'SlZCRVJpMHhMalVOQ2l
VTkNqRWdNQ0J2WW1vT3k2SlRaWDliY2dSVnhJVkcuLi50Ykxvc0NoVTJYUmY5eGIvb21zY2dUWS9sWEVoVWI=UNP' is unexpected.
Warning: Line 143 column 145 (offset 0xded): Envelope: The following text was not parsed: '+104+P1'
Finished
Conversion done!
Validating XSD "..\schema\INVOIC_D14B_ISO20625.xsd" "..\instance\EDIFACT_EXAMPLE2.xml"
Starting validation against ERROR - [error] @ file:/D:/Entwicklung/git/validation/edifact/validator/../instance/EDIFACT_
EXAMPLE2.xml(1131:12) [SAX] cvc-complex-type.2.4.b: Content des Elements 'S_UNO' ist nicht vollstõndig. '{C_S302, C_S301
, C_S300, D_0035}' wird erwartet. (org.xml.sax.SAXParseException: cvc-complex-type.2.4.b: Content des Elements 'S_UNO' i
st nicht vollstõndig. '{C_S302, C_S301, C_S300, D_0035}' wird erwartet.)
ERROR - [error] @ file:/D:/Entwicklung/git/validation/edifact/validator/../instance/EDIFACT_EXAMPLE2.xml(1132:14) [SAX]
cvc-complex-type.2.4.b: Content des Elements 'P_OBJECT' ist nicht vollstõndig. '{DATA}' wird erwartet. (org.xml.sax.SAXP
arseException: cvc-complex-type.2.4.b: Content des Elements 'P_OBJECT' ist nicht vollstõndig. '{DATA}' wird erwartet.)
XSD validation done!
Validating Schematron "..\schematron\EN16931-EDIFACT-validation.sch" "..\instance\EDIFACT_EXAMPLE2.xml
from einvoicing-en16931.
from einvoicing-en16931.
from einvoicing-en16931.
All updated,
please test,
Jörg
from einvoicing-en16931.
Schaut gut aus. Nur bei Example7 gibt es noch relevante Diskrepanzen:
S_TAX/C_C243
ist im alten File drin (Zeile 245, Zeile 302 und Zeile 348) - wenn auch leer.
Anbei die neu generierte Datei:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<M_INVOIC>
<S_UNH>
<D_0062>INVOICE_test_7</D_0062>
<C_S009>
<D_0065>INVOIC</D_0065>
<D_0052>D</D_0052>
<D_0054>14B</D_0054>
<D_0051>UN</D_0051>
</C_S009>
</S_UNH>
<S_BGM>
<C_C002>
<D_1001>380</D_1001>
</C_C002>
<C_C106>
<D_1004>INVOICE_test_7</D_1004>
</C_C106>
</S_BGM>
<S_DTM>
<C_C507>
<D_2005>137</D_2005>
<D_2380>20130513</D_2380>
<D_2379>102</D_2379>
</C_C507>
</S_DTM>
<S_DTM>
<C_C507>
<D_2005>167</D_2005>
<D_2380>20130101</D_2380>
<D_2379>102</D_2379>
</C_C507>
</S_DTM>
<S_DTM>
<C_C507>
<D_2005>168</D_2005>
<D_2380>20131231</D_2380>
<D_2379>102</D_2379>
</C_C507>
</S_DTM>
<S_FTX>
<D_4451>AAB</D_4451>
<C_C108>
<D_4440>Payment within 30 days</D_4440>
</C_C108>
</S_FTX>
<S_FTX>
<D_4451>GEN</D_4451>
<C_C108>
<D_4440>Testscenario 7</D_4440>
</C_C108>
</S_FTX>
<S_FTX>
<D_4451>DOC</D_4451>
<C_C107>
<D_4441>P1</D_4441>
</C_C107>
<C_C108>
<D_4440>urn:cen.eu:en16931:2017</D_4440>
</C_C108>
</S_FTX>
<S_FTX>
<D_4451>AGM</D_4451>
<C_C108>
<D_4440>Tax</D_4440>
</C_C108>
</S_FTX>
<G_SG1>
<S_RFF>
<C_C506>
<D_1153>ON</D_1153>
<D_1154>Order_9988_x</D_1154>
</C_C506>
</S_RFF>
</G_SG1>
<G_SG2>
<S_NAD>
<D_3035>SE</D_3035>
<C_C082>
<D_3039>5532331183</D_3039>
</C_C082>
<C_C080>
<D_3036>The Sellercompany Incorporated</D_3036>
<D_3036_2>Civic Service Centre</D_3036_2>
</C_C080>
<C_C059>
<D_3042>Main street 2, Building 4</D_3042>
</C_C059>
<D_3164>Big city</D_3164>
<D_3251>54321</D_3251>
<D_3207>SE</D_3207>
</S_NAD>
<S_FII>
<D_3035>RB</D_3035>
<C_C078>
<D_3194>SE1212341234123412</D_3194>
</C_C078>
<C_C088>
<D_3433>SEXDABCD</D_3433>
</C_C088>
</S_FII>
<S_FII>
<D_3035>RB</D_3035>
<C_C078>
<D_3194>SE1212341234123412</D_3194>
</C_C078>
</S_FII>
<G_SG5>
<S_CTA>
<D_3139>SU</D_3139>
<C_C056>
<D_3412>Anthon Larsen</D_3412>
</C_C056>
</S_CTA>
<S_COM>
<C_C076>
<D_3148>4698989898</D_3148>
<D_3155>TE</D_3155>
</C_C076>
</S_COM>
<S_COM>
<C_C076>
<D_3148>[email protected]</D_3148>
<D_3155>EM</D_3155>
</C_C076>
</S_COM>
</G_SG5>
</G_SG2>
<G_SG2>
<S_NAD>
<D_3035>BY</D_3035>
<C_C080>
<D_3036>THe Buyercompany</D_3036>
</C_C080>
<C_C059>
<D_3042>Anystreet 8</D_3042>
<D_3042_2>Back door</D_3042_2>
</C_C059>
<D_3164>Anytown</D_3164>
<C_C819>
<D_3228>RegionB</D_3228>
</C_C819>
<D_3251>101</D_3251>
<D_3207>SE</D_3207>
</S_NAD>
<G_SG5>
<S_CTA>
<D_3139>SU</D_3139>
<C_C056>
<D_3412>3150bdn</D_3412>
</C_C056>
</S_CTA>
<S_COM>
<C_C076>
<D_3148>5121230</D_3148>
<D_3155>TE</D_3155>
</C_C076>
</S_COM>
<S_COM>
<C_C076>
<D_3148>[email protected]</D_3148>
<D_3155>EM</D_3155>
</C_C076>
</S_COM>
</G_SG5>
</G_SG2>
<G_SG7>
<S_CUX>
<C_C504>
<D_6347>2</D_6347>
<D_6345>SEK</D_6345>
</C_C504>
</S_CUX>
</G_SG7>
<G_SG8>
<S_PYT>
<D_4279>1</D_4279>
</S_PYT>
<S_PAI>
<C_C534>
<D_4461>30</D_4461>
</C_C534>
</S_PAI>
</G_SG8>
<G_SG27>
<S_LIN>
<D_1082>1</D_1082>
</S_LIN>
<S_PIA>
<D_4347>5</D_4347>
<C_C212>
<D_7140>RT3000</D_7140>
<D_7143>SA</D_7143>
</C_C212>
</S_PIA>
<S_IMD>
<D_7077>F</D_7077>
<C_C273>
<D_7008>Road tax</D_7008>
</C_C273>
</S_IMD>
<S_IMD>
<D_7077>A</D_7077>
<C_C273>
<D_7008>Weight-based tax, vehicles >3000 KGM</D_7008>
</C_C273>
</S_IMD>
<S_QTY>
<C_C186>
<D_6063>47</D_6063>
<D_6060>1</D_6060>
<D_6411>C62</D_6411>
</C_C186>
</S_QTY>
<G_SG28>
<S_MOA>
<C_C516>
<D_5025>203</D_5025>
<D_5004>2500</D_5004>
</C_C516>
</S_MOA>
</G_SG28>
<G_SG30>
<S_PRI>
<C_C509>
<D_5125>AAA</D_5125>
<D_5118>2500</D_5118>
</C_C509>
</S_PRI>
</G_SG30>
<G_SG31>
<S_RFF>
<C_C506>
<D_1153>ON</D_1153>
<D_1156>1</D_1156>
</C_C506>
</S_RFF>
</G_SG31>
<G_SG35>
<S_TAX>
<D_5283>7</D_5283>
<C_C241>
<D_5153>VAT</D_5153>
</C_C241>
<D_5305>O</D_5305>
</S_TAX>
</G_SG35>
</G_SG27>
<G_SG27>
<S_LIN>
<D_1082>2</D_1082>
</S_LIN>
<S_PIA>
<D_4347>5</D_4347>
<C_C212>
<D_7140>REG</D_7140>
<D_7143>SA</D_7143>
</C_C212>
</S_PIA>
<S_IMD>
<D_7077>F</D_7077>
<C_C273>
<D_7008>Road Register fee</D_7008>
</C_C273>
</S_IMD>
<S_IMD>
<D_7077>A</D_7077>
<C_C273>
<D_7008>Annual registration fee</D_7008>
</C_C273>
</S_IMD>
<S_QTY>
<C_C186>
<D_6063>47</D_6063>
<D_6060>1</D_6060>
<D_6411>C62</D_6411>
</C_C186>
</S_QTY>
<G_SG28>
<S_MOA>
<C_C516>
<D_5025>203</D_5025>
<D_5004>700</D_5004>
</C_C516>
</S_MOA>
</G_SG28>
<G_SG30>
<S_PRI>
<C_C509>
<D_5125>AAA</D_5125>
<D_5118>700</D_5118>
</C_C509>
</S_PRI>
</G_SG30>
<G_SG35>
<S_TAX>
<D_5283>7</D_5283>
<C_C241>
<D_5153>VAT</D_5153>
</C_C241>
<D_5305>O</D_5305>
</S_TAX>
</G_SG35>
</G_SG27>
<S_UNS>
<D_0081>S</D_0081>
</S_UNS>
<G_SG52>
<S_MOA>
<C_C516>
<D_5025>79</D_5025>
<D_5004>3200</D_5004>
</C_C516>
</S_MOA>
</G_SG52>
<G_SG52>
<S_MOA>
<C_C516>
<D_5025>389</D_5025>
<D_5004>3200</D_5004>
</C_C516>
</S_MOA>
</G_SG52>
<G_SG52>
<S_MOA>
<C_C516>
<D_5025>388</D_5025>
<D_5004>3200</D_5004>
</C_C516>
</S_MOA>
</G_SG52>
<G_SG52>
<S_MOA>
<C_C516>
<D_5025>9</D_5025>
<D_5004>3200</D_5004>
</C_C516>
</S_MOA>
</G_SG52>
<G_SG54>
<S_TAX>
<D_5283>7</D_5283>
<C_C241>
<D_5153>VAT</D_5153>
</C_C241>
<D_5305>O</D_5305>
</S_TAX>
<S_MOA>
<C_C516>
<D_5025>125</D_5025>
<D_5004>3200</D_5004>
</C_C516>
</S_MOA>
<S_MOA>
<C_C516>
<D_5025>124</D_5025>
<D_5004>0</D_5004>
</C_C516>
</S_MOA>
</G_SG54>
<S_UNT>
<D_0074>49</D_0074>
<D_0062>INVOICE_test_7</D_0062>
</S_UNT>
</M_INVOIC>
from einvoicing-en16931.
Hallo Philip,
danke für die Prüfung.
Das Verhalten ist aber so in Ordnung.
Die EDIFACT-Nachricht enthält ein leeres Datenelement in einem Gruppendatenelement.
So sieht das Original aus
TAX+7+VAT+++:::+O'
So wäre es richtig
TAX+7+VAT++++O'
Da kein Inhalt im DE ist, wird auch kein Ziel-Datenelement in XML gebildet und damit auch keine Gruppe.
Würde das Mapping anders arbeiten, müßte der Validator nicht nur prüfen, dass Pflicht-Datenelemente in XML vorhanden sind, sondern immer auch, dass sie nicht leer sind.
from einvoicing-en16931.
Okay - if you think it is okay, it is okay :)
from einvoicing-en16931.
Related Issues (20)
- BR-17 rule checks too hard? HOT 4
- Typo in rule-text UBL-CR-583, UBL-CR-577 and UBL-CR-572 (UBL) HOT 1
- Typo in rule-text UBL-CR-282, UBL-CR-247 and UBL-CR-183 (UBL) HOT 1
- UBL-SR-51 does not check cac:DeliveryLocation HOT 1
- Error in Validation of Rule BR-E-08 HOT 1
- CII - missing cardinality check for ApplicableTradeTax (BG-30) HOT 1
- Validate line total HOT 1
- `UBL-SR-43` using attribute `scheme` instead of `schemeID` HOT 1
- CII BT-17 and BT-18 checks to be improved HOT 1
- CII Missing check on DefinedTradeContact cardinality HOT 1
- Cardinality of DesignatedProductClassification in CII might stop the check BR-65
- add missing currency codes HOT 2
- Bug in CII BR-65 HOT 3
- Add EAS code 0218 HOT 1
- BR-17 fails on equal payee and seller
- Move PEPPOL-EN16931-R046 rule to EN16931? HOT 2
- UBL-SR-32 HOT 9
- missing cardinality check for Value added tax point date (BT-7) and Value added tax point date code (BT-8) in CII HOT 1
- Undocumented and missing changes in v.1.3.11 release HOT 3
- BR-33 / BR-CO-21 rules validation doesn't work on CII files (OK on UBL files) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from einvoicing-en16931.