mock-einvoice 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) hide show
  1. mock_einvoice-0.1.0/CHANGELOG.md +214 -0
  2. mock_einvoice-0.1.0/LICENSE +21 -0
  3. mock_einvoice-0.1.0/MANIFEST.in +5 -0
  4. mock_einvoice-0.1.0/PKG-INFO +383 -0
  5. mock_einvoice-0.1.0/README.md +353 -0
  6. mock_einvoice-0.1.0/mock_einvoice.egg-info/PKG-INFO +383 -0
  7. mock_einvoice-0.1.0/mock_einvoice.egg-info/SOURCES.txt +409 -0
  8. mock_einvoice-0.1.0/mock_einvoice.egg-info/dependency_links.txt +1 -0
  9. mock_einvoice-0.1.0/mock_einvoice.egg-info/entry_points.txt +2 -0
  10. mock_einvoice-0.1.0/mock_einvoice.egg-info/top_level.txt +1 -0
  11. mock_einvoice-0.1.0/mockeinvoice/__init__.py +77 -0
  12. mock_einvoice-0.1.0/mockeinvoice/__main__.py +6 -0
  13. mock_einvoice-0.1.0/mockeinvoice/buyer.py +301 -0
  14. mock_einvoice-0.1.0/mockeinvoice/model.py +456 -0
  15. mock_einvoice-0.1.0/mockeinvoice/response.py +337 -0
  16. mock_einvoice-0.1.0/mockeinvoice/rules/LICENSE-EUPL-1.2.txt +194 -0
  17. mock_einvoice-0.1.0/mockeinvoice/rules/__init__.py +250 -0
  18. mock_einvoice-0.1.0/mockeinvoice/rules/calculation.py +215 -0
  19. mock_einvoice-0.1.0/mockeinvoice/rules/codelists.py +372 -0
  20. mock_einvoice-0.1.0/mockeinvoice/rules/en16931.py +644 -0
  21. mock_einvoice-0.1.0/mockeinvoice/rules/en16931_codes.py +180 -0
  22. mock_einvoice-0.1.0/mockeinvoice/rules/en16931_ubl.py +341 -0
  23. mock_einvoice-0.1.0/mockeinvoice/rules/en16931_vat.py +429 -0
  24. mock_einvoice-0.1.0/mockeinvoice/rules/german.py +281 -0
  25. mock_einvoice-0.1.0/mockeinvoice/rules/peppol.py +780 -0
  26. mock_einvoice-0.1.0/mockeinvoice/rules/peppol_de.py +32 -0
  27. mock_einvoice-0.1.0/mockeinvoice/rules/peppol_response.py +308 -0
  28. mock_einvoice-0.1.0/mockeinvoice/rules/published.py +1319 -0
  29. mock_einvoice-0.1.0/mockeinvoice/rules/tree.py +171 -0
  30. mock_einvoice-0.1.0/mockeinvoice/rules/ublsyntax.py +790 -0
  31. mock_einvoice-0.1.0/mockeinvoice/rules/untdid.py +23 -0
  32. mock_einvoice-0.1.0/mockeinvoice/rules/xrechnung.py +94 -0
  33. mock_einvoice-0.1.0/mockeinvoice/server.py +477 -0
  34. mock_einvoice-0.1.0/mockeinvoice/specification.py +75 -0
  35. mock_einvoice-0.1.0/mockeinvoice/supplier.py +189 -0
  36. mock_einvoice-0.1.0/mockeinvoice/ubl.py +792 -0
  37. mock_einvoice-0.1.0/pyproject.toml +53 -0
  38. mock_einvoice-0.1.0/setup.cfg +4 -0
  39. mock_einvoice-0.1.0/tests/__init__.py +24 -0
  40. mock_einvoice-0.1.0/tests/samples/external/en16931/FT G2G_TD01 con Allegato, Bonifico e Split Payment.xml +152 -0
  41. mock_einvoice-0.1.0/tests/samples/external/en16931/LICENSE-EUPL-1.2.txt +194 -0
  42. mock_einvoice-0.1.0/tests/samples/external/en16931/README.md +24 -0
  43. mock_einvoice-0.1.0/tests/samples/external/en16931/guide-example1.xml +528 -0
  44. mock_einvoice-0.1.0/tests/samples/external/en16931/guide-example2.xml +445 -0
  45. mock_einvoice-0.1.0/tests/samples/external/en16931/guide-example3.xml +152 -0
  46. mock_einvoice-0.1.0/tests/samples/external/en16931/issue116.xml +250 -0
  47. mock_einvoice-0.1.0/tests/samples/external/en16931/sample-discount-price.xml +125 -0
  48. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-creditnote1.xml +136 -0
  49. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-example1.xml +530 -0
  50. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-example10.xml +532 -0
  51. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-example2.xml +460 -0
  52. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-example3.xml +171 -0
  53. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-example4.xml +192 -0
  54. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-example5.xml +409 -0
  55. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-example6.xml +136 -0
  56. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-example7.xml +153 -0
  57. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-example8.xml +410 -0
  58. mock_einvoice-0.1.0/tests/samples/external/en16931/ubl-tc434-example9.xml +126 -0
  59. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-01.xml +38 -0
  60. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-02.xml +37 -0
  61. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-03.xml +38 -0
  62. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-04.xml +38 -0
  63. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-05.xml +38 -0
  64. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-06.xml +111 -0
  65. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-07.xml +116 -0
  66. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-08.xml +113 -0
  67. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-09.xml +77 -0
  68. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-10.xml +113 -0
  69. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-11.xml +77 -0
  70. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-12.xml +44 -0
  71. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-13.xml +43 -0
  72. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-14.xml +43 -0
  73. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-15.xml +42 -0
  74. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-16.xml +41 -0
  75. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-17.xml +49 -0
  76. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-18.xml +49 -0
  77. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-19.xml +70 -0
  78. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-20.xml +68 -0
  79. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-21.xml +44 -0
  80. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-22.xml +45 -0
  81. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-23.xml +45 -0
  82. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-24.xml +44 -0
  83. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-25.xml +48 -0
  84. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-26.xml +48 -0
  85. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-27.xml +65 -0
  86. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-28.xml +71 -0
  87. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-29.xml +64 -0
  88. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-30.xml +70 -0
  89. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-31.xml +49 -0
  90. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-32.xml +78 -0
  91. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-33.xml +68 -0
  92. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-36.xml +48 -0
  93. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-37.xml +80 -0
  94. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-38.xml +66 -0
  95. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-41.xml +53 -0
  96. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-42.xml +73 -0
  97. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-43.xml +51 -0
  98. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-44.xml +73 -0
  99. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-45.xml +48 -0
  100. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-46.xml +47 -0
  101. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-47.xml +79 -0
  102. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-48.xml +83 -0
  103. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-49.xml +41 -0
  104. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-50.xml +102 -0
  105. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-51.xml +45 -0
  106. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-52.xml +47 -0
  107. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-53.xml +57 -0
  108. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-54.xml +97 -0
  109. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-55.xml +65 -0
  110. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-56.xml +73 -0
  111. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-57.xml +69 -0
  112. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-61.xml +100 -0
  113. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-62.xml +46 -0
  114. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-63.xml +46 -0
  115. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-64.xml +50 -0
  116. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-65.xml +50 -0
  117. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CL-16.xml +40 -0
  118. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CL-18.xml +51 -0
  119. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CL-24.xml +46 -0
  120. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CO-13.xml +230 -0
  121. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CO-15-2.xml +90 -0
  122. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CO-15.xml +186 -0
  123. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CO-25.xml +132 -0
  124. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-E-01.xml +319 -0
  125. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-S-09.xml +122 -0
  126. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/UBL-SR-42.xml +82 -0
  127. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/UBL-SR-43.xml +49 -0
  128. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/UBL-SR-44.xml +154 -0
  129. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/CreditNote-unit-UBL/UBL-SR-47.xml +94 -0
  130. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-01.xml +38 -0
  131. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-02.xml +37 -0
  132. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-03.xml +38 -0
  133. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-04.xml +38 -0
  134. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-05.xml +38 -0
  135. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-06.xml +111 -0
  136. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-07.xml +116 -0
  137. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-08.xml +113 -0
  138. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-09.xml +77 -0
  139. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-10.xml +113 -0
  140. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-11.xml +77 -0
  141. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-12.xml +44 -0
  142. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-13.xml +43 -0
  143. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-14.xml +43 -0
  144. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-15.xml +42 -0
  145. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-16.xml +41 -0
  146. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-17.xml +49 -0
  147. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-18.xml +49 -0
  148. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-19.xml +70 -0
  149. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-20.xml +68 -0
  150. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-21.xml +44 -0
  151. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-22.xml +45 -0
  152. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-23.xml +45 -0
  153. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-24.xml +44 -0
  154. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-25.xml +48 -0
  155. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-26.xml +48 -0
  156. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-27.xml +65 -0
  157. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-28.xml +71 -0
  158. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-29.xml +65 -0
  159. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-30.xml +71 -0
  160. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-31.xml +49 -0
  161. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-32.xml +82 -0
  162. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-33.xml +68 -0
  163. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-36.xml +48 -0
  164. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-37.xml +86 -0
  165. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-38.xml +66 -0
  166. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-41.xml +53 -0
  167. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-42.xml +73 -0
  168. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-43.xml +51 -0
  169. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-44.xml +73 -0
  170. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-45.xml +48 -0
  171. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-46.xml +47 -0
  172. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-47.xml +85 -0
  173. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-48.xml +84 -0
  174. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-49.xml +41 -0
  175. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-50.xml +102 -0
  176. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-51.xml +44 -0
  177. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-52.xml +47 -0
  178. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-53.xml +57 -0
  179. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-54.xml +97 -0
  180. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-55.xml +65 -0
  181. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-56.xml +73 -0
  182. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-57.xml +69 -0
  183. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-61.xml +100 -0
  184. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-62.xml +46 -0
  185. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-63.xml +46 -0
  186. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-64.xml +50 -0
  187. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-65.xml +50 -0
  188. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-01.xml +387 -0
  189. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-02.xml +601 -0
  190. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-03.xml +583 -0
  191. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-04.xml +584 -0
  192. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-05.xml +83 -0
  193. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-06.xml +79 -0
  194. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-07.xml +79 -0
  195. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-08.xml +565 -0
  196. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-09.xml +82 -0
  197. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-10.xml +108 -0
  198. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-01.xml +37 -0
  199. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-03.xml +110 -0
  200. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-04.xml +37 -0
  201. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-05.xml +37 -0
  202. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-06.xml +43 -0
  203. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-07.xml +113 -0
  204. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-10.xml +110 -0
  205. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-11.xml +91 -0
  206. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-13.xml +55 -0
  207. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-14.xml +138 -0
  208. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-15.xml +51 -0
  209. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-16.xml +39 -0
  210. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-17.xml +62 -0
  211. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-18.xml +50 -0
  212. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-19.xml +57 -0
  213. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-20.xml +63 -0
  214. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-21.xml +97 -0
  215. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-23.xml +58 -0
  216. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-24.xml +45 -0
  217. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-03.xml +71 -0
  218. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-04.xml +79 -0
  219. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-09.xml +124 -0
  220. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-10.xml +200 -0
  221. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-11.xml +159 -0
  222. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-12.xml +159 -0
  223. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-13.xml +267 -0
  224. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-14.xml +151 -0
  225. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-15-2.xml +90 -0
  226. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-15.xml +187 -0
  227. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-16.xml +247 -0
  228. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-17.xml +299 -0
  229. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-18.xml +61 -0
  230. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-19.xml +113 -0
  231. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-20.xml +90 -0
  232. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-21.xml +77 -0
  233. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-22.xml +77 -0
  234. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-23.xml +85 -0
  235. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-24.xml +89 -0
  236. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-25.xml +147 -0
  237. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-26.xml +139 -0
  238. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-01.xml +364 -0
  239. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-02.xml +263 -0
  240. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-03.xml +223 -0
  241. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-04.xml +251 -0
  242. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-05.xml +82 -0
  243. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-06.xml +79 -0
  244. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-07.xml +79 -0
  245. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-08.xml +565 -0
  246. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-09.xml +82 -0
  247. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-10.xml +112 -0
  248. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-01.xml +336 -0
  249. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-02.xml +234 -0
  250. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-03.xml +193 -0
  251. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-04.xml +193 -0
  252. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-05.xml +82 -0
  253. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-06.xml +79 -0
  254. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-07.xml +79 -0
  255. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-08.xml +562 -0
  256. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-09.xml +89 -0
  257. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-10.xml +106 -0
  258. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-01.xml +358 -0
  259. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-02.xml +349 -0
  260. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-03.xml +348 -0
  261. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-04.xml +348 -0
  262. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-05.xml +85 -0
  263. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-06.xml +82 -0
  264. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-07.xml +82 -0
  265. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-08.xml +600 -0
  266. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-09.xml +84 -0
  267. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-11.xml +178 -0
  268. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-12.xml +281 -0
  269. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-01.xml +306 -0
  270. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-02.xml +305 -0
  271. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-03.xml +296 -0
  272. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-04.xml +296 -0
  273. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-05.xml +86 -0
  274. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-06.xml +82 -0
  275. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-07.xml +82 -0
  276. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-08-1.xml +300 -0
  277. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-08-2.xml +339 -0
  278. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-08-3.xml +339 -0
  279. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-09.xml +129 -0
  280. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-10.xml +106 -0
  281. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-01.xml +241 -0
  282. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-02.xml +236 -0
  283. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-03.xml +193 -0
  284. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-04.xml +193 -0
  285. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-05.xml +86 -0
  286. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-06.xml +82 -0
  287. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-07.xml +82 -0
  288. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-08-1.xml +300 -0
  289. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-08-2.xml +339 -0
  290. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-08-3.xml +339 -0
  291. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-09.xml +129 -0
  292. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-10.xml +106 -0
  293. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-01.xml +351 -0
  294. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-02.xml +135 -0
  295. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-03.xml +139 -0
  296. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-04.xml +137 -0
  297. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-05.xml +56 -0
  298. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-06.xml +54 -0
  299. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-07.xml +54 -0
  300. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-08.xml +589 -0
  301. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-09.xml +85 -0
  302. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-10.xml +112 -0
  303. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-11.xml +69 -0
  304. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-12.xml +133 -0
  305. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-13.xml +127 -0
  306. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-14.xml +127 -0
  307. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-01.xml +306 -0
  308. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-02.xml +297 -0
  309. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-03.xml +263 -0
  310. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-04.xml +291 -0
  311. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-05.xml +86 -0
  312. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-06.xml +82 -0
  313. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-07.xml +82 -0
  314. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-08-1.xml +300 -0
  315. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-08-2.xml +342 -0
  316. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-08-3.xml +342 -0
  317. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-09.xml +186 -0
  318. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-10.xml +106 -0
  319. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-01.xml +342 -0
  320. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-02.xml +234 -0
  321. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-03.xml +260 -0
  322. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-04.xml +262 -0
  323. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-05.xml +85 -0
  324. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-06.xml +82 -0
  325. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-07.xml +82 -0
  326. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-08.xml +589 -0
  327. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-09.xml +85 -0
  328. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-10.xml +114 -0
  329. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-DT-01.xml +99 -0
  330. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-DT-06.xml +45 -0
  331. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-DT-07.xml +45 -0
  332. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-SR-12.xml +73 -0
  333. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-SR-18.xml +77 -0
  334. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-SR-42.xml +82 -0
  335. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-SR-44.xml +154 -0
  336. mock_einvoice-0.1.0/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-SR-47.xml +95 -0
  337. mock_einvoice-0.1.0/tests/samples/external/xrechnung/LICENSE-Apache-2.0.txt +201 -0
  338. mock_einvoice-0.1.0/tests/samples/external/xrechnung/README.md +25 -0
  339. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/extension/04.01a-INVOICE_ubl.xml +391 -0
  340. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/extension/04.02a-INVOICE_ubl.xml +161 -0
  341. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/extension/04.03a-INVOICE_ubl.xml +1234 -0
  342. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/extension/04.04a-INVOICE_ubl.xml +266 -0
  343. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/extension/05.01a-INVOICE_ubl.xml +167 -0
  344. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.01a-INVOICE_ubl.xml +145 -0
  345. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.02a-INVOICE_ubl.xml +134 -0
  346. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.03a-INVOICE_ubl.xml +153 -0
  347. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.04a-INVOICE_ubl.xml +115 -0
  348. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.05a-INVOICE_ubl.xml +192 -0
  349. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.06a-INVOICE_ubl.xml +244 -0
  350. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.07a-INVOICE_ubl.xml +126 -0
  351. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.08a-INVOICE_ubl.xml +133 -0
  352. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.09a-INVOICE_ubl.xml +130 -0
  353. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.10a-INVOICE_ubl.xml +153 -0
  354. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.11a-INVOICE_ubl.xml +169 -0
  355. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.12a-INVOICE_ubl.xml +211 -0
  356. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.13a-INVOICE_ubl.xml +299 -0
  357. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.14a-INVOICE_ubl.xml +188 -0
  358. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.15a-INVOICE_ubl.xml +200 -0
  359. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.17a-INVOICE_ubl.xml +146 -0
  360. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.18a-INVOICE_ubl.xml +197 -0
  361. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.19a-INVOICE_ubl.xml +182 -0
  362. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.20a-INVOICE_ubl.xml +175 -0
  363. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/01.21a-INVOICE_ubl.xml +154 -0
  364. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/02.01a-INVOICE_ubl.xml +296 -0
  365. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/02.02a-INVOICE_ubl.xml +285 -0
  366. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/02.03a-INVOICE_ubl.xml +296 -0
  367. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/02.04a-INVOICE_ubl.xml +296 -0
  368. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/02.05a-INVOICE_ubl.xml +592 -0
  369. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/02.06a-INVOICE_ubl.xml +171 -0
  370. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/03.01a-INVOICE_ubl.xml +452 -0
  371. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/03.02a-INVOICE_ubl.xml +200 -0
  372. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/03.03a-INVOICE_ubl.xml +211 -0
  373. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/03.04a-INVOICE_ubl.xml +320 -0
  374. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/03.05a-INVOICE_ubl.xml +184 -0
  375. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/03.06a-INVOICE_ubl.xml +199 -0
  376. mock_einvoice-0.1.0/tests/samples/external/xrechnung/business-cases/standard/03.07a-INVOICE_ubl.xml +472 -0
  377. mock_einvoice-0.1.0/tests/samples/external/xrechnung/technical-cases/cius/01.01_comprehensive_test_ubl.xml +455 -0
  378. mock_einvoice-0.1.0/tests/samples/external/xrechnung/technical-cases/cius/01.02_comprehensive_test_ubl.xml +389 -0
  379. mock_einvoice-0.1.0/tests/samples/external/xrechnung/technical-cases/cius/01.03_comprehensive_test_ubl.xml +372 -0
  380. mock_einvoice-0.1.0/tests/samples/external/xrechnung/technical-cases/cius/01.04_comprehensive_test_ubl.xml +376 -0
  381. mock_einvoice-0.1.0/tests/samples/external/xrechnung/technical-cases/cius/01.05_minimal_test_ubl.xml +93 -0
  382. mock_einvoice-0.1.0/tests/samples/external/xrechnung/technical-cases/cius/01.06_minimal_test_ubl.xml +99 -0
  383. mock_einvoice-0.1.0/tests/samples/external/xrechnung/technical-cases/cvd/02.01a-cvd_INVOICE_ubl.xml +462 -0
  384. mock_einvoice-0.1.0/tests/samples/peppol-creditnote.xml +218 -0
  385. mock_einvoice-0.1.0/tests/samples/peppol-invoice.xml +208 -0
  386. mock_einvoice-0.1.0/tests/samples/peppol-response.xml +67 -0
  387. mock_einvoice-0.1.0/tests/samples/xrechnung-invoice.xml +208 -0
  388. mock_einvoice-0.1.0/tests/test_business_rules.py +568 -0
  389. mock_einvoice-0.1.0/tests/test_buyer.py +276 -0
  390. mock_einvoice-0.1.0/tests/test_code_rules.py +356 -0
  391. mock_einvoice-0.1.0/tests/test_model.py +98 -0
  392. mock_einvoice-0.1.0/tests/test_peppol_de_rules.py +293 -0
  393. mock_einvoice-0.1.0/tests/test_peppol_rules.py +547 -0
  394. mock_einvoice-0.1.0/tests/test_reading.py +418 -0
  395. mock_einvoice-0.1.0/tests/test_refusals.py +148 -0
  396. mock_einvoice-0.1.0/tests/test_response.py +580 -0
  397. mock_einvoice-0.1.0/tests/test_rules.py +585 -0
  398. mock_einvoice-0.1.0/tests/test_server.py +460 -0
  399. mock_einvoice-0.1.0/tests/test_supplier.py +175 -0
  400. mock_einvoice-0.1.0/tests/test_ubl_rules.py +597 -0
  401. mock_einvoice-0.1.0/tests/test_upstream.py +277 -0
  402. mock_einvoice-0.1.0/tests/test_vat_rules.py +522 -0
  403. mock_einvoice-0.1.0/tests/test_writing.py +347 -0
  404. mock_einvoice-0.1.0/tests/test_xrechnung_rules.py +230 -0
  405. mock_einvoice-0.1.0/tests/upstream.py +161 -0
  406. mock_einvoice-0.1.0/tools/code_lists.py +89 -0
  407. mock_einvoice-0.1.0/tools/fetch_peppol.py +98 -0
  408. mock_einvoice-0.1.0/tools/peppol-files.tsv +101 -0
  409. mock_einvoice-0.1.0/tools/peppol-response-files.tsv +28 -0
  410. mock_einvoice-0.1.0/tools/published_rules.py +85 -0
  411. mock_einvoice-0.1.0/tools/ubl_syntax.py +94 -0
@@ -0,0 +1,214 @@
1
+ # Changelog
2
+
3
+ Every release of [mock-einvoice](https://pypi.org/project/mock-einvoice/). The
4
+ format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the
5
+ versions follow [semantic versioning](https://semver.org/spec/v2.0.0.html) -
6
+ while the major version is 0, a minor bump may change behaviour, and each entry
7
+ says so where it does.
8
+
9
+ ## [Unreleased]
10
+
11
+ Nothing yet.
12
+
13
+ ## [0.1.0] - 2026-10-07
14
+
15
+ The first release. It reads and writes UBL invoices and credit notes and
16
+ holds them to every rule of the EN 16931 core, to Peppol's own rules and its
17
+ rules for Germany, and to XRechnung's; it reads, writes and holds the Peppol
18
+ Invoice Response; and over HTTP it is a buyer that takes invoices in and
19
+ answers them, and a supplier that sends them and takes the answers.
20
+
21
+ Not in it: Peppol's rules for sellers in seven other countries ([#18]), whose
22
+ documents are "not judged" and are not taken in by the server; CII, XRechnung
23
+ Extension and ZUGFeRD, which are refused by name; any real transport; and
24
+ any tie to mock-sap, which is for mock-acme to make.
25
+
26
+ What is under "Fixed" was found and fixed while this release was being
27
+ built, and was in no release.
28
+
29
+ ### Added
30
+
31
+ - **The server, as a supplier** ([#27]): `POST /_mock/sent` sends a UBL
32
+ invoice or credit note to `--buyer-url`, after holding it to its rules; one
33
+ that is not `valid` is not sent unless `?force=true`. `POST /responses`
34
+ takes a Peppol Invoice Response, holds it to its 82 rules, and finds the
35
+ document it is about by number and type code; the document's status is the
36
+ last thing its buyer said. A response that comes out of the order Peppol's
37
+ guide gives is taken and ignored, as the guide says a seller may, and is
38
+ marked with the rule. One process is buyer and supplier both, and two can
39
+ be pointed at each other. The supplier writes no invoices of its own.
40
+ `GET /` now says `"sides"`, and each entry of `/_mock/turned-away` says
41
+ which side turned it away.
42
+ - **`GET /_mock/health` and `-q`**, as mock-sap, mock-edi and mock-bank have
43
+ them: what starts the mocks together asks each for its health and passes
44
+ each `-q`. The line the server prints when it starts goes to standard
45
+ output, as theirs do.
46
+ - **The server, as a buyer** ([#25]): `mock-einvoice --port 8100`, or
47
+ `python -m mockeinvoice`. `POST /invoices` takes a UBL invoice or credit
48
+ note in if it is `valid`, and turns it away with its findings if it is
49
+ `invalid`, or with the rules that were not run if it is `not judged`. The
50
+ buyer answers Peppol documents with Invoice Responses, each held to its 82
51
+ rules before it goes and `POST`ed to `--seller-url`: an acknowledgement on
52
+ receipt where billing's profile makes a response a required step, and
53
+ whatever a test asks for after that (`POST /_mock/invoices/<id>/responses`).
54
+ It keeps to the process rules of Peppol's guide, which no Schematron file
55
+ has (`OP-BR111-R004`, `-R005`, `-R012`, `-R014`), and `"force"` sends a
56
+ response out of order for a seller's system to cope with. `/_mock` has what
57
+ is held, what was turned away, a validator that keeps nothing, and a reset.
58
+ Nothing happens with time, a duplicate is taken like the first, and nothing
59
+ is kept on disk.
60
+ - **The Peppol Invoice Response** ([#23]): what a buyer answers an invoice
61
+ with. A model, a reader and a writer for the UBL `ApplicationResponse`
62
+ (`read_response`, `write_response`, `validate_response`), and all 82 of its
63
+ published rules, pinned to release 3.0.17. Peppol's fourteen examples are
64
+ read, written back element for element and are `valid`, and its unit tests
65
+ agree. One rule holds a type code to UNTDID 1001; its 727 code values are
66
+ taken from the United Nations' own directory, edition D.17A, without their
67
+ names or descriptions.
68
+ - **XRechnung 3.0's rules** ([#19]): the 34 of a standard XRechnung document,
69
+ `BR-DE-*`, `BR-TMP-2` and `BR-TMP-6`. Thirty-one are the same tests as
70
+ Peppol's rules for Germany and are written once, registered under each
71
+ layer's names. An XRechnung document with nothing found wrong is now
72
+ `valid`: all 39 valid documents of the XRechnung test suite are. The rules
73
+ of XRechnung Extension and CVD are not built; their documents are still
74
+ refused by name, and a standard document does not wait on them.
75
+ - **A finding can be information** ([#19]): XRechnung publishes one rule
76
+ flagged `information`, and it is reported as that. It is no failure and no
77
+ warning.
78
+ - **Peppol's rules for Germany** ([#17]): `DE-R-001` to `DE-R-031` and
79
+ `DE-R-T02`, 31 rules, asked where seller and buyer are both in Germany.
80
+ All 65 of Peppol's unit test cases for them agree, which makes all 396 of
81
+ its cases. A Peppol document between German parties with nothing found
82
+ wrong is now `valid`, this project's own samples among them.
83
+ - **Peppol BIS Billing 3.0's own rules** ([#16]): the 63 Peppol asks of every
84
+ document, `PEPPOL-EN16931-*` and `PEPPOL-COMMON-*`, among them the
85
+ checksums of identifiers by their scheme. All 331 of Peppol's unit test
86
+ cases for them agree. Nothing is copied from Peppol's rule file: the rules
87
+ are written from reading its tests, and its code lists are the core's with
88
+ the differences named.
89
+ - **A verdict of `valid`** ([#16]). A report now lists apart the unbuilt
90
+ rules that could not apply to a document (`not_applicable`): the rules for
91
+ a seller's country, of a document from another. They are not waited on, so
92
+ a Peppol document from a country with no national rules, with nothing found
93
+ wrong, is `valid`. Nine of Peppol's ten examples are.
94
+ - **The rules of the EN 16931 core about the UBL document itself** ([#11]):
95
+ `UBL-CR`, `UBL-DT` and `UBL-SR`, 756 rules, which makes all 979 of the core
96
+ built. They are asked of the document's elements and not of the model:
97
+ `validate` asks them of the document as sent, and `check`, given only a
98
+ model, of the document it would be written as. All but 26 are one of two
99
+ tests with a different path in each; the paths are generated from the
100
+ published rules by `tools/ubl_syntax.py` into `rules/ublsyntax.py`, which
101
+ like the code lists is under the EUPL 1.2. Only 9 of the 756 have a unit
102
+ test from their publisher, and those agree; the rest are held to the
103
+ standard library's reading of the same paths.
104
+ - **An element is reported once** ([#11]). Where a published rule reports an
105
+ element the reader does not hold, or one that is repeated, the reader's own
106
+ finding about it is left out of the report.
107
+ - **The code list rules of the EN 16931 core** ([#10]): `BR-CL-01` to
108
+ `BR-CL-26`, 23 rules, which makes 223 built and leaves only the rules about
109
+ the UBL document itself. The lists are generated from the published rules
110
+ by `tools/code_lists.py` and kept exactly as published. They are under the
111
+ EUPL 1.2 and not this package's MIT: they are in one file,
112
+ `rules/codelists.py`, with the licence text beside it, in the wheel too.
113
+ Of the publisher's 48 unit test cases for them, 47 agree. The other is in
114
+ a credit note with an invoice's line in it, which the reader does not hold
115
+ and says so, and is counted apart.
116
+ - **The VAT category rules of the EN 16931 core** ([#9]): 98 rules in ten
117
+ families, one to a category code (`BR-S`, `BR-Z`, `BR-E`, `BR-AE`, `BR-IC`,
118
+ `BR-G`, `BR-O`, `BR-AF`, `BR-AG`, `BR-B`), which makes 200 built. They are
119
+ one pattern with each family's differences named, and the differences are
120
+ the published ones. All 587 of the publisher's unit test cases for them
121
+ agree; three of the rules have no published case and rest on this
122
+ project's tests. `BR-S-08`, `BR-AF-08` and `BR-AG-08` allow a taxable
123
+ amount one unit of leeway and are published computing it as a double, so
124
+ that one sum is done as a double here too. No amount is held as a float.
125
+ - **The plain business rules of the EN 16931 core** ([#8]): `BR-01` to
126
+ `BR-65`, 58 rules on what a document must have in it, which makes 102 built.
127
+ Each asks what its published test asks: some that an element has something
128
+ in it, some only that it is there, which an empty element is. All 312 of
129
+ the publisher's unit test cases for them agree. A reference told by its
130
+ type code (the invoiced object, a credit note's project) that is written
131
+ with no identifier is now held as having been there, so `BR-52` can ask it
132
+ and the writer no longer drops it.
133
+ - **A rule engine, and the first 44 rules of the EN 16931 core** ([#3]): the
134
+ calculation rules (`BR-CO-*`) and the rules on how many decimals an amount
135
+ carries (`BR-DEC-*`). A rule is one function under its published identifier.
136
+ A finding gives that identifier, the publisher's flag, where in the model
137
+ it failed, a description in this project's words, and a link to the
138
+ published rule; the publisher's wording is not reproduced. The arithmetic
139
+ is XPath's, as the published tests have it: a tie rounds towards positive
140
+ infinity, and a total that is absent equals nothing.
141
+ - **Every published rule listed, built or not** ([#3]): 979 for EN 16931, 165
142
+ for Peppol BIS Billing 3.0.21 and 56 for XRechnung 3.0, by identifier and
143
+ flag. A report says which ran and which did not, and a document's verdict
144
+ is `invalid` or `not judged`. It is not `valid` while a fatal rule of its
145
+ specification is unbuilt.
146
+ - **The rules held to their publishers' own unit tests** ([#4]). The EN 16931
147
+ unit tests are in the repository, under their own licence, and are a test:
148
+ 1,137 cases, of which those for rules that are built all agree. A case
149
+ for a rule that is not built is compared with nothing and never counted as
150
+ agreeing, and `python -m tests.upstream` prints the counts.
151
+ - **The XRechnung test suite's UBL documents** ([#4]), under their own
152
+ licence: its 39 valid documents are read with nothing to say, written back
153
+ element for element and fail no built rule, and its Extension and CVD
154
+ documents are refused by name.
155
+ - **Peppol's examples and unit tests are fetched, not carried** ([#4]),
156
+ because Peppol does not allow them to be redistributed.
157
+ `tools/fetch_peppol.py` fetches the files listed for the pinned commit and
158
+ checks each against its git hash; the tests that need them are skipped
159
+ without them, and nothing of Peppol's is in what is shipped.
160
+ - **A group with nothing in it is still there** ([#3]). An empty VAT breakdown
161
+ is a VAT breakdown, an invoicing period with no dates is an invoicing
162
+ period: the published rules ask whether they exist, so the model can say.
163
+
164
+ - **A model of the invoice as EN 16931 describes it** ([#2]): every business
165
+ term under its own number (`BT-1` to `BT-165`), the groups that repeat as
166
+ groups, and one model for an invoice and a credit note. Every amount,
167
+ quantity, price and percentage is a `Decimal` made from the text as written,
168
+ with the digits after the point kept as sent. There is no float.
169
+ - **A reader and a writer for UBL 2.1 `Invoice` and `CreditNote`** ([#2]),
170
+ from one table of where each term sits. Read then written, a document is the
171
+ same document: held to the seventeen UBL examples published with the EN
172
+ 16931 validation artefacts, element for element.
173
+ - **Nothing dropped in silence** ([#2]). An element or attribute the standard
174
+ has no term for, an element that repeats where the standard has one, text
175
+ among elements, and a number that is not a decimal are each a finding that
176
+ names the place.
177
+ - **Refusals by name** ([#2]): what is not XML, anything with a DTD, a Cross
178
+ Industry Invoice, any other UBL document, and any specification identifier
179
+ other than Peppol BIS Billing 3.0 and XRechnung 3.0, with the XRechnung
180
+ Extension and CVD identifiers named as such.
181
+
182
+ ### Fixed
183
+
184
+ - **The lists of published rules were read as text, and were wrong by one
185
+ rule each for Peppol and XRechnung.** One Peppol rule that is commented out
186
+ in its source was listed (`PEPPOL-COMMON-R048`), and one XRechnung rule
187
+ whose test has a `>` in it was missed (`BR-DEX-02`). They are read as XML
188
+ now: 165 rules for Peppol and 56 for XRechnung. Neither is fatal, so no
189
+ verdict was affected. Not in any release.
190
+ - The sample documents gave the buyer a GLN with a wrong check digit. Peppol's
191
+ rule found it.
192
+ - The three sample documents named an item classification scheme, `CPV`,
193
+ that is not in the code list. The code list rule found it.
194
+ - **A creditor identifier on the seller stays on the seller** ([#4]). `BT-90`
195
+ has two places in UBL, the seller and the payee. It was written to the
196
+ payee whenever the document had one, which moved it in a document that has
197
+ a payee and keeps the identifier on the seller: the XRechnung test suite
198
+ has one. Each value now notes if it was the payee's and is written back
199
+ where it was read. Not in any release.
200
+
201
+ [#2]: https://github.com/rseufert/mock-einvoice/issues/2
202
+ [#3]: https://github.com/rseufert/mock-einvoice/issues/3
203
+ [#4]: https://github.com/rseufert/mock-einvoice/issues/4
204
+ [#8]: https://github.com/rseufert/mock-einvoice/issues/8
205
+ [#9]: https://github.com/rseufert/mock-einvoice/issues/9
206
+ [#10]: https://github.com/rseufert/mock-einvoice/issues/10
207
+ [#11]: https://github.com/rseufert/mock-einvoice/issues/11
208
+ [#16]: https://github.com/rseufert/mock-einvoice/issues/16
209
+ [#17]: https://github.com/rseufert/mock-einvoice/issues/17
210
+ [#18]: https://github.com/rseufert/mock-einvoice/issues/18
211
+ [#19]: https://github.com/rseufert/mock-einvoice/issues/19
212
+ [#23]: https://github.com/rseufert/mock-einvoice/issues/23
213
+ [#25]: https://github.com/rseufert/mock-einvoice/issues/25
214
+ [#27]: https://github.com/rseufert/mock-einvoice/issues/27
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mock-einvoice contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,5 @@
1
+ include LICENSE README.md CHANGELOG.md
2
+ recursive-include tests *.py *.md *.txt *.xml
3
+ recursive-include tools *.py *.tsv
4
+ # Peppol's test files are fetched, never carried: tools/fetch_peppol.py.
5
+ prune tests/samples/fetched
@@ -0,0 +1,383 @@
1
+ Metadata-Version: 2.4
2
+ Name: mock-einvoice
3
+ Version: 0.1.0
4
+ Summary: A mock e-invoicing partner: EN 16931 invoices in and out, with the responses that follow. Zero dependencies.
5
+ License: MIT AND EUPL-1.2
6
+ Project-URL: Repository, https://github.com/rseufert/mock-einvoice
7
+ Project-URL: Issues, https://github.com/rseufert/mock-einvoice/issues
8
+ Project-URL: Changelog, https://github.com/rseufert/mock-einvoice/blob/main/CHANGELOG.md
9
+ Keywords: e-invoicing,en16931,ubl,peppol,xrechnung,invoice,mock,testing
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Programming Language :: Python :: Implementation :: CPython
24
+ Classifier: Topic :: Office/Business :: Financial
25
+ Classifier: Topic :: Software Development :: Testing
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Dynamic: license-file
30
+
31
+ # mock-einvoice
32
+
33
+ A mock e-invoicing partner: EN 16931 invoices in and out, with the responses that follow. Zero dependencies.
34
+
35
+ A sibling of [mock-sap](https://github.com/rseufert/mock-sap), [mock-edi](https://github.com/rseufert/mock-edi) and [mock-bank](https://github.com/rseufert/mock-bank), and of [mock-acme](https://github.com/rseufert/mock-acme), the integration between them.
36
+
37
+ ```
38
+ python3 -m pip install mock-einvoice
39
+ mock-einvoice --port 8100
40
+ ```
41
+
42
+ It reads and writes UBL invoices and credit notes, and the Peppol Invoice Response that answers one, and holds them to their published rules: invoices to all 979 rules of the EN 16931 core, to Peppol's own 63 and the 31 it has for Germany, and to the 34 of a standard XRechnung document; responses to all 82 of theirs. Over HTTP it is a buyer that takes invoices in and answers the Peppol ones, and a supplier that sends them and takes the answers.
43
+
44
+ **What 0.1.0 is not:**
45
+
46
+ - **It writes no invoices of its own.** The supplier sends the documents it is given.
47
+ - **It knows nothing of the other mocks.** Writing an invoice from one of mock-sap's billing documents, and saying "paid" when SAP has cleared it, is integration, and belongs in [mock-acme](https://github.com/rseufert/mock-acme) with the rest of it. It is not built there yet.
48
+ - **A Peppol document from a seller in Denmark, Greece, Iceland, Italy, the Netherlands, Norway or Sweden is at best "not judged"**, and the server does not take it in: Peppol's 71 rules for those countries are not built ([#18](https://github.com/rseufert/mock-einvoice/issues/18)). An XRechnung document, and a Peppol document from Germany or from a country Peppol has no national rules for, can be "valid".
49
+ - **No CII, no XRechnung Extension, no ZUGFeRD**, and no transport: see [What it refuses](#what-it-refuses) and [Known to be wrong, or not real](#known-to-be-wrong-or-not-real).
50
+
51
+ ## What is built
52
+
53
+ UBL 2.1 `Invoice` and `CreditNote`, into one model named by the business terms of EN 16931, and back.
54
+
55
+ ```python
56
+ from mockeinvoice import read, write
57
+
58
+ document, specification, findings = read(xml) # bytes or str
59
+
60
+ document.kind # "Invoice" or "CreditNote"
61
+ specification # "peppol" or "xrechnung"
62
+ document.text("BT-1") # the invoice number
63
+ document.term("BT-115").number # the amount due, a Decimal
64
+ for line in document.all("BG-25"): # the lines
65
+ line.text("BT-153"), line.term("BT-131").number
66
+
67
+ xml = write(document) # UBL again, in the schema's order
68
+ ```
69
+
70
+ - **Terms by number.** `BT-1` is the invoice number in an invoice and in a credit note, whatever UBL calls the element. `mockeinvoice.model.TERMS` names all of them.
71
+ - **Decimals.** Every amount, quantity, price and percentage is a `decimal.Decimal` made from the text as written. `10.50` stays `10.50`. There is no float anywhere, and making a value from one is a `TypeError`.
72
+ - **Groups that repeat are groups**: lines (`BG-25`), the VAT breakdown (`BG-23`), allowances and charges, notes, payment instructions, supporting documents. A group that occurs once (the seller, the totals) has its terms on the document or the line itself.
73
+ - **Findings.** What the reader has to say about a document, each with a level, a code and the path it is about.
74
+ - **One term, two places.** The bank assigned creditor identifier (`BT-90`) may be on the seller or the payee. It is one term here, each value noting if it was the payee's, and it is written back where it was read.
75
+
76
+ ## The rules
77
+
78
+ ```python
79
+ from mockeinvoice import validate
80
+
81
+ document, report = validate(xml)
82
+
83
+ report.verdict # "invalid", "not judged", or "valid"
84
+ for finding in report.failures:
85
+ finding.code # "BR-CO-10": the rule's published identifier
86
+ finding.level # "fatal": the flag its publisher gave it
87
+ finding.path # "BT-106": where, in the model; or, for a rule about
88
+ # the XML itself, "/Invoice/cbc:UUID"
89
+ finding.text # what the rule asks and what was found, in our words
90
+ finding.link # where the rule itself is published
91
+ report.ran # the rules that were run
92
+ report.not_built # by layer, the published rules that were not
93
+ report.not_applicable # and those not built that could not apply to it
94
+ ```
95
+
96
+ A rule is one function under the identifier its publisher gave it. A finding gives that identifier and a link to the published rule; the description is this project's own, and the publisher's wording is not reproduced.
97
+
98
+ A document names its specification, and that decides its layers:
99
+
100
+ | Layer | Pinned to | Published rules | Built |
101
+ | --- | --- | --- | --- |
102
+ | EN 16931 core | [validation artefacts 1.3.16](https://github.com/ConnectingEurope/eInvoicing-EN16931/tree/validation-1.3.16) | 979 (281 fatal) | all 979: what a document must have in it (`BR-01` to `BR-65`), the calculation rules (`BR-CO-*`), the decimals rules (`BR-DEC-*`), the ten families of VAT category rules, the code lists (`BR-CL-*`), and the 756 rules about the UBL document itself (`UBL-CR-*`, `UBL-DT-*`, `UBL-SR-*`) |
103
+ | Peppol BIS Billing 3.0 | 3.0.21, at commit [`806866b`](https://github.com/OpenPEPPOL/peppol-bis-invoice-3/commit/806866bd2bd91d7e9623b68f08164e8fbe9e67a0) (it has no tag) | 165 (139 fatal) | 94: Peppol's own 63 (`PEPPOL-EN16931-*`, `PEPPOL-COMMON-*`) and Germany's 31 (`DE-R-*`). Not the 71 for a seller in another country (`DK-R`, `GR-R`, `IS-R`, `IT-R`, `NL-R`, `NO-R`, `SE-R`) |
104
+ | XRechnung 3.0 | [Schematron 2.6.0](https://github.com/itplr-kosit/xrechnung-schematron/tree/v2.6.0) | 56 (46 fatal) | 34: every rule of a standard XRechnung document (`BR-DE-*`, `BR-TMP-2`, `BR-TMP-6`). Not the 22 of XRechnung Extension and CVD (`BR-DEX-*`, `BR-DE-CVD-*`), whose documents are refused by name |
105
+
106
+ **Not built is said, never assumed.** `mockeinvoice/rules/published.py` lists every published rule of every layer by identifier and flag, and a report lists the ones that did not run. A document nothing was found wrong with is `not judged`, not `valid`, for as long as a fatal rule that could apply to it is unbuilt.
107
+
108
+ **A rule that could not apply is not waited on.** Peppol's rules for a seller in one country say nothing of a document from another, and the rules of XRechnung Extension and CVD say nothing of a standard XRechnung document. A report lists them apart, as `not_applicable`, and they do not hold back its verdict. A document counts as one of a country's if the seller's VAT identifier, its tax representative's, or its address says so: all three at once, which is never narrower than the published rules' own test, so nothing is waved through that a national rule could have caught.
109
+
110
+ **Two things a rule is asked of.** Most rules are asked of the model. The 756 about the UBL document itself are asked of its elements, because they are about elements the standard has no term for and the model does not hold: `validate(xml)` asks them of the document as it was sent. `check(document, specification)`, given a model and no XML, asks them of the document that model would be written as. Where one of them reports an element, the reader's own finding about that element (`UNHELD`, `REPEATED`) is left out, so an element is reported once, under the published rule's name where there is one.
111
+
112
+ **The arithmetic is the rules' own.** The published rules are XPath, and XPath rounds a tie towards positive infinity (`-2.5` is `-2`), which is neither Python's `round` nor half-up. A total that is absent is equal to nothing, so its rule fails. `mockeinvoice/rules/calculation.py` has both.
113
+
114
+ **A rule that cannot be computed has failed.** Where the published test would stop with an XPath error (a number that is not a number, an amount twice where the test takes one), the finding says the rule could not be computed, and the document is invalid.
115
+
116
+ ## The Invoice Response
117
+
118
+ What a buyer answers an invoice with on the Peppol route: acknowledged, in process, under query, conditionally accepted, rejected, accepted or paid, and why.
119
+
120
+ ```python
121
+ from mockeinvoice import read_response, write_response, validate_response
122
+
123
+ response, findings = read_response(xml)
124
+ response.code # "UQ": under query
125
+ response.statuses[0].reason_code # "REF", from the list named in .list_id
126
+ response.statuses[0].conditions # [("BT-132", "20")]: what in the invoice it is about
127
+ response.document.id # "GLX-4711": the invoice it answers
128
+ xml = write_response(response)
129
+
130
+ response, report = validate_response(xml)
131
+ ```
132
+
133
+ It is Peppol's transaction T111, a UBL `ApplicationResponse`, pinned to release 3.0.17 at commit [`ad6828c`](https://github.com/OpenPEPPOL/poacc-upgrade-3/commit/ad6828c94f8090bdfd620df4e48b213977afa2cb) of `OpenPEPPOL/poacc-upgrade-3` (it has no tag; the newest tag is 3.0.15). All 82 of its published rules are built. Fifty-four of them are generated when Peppol builds its rule file and are in no file of its repository, so their identifiers are taken from the file Peppol publishes.
134
+
135
+ A response with nothing found wrong is `valid`.
136
+
137
+ XRechnung has no such message: an XRechnung invoice gets a verdict and nothing after it.
138
+
139
+ ## The server
140
+
141
+ ```
142
+ python -m mockeinvoice --port 8100
143
+ ```
144
+
145
+ `8100` is the default (mock-sap is on `8000`, mock-edi on `8080`, mock-bank on `8090`). Installed, the command is `mock-einvoice`. The one process is both a **buyer**, which invoices are sent to, and a **supplier**, which sends them. Two of it can be pointed at each other.
146
+
147
+ ### The buyer
148
+
149
+ ```
150
+ $ python -m mockeinvoice --clock 2026-10-07T09:00 &
151
+ $ curl -s --data-binary @tests/samples/peppol-invoice.xml http://127.0.0.1:8100/invoices
152
+ {
153
+ "id": "1",
154
+ "kind": "Invoice",
155
+ "number": "GLX-4711",
156
+ ...
157
+ "verdict": "valid",
158
+ "status": "",
159
+ "findings": [],
160
+ "responses": [],
161
+ "document": "/_mock/invoices/1/document"
162
+ }
163
+ $ curl -s -d '{"code": "UQ", "reasons": [{"code": "REF", "text": "No purchase order."}], "actions": ["PIN"]}' \
164
+ http://127.0.0.1:8100/_mock/invoices/1/responses
165
+ {
166
+ "id": "1",
167
+ "invoice": "1",
168
+ "code": "UQ",
169
+ ...
170
+ "document": "/_mock/responses/1"
171
+ }
172
+ $ curl -s http://127.0.0.1:8100/_mock/responses/1 # the Invoice Response, as XML
173
+ ```
174
+
175
+ **What a selling system uses**, as it would use the network:
176
+
177
+ | | |
178
+ | --- | --- |
179
+ | `POST /invoices` | A UBL `Invoice` or `CreditNote`. `201` if it is `valid`, and it is held. `422` with the findings if it is `invalid`. `422` naming the rules that were not run if it is `not judged`: the mock does not take in what it could not judge. `400` with the refusal's code for what is not taken at all ([What it refuses](#what-it-refuses)). |
180
+
181
+ **What a test uses**, under `/_mock`:
182
+
183
+ | | |
184
+ | --- | --- |
185
+ | `GET /_mock/invoices`, `/_mock/invoices/<id>`, `/_mock/invoices/<id>/document` | what is held; one, with its findings and its responses; and as it was sent |
186
+ | `POST /_mock/invoices/<id>/responses` | the buyer says something of it: `{"code", "reasons", "actions", "note", "force"}`. A reason or an action is a code, or `{"code", "text", "conditions"}` with conditions as pairs of a business term and a value |
187
+ | `GET /_mock/responses/<id>` | an Invoice Response, as XML |
188
+ | `GET`, `PATCH /_mock/buyer` | how the buyer behaves: `{"answers": ...}` |
189
+
190
+ **Responses go to the seller.** Peppol's guide has the Invoice Response pushed from buyer to seller, and a seller cannot ask for one. `--seller-url URL` is where each is `POST`ed, and what became of that is on the response (`"delivery"`). Without it, responses are written and kept.
191
+
192
+ **When the buyer speaks unasked** (`--answers`, or `PATCH /_mock/buyer`):
193
+
194
+ - `required`, the default. An invoice sent under Peppol's Billing with Response (billing's profile `02`), where Peppol makes the response "a required step", is acknowledged (`AB`) on receipt. Under profile `01` nothing is said until it is asked for.
195
+ - `always`: every Peppol document is acknowledged.
196
+ - `never`: the buyer who owes a response and sends none.
197
+
198
+ Nothing else happens by itself. Each later status is asked for with `POST /_mock/invoices/<id>/responses`.
199
+
200
+ **The order responses come in.** Peppol's guide to the Invoice Response has [process rules](https://docs.peppol.eu/poacc/upgrade-3/profiles/63-invoiceresponse/#invoice-response-process-rules) that are in none of its Schematron files, so no validator checks them. The buyer keeps to them, and a response that would break one is `409` with the rule's identifier:
201
+
202
+ | Rule | In our words |
203
+ | --- | --- |
204
+ | `OP-BR111-R012` | A status does not go back in the order `AB`, `IP`, `UQ`, `CA`, `RE`, `AP`, `PD`. Any may be first and any left out. Only under query and a part payment (`PD` with the reason `PPD`) come twice. |
205
+ | `OP-BR111-R004` | Nothing follows a rejection or a payment in full. |
206
+ | `OP-BR111-R005` | Only paid follows accepted. |
207
+ | `OP-BR111-R014` | The type code is the answered document's own. The mock writes it so; there is nothing to ask for. |
208
+
209
+ `"force": true` sends a response out of order all the same, and marks it `"forced"`: a seller's system has to cope with a buyer who does. Every response is held to the 82 published rules before it goes, and one that fails (a rejection with no reason) is `422` with the finding, forced or not. Its warnings go with it.
210
+
211
+ An **XRechnung** document gets its verdict and no response. Asking for one is `409`.
212
+
213
+ ### The supplier
214
+
215
+ ```
216
+ $ python -m mockeinvoice --port 8101 --buyer-url http://127.0.0.1:8100/invoices &
217
+ $ curl -s --data-binary @tests/samples/peppol-invoice.xml http://127.0.0.1:8101/_mock/sent
218
+ {
219
+ "id": "1",
220
+ ...
221
+ "verdict": "valid",
222
+ "forced": false,
223
+ "delivery": {
224
+ "to": "http://127.0.0.1:8100/invoices",
225
+ "status": 201
226
+ },
227
+ "status": "",
228
+ ...
229
+ }
230
+ ```
231
+
232
+ **What a test uses**, under `/_mock`:
233
+
234
+ | | |
235
+ | --- | --- |
236
+ | `POST /_mock/sent` | Send this UBL `Invoice` or `CreditNote` to the buyer: a `POST` of it to `--buyer-url`, and what became of that is its `"delivery"`. Without `--buyer-url` it is recorded and goes nowhere. It is held to its rules first, as a real sender's access point does, and one that is not `valid` is not sent (`422` with the findings). `?force=true` sends it anyway. What is not an invoice at all is `400`, forced or not. |
237
+ | `GET /_mock/sent`, `/_mock/sent/<id>`, `/_mock/sent/<id>/document` | what was sent; one, with its delivery, the responses it has had and its status; and as it was sent |
238
+ | `GET /_mock/answers/<id>` | an Invoice Response, as it was received |
239
+
240
+ **What a buyer's system uses**, as it would use the network:
241
+
242
+ | | |
243
+ | --- | --- |
244
+ | `POST /responses` | A Peppol Invoice Response. `201` if it passes its 82 rules and is about a document that was sent, which is found by its number and type code. `422` with the findings if it fails a rule, `422` `NO-SUCH-INVOICE` if no such document was sent, `400` if it is not an Invoice Response. |
245
+
246
+ A document's `"status"` is the last thing its buyer said. **A response out of order is taken and ignored.** Peppol's guide says of a response that follows a rejection or a payment in full, or follows an acceptance with anything but paid, that the seller may ignore it. So the supplier does: the response is `201` and kept, marked `"ignored"` with the rule it broke, and the status does not move. The same for one that goes back in the order.
247
+
248
+ The supplier writes no invoices. It sends what it is given.
249
+
250
+ ### Both
251
+
252
+ | | |
253
+ | --- | --- |
254
+ | `GET /_mock/health` | that it is up, its version, and how many documents it holds and has sent |
255
+ | `GET /_mock/turned-away` | what was not taken in, on which side, and why |
256
+ | `POST /_mock/validate` | an invoice, a credit note or an Invoice Response held to its rules, and not kept |
257
+ | `POST /_mock/reset` | forget every document and response, on both sides |
258
+
259
+ To see the two sides talk, run two: a buyer with `--seller-url http://127.0.0.1:8101/responses`, and a supplier with `--buyer-url http://127.0.0.1:8100/invoices`.
260
+
261
+ ## What it refuses
262
+
263
+ `read` raises `Refused`, with a `code` and a sentence naming what was sent, for:
264
+
265
+ | Code | What |
266
+ | --- | --- |
267
+ | `NOT-XML` | anything that is not well-formed XML |
268
+ | `DTD` | a document with a `DOCTYPE`. Nothing in it is expanded or fetched. |
269
+ | `CII` | a UN/CEFACT Cross Industry Invoice. Not built. |
270
+ | `NOT-AN-INVOICE`, `NOT-UBL` | any other UBL document, and anything else |
271
+ | `NO-SPECIFICATION` | no `CustomizationID` (BT-24) |
272
+ | `XRECHNUNG-EXTENSION`, `XRECHNUNG-CVD` | those two kinds of XRechnung. Not built. |
273
+ | `SPECIFICATION` | any other identifier, plain EN 16931 among them |
274
+
275
+ The two identifiers taken are Peppol BIS Billing 3.0 and XRechnung 3.0. An identifier this package does not know is refused, not quietly held to the core alone.
276
+
277
+ ## What the reader does not hold
278
+
279
+ UBL has thousands of elements and EN 16931 has a place for about a hundred and sixty. The rest is not held, and is never dropped without saying so:
280
+
281
+ | Finding | Level | What |
282
+ | --- | --- | --- |
283
+ | `UNHELD` | warning | an element with no business term (it is not written back), or an attribute with none (it is kept with its value) |
284
+ | `REPEATED` | error | an element that occurs twice where the standard has one. Every value is still held, in order. |
285
+ | `NOT-DECIMAL` | error | a number that is not what XML Schema calls a decimal: `1,190.00`, `1e3` |
286
+ | `FIXED` | warning | an element the binding gives one value, written another way: `ChargeIndicator` as `0` |
287
+ | `TEXT`, `STRUCTURE` | warning, error | text among elements, and elements where text belongs |
288
+
289
+ These are the reader's own findings, not published rules. An error among them makes a document invalid as a failing rule does.
290
+
291
+ A group with nothing in it is still there: an empty `TaxSubtotal` is a VAT breakdown, as it is to the published rules, which ask only that one exists.
292
+
293
+ ## Known to be wrong, or not real
294
+
295
+ - **No transport.** A real Peppol invoice goes by AS4, signed and encrypted, between access points that find each other by SMP lookup. Here it is a `POST`, and the other party is a URL. The paths and status codes are this mock's own; nothing published defines an HTTP interface for any of it.
296
+ - **An invalid document is turned away at the door and gets no Invoice Response.** On the real network the sender's access point validates before it sends, and Peppol's guide puts the status of a transmission outside what an Invoice Response is for. That this is how a failed validation should look from the seller's side is this project's reading and not a published rule.
297
+ - **Nothing happens with time.** A real buyer moves an invoice to in process, accepted and paid over days, and Peppol asks for a first response within three working days. Here each status after the first is asked for.
298
+ - **A duplicate is taken like the first.** A second document with a seller and a number already held is held too. A real buyer's system would likely reject it; with which status and reason is not known here, and is not guessed.
299
+ - **Any buyer an invoice names is this mock**, and no document is turned away because its buyer is unknown. Nor does the supplier compare who a response is from with who its invoice was for: a response is matched by the invoice's number and type code alone, and of two documents sent with one number it is taken to be about the later.
300
+ - **A response about a document that was never sent is turned away**, and so is one that names a type code other than its document's (`OP-BR111-R014`). The guide says the code must be the document's own and not what a seller does when it is not; and on the real network a response would be delivered whatever it was about. Both are this project's choices.
301
+ - **Nothing is kept on disk.** Documents and responses are gone when the server stops.
302
+ - **No XML Schema validation.** The published validators check the UBL schema before any rule. The standard library cannot, so this reads what it understands and reports what it did not. A document that is not schema-valid is not refused for that.
303
+ - **The writer does not promise the same bytes.** Reading what was written gives an equal document. The order among repeats of different kinds (allowances and charges, say), the namespace prefixes, white space, comments and anything `UNHELD` are not kept.
304
+ - **The writer does not supply what UBL requires and the model lacks.** A credit note with a due date and no payment instruction is written with a `PaymentMeans` that holds only the date, because that is where the binding puts the date. The UBL schema does not allow it, and read back, the document has an empty payment instruction it did not have before.
305
+ - **A tax category's scheme is taken to be VAT.** Several published rules look at a tax category only if its `TaxScheme/ID` is `VAT`. The reader reports any other value (`FIXED`) and holds the category all the same, so such a document is judged here as if it had said VAT.
306
+ - **A tax category that names no scheme counts as VAT.** `BR-32`, `BR-37`, `BR-47` and `BR-48` look for a category whose scheme is VAT, and one with no `TaxScheme` at all is not that. The model does not hold whether a scheme was named, so here it passes where a real validator fails it. UBL's schema requires the element.
307
+ - **An element the standard has once, sent twice, is one here.** Two seller addresses are held as one address with what was in both, and the reader says so (`REPEATED`). A published rule runs once for each; here it runs once, and where it takes one value and finds two it is reported as not computable.
308
+ - **A date outside the years 0001 to 9999** cannot be compared here, and a rule that compares it (`BR-29`, `BR-30`) is reported as not computable. XPath can compare it. A date that names no time zone is compared as UTC, which XPath leaves to the implementation.
309
+ - **A tax category on a line's allowance or charge is not seen.** The standard has none there and the reader does not hold one (`UNHELD`), so the VAT category rules that look at every `AllowanceCharge` see the document's and not a line's.
310
+ - **A tax category with nothing in it but its scheme is not known to be there.** The rules for category O (`BR-O-11` to `BR-O-14`) count the categories that are not O, and one with no code is not O. Here a category is known by its code, its rate or its exemption reason, and on a line by its element; one with none of those is not counted.
311
+ - **The VAT category rules differ between families in ways that look like accidents**, and are built as published. `BR-AF-01`, `BR-AG-01`, `BR-AF-04` and both `BR-B` rules compare a category code as written where their siblings trim it. `BR-G` and `BR-IC` want the seller's VAT identifier where the others take any tax registration. `BR-S-08` can be met by the allowances and charges alone, without the lines. `rules/en16931_vat.py` names each where it is made.
312
+ - **One unit of leeway on a taxable amount is measured as a double.** `BR-S-08`, `BR-AF-08` and `BR-AG-08` are published as `xs:decimal(cbc:TaxableAmount - 1)`, which subtracts in binary floating point: 100.10 less one is a hair under 99.10. At exactly one unit of difference the rule passes or fails by that, here as there. It is the one place a float is used; no amount is held as one.
313
+ - **A code list rule is asked of the places the standard has for the code.** The published tests are on an element wherever it occurs: any `Country`, any `TaxCategory`. One in an element that is not held is not asked, and the reader has reported the element.
314
+ - **Of the 756 rules about the UBL document, 747 have no unit test from their publisher.** They are held instead to a second reading of their paths by the standard library's own path language, which shares no code with this package's, over a document made for each path; and none of them fires on any of the 66 valid documents from the three publishers.
315
+ - **A payee with no name fails three more rules than one would think** (`UBL-SR-19`, `-20`, `-21`): each compares the payee's name with the seller's legal name, and a name that is not there is not different from anything. Two payment instructions that name different payment means, or different payment references, fail `UBL-SR-47` and `UBL-SR-44`. Both are the published tests, built as published.
316
+ - **Peppol takes `true` and `false` for a charge indicator, and not `1` and `0`**, which the core takes. An allowance marked `0` fails `PEPPOL-EN16931-R043` and is left out of its line's net amount by `PEPPOL-EN16931-R120`. Built as published.
317
+ - **A price divided by its base quantity** (`PEPPOL-EN16931-R120`) is computed to 60 significant digits here; XPath leaves the precision to the implementation. The rule allows two cents either way.
318
+ - **XRechnung publishes no unit tests of its rules** in the form EN 16931 and Peppol do. Thirty-one of its 34 standard rules are the same tests as Peppol's rules for Germany, which Peppol does publish unit tests for, and are one piece of code here under two names; the other three rest on this project's tests. The documents of its test suite that this project carries are valid ones, and are all valid here; none of them shows a rule failing.
319
+ - **XRechnung's rules are asked of every XRechnung document**, whatever its parties' countries; Peppol's for Germany only where both are in Germany. `BR-TMP-6` asks that a date looks like `YYYY-MM-DD` and no more, so the thirtieth of February passes it.
320
+ - **Peppol's rules for Germany are asked only where seller and buyer are both in Germany.** A German seller invoicing a buyer abroad is asked none of them. Its IBAN checks (`DE-R-019`, `DE-R-020`) are warnings, asked of SEPA transfers and direct debits only, and read a small letter in an IBAN as another number than its capital. A cash discount line in the payment terms has to end in a line break (`DE-R-018`). All as published.
321
+ - **A response to an invoice of type 817, 875, 876 or 877 fails a rule.** `PEPPOL-T111-B04201` holds the type code of the document answered to UNTDID 1001 as it was in 2017 (edition D.17A), which has not those four codes; Peppol's billing rules allow all four. The same list has one entry that is no code, `1999`, a year out of the description of code 423, so a type code of `1999` passes. Both are Peppol's list as published, and are built as published.
322
+ - **`PEPPOL-T111-R005` cannot fail.** It is meant to say that the reason "partially paid" goes only with the response "paid". Its published test asks whether a comparison exists, and one always does. Built as published, it finds nothing.
323
+ - **An element with no place in an Invoice Response is fatal**, where in an invoice it is a warning; but a second note is not, because the response's rules say what may be there and not how often. The reader reports the repeat.
324
+ - **Four rules are published twice.** `BR-CO-21` to `BR-CO-24` have the same test as `BR-33`, `BR-38`, `BR-42` and `BR-44`, so an allowance or charge with no reason fails two rules, as it does in a real validator.
325
+ - **Six published rules cannot fail, here or anywhere.** `BR-CO-05` to `BR-CO-08` are published with the test `true()`. `BR-DEC-13` and `BR-DEC-15` compare a tax amount's currency with an element a tax amount does not have, so they select nothing and pass. They are built as published.
326
+ - **A VAT rate under half a percent** rounds to nought in `BR-CO-17`, which then wants the tax to round to nought too. That is the published test, and it is built as published.
327
+ - **A note's subject code** (`BT-21`) is read from `#CODE#` at the start of a note's text. That convention is from memory of the standard's UBL binding and was not checked against a published source.
328
+
329
+ ## Held to what others published
330
+
331
+ The rules, the reader and the writer are tested against files this project did not write.
332
+
333
+ | Source, at the pinned version | What | How it comes out today |
334
+ | --- | --- | --- |
335
+ | EN 16931 unit tests | 1,137 cases, each a small document and what one rule should make of it | 1,126 agree, none disagree. One is in a document UBL's schema does not allow (a credit note with an invoice's line), where the reader does not hold the element the rule is about; it is counted apart. 12 name `BR-CO-25`, which the pinned rule file does not have. Only 9 of the 756 rules about the UBL document have a published case. |
336
+ | EN 16931 examples | 17 documents | read, written back, and compared element for element by a reader that is not this one |
337
+ | XRechnung test suite | 39 valid XRechnung 3.0 documents | read with nothing to say, written back element for element, and every one is `valid`: no rule of the core's 979 or XRechnung's 34 fails or warns. Seventeen are told, as information, that they do not say when they were delivered (`BR-DE-TMP-32`) |
338
+ | XRechnung test suite | 5 Extension and 1 CVD document | refused by name |
339
+ | Peppol unit tests | 400 cases | all 396 agree: 331 for Peppol's own rules and 65 for Germany's. The other 4 are about a UBL Order |
340
+ | Peppol Invoice Response | 14 examples and 13 unit test cases | every example is read with nothing to say, written back element for element, and no rule has anything to say of it; all 13 cases agree. The structure and the code lists here are compared with the ones Peppol describes |
341
+ | Peppol examples | 10 documents | read with nothing to say, written back element for element, and no rule has anything to say of them. Nine are `valid`; the tenth is from a seller in Sweden, whose rules are not built, and is `not judged` |
342
+
343
+ - **A case for a rule that is not built is never counted as agreeing.** The counts are written out in `tests/test_upstream.py`, so building a rule moves a number there on purpose.
344
+ - **A disagreement is a failure here** until the published rule shows the case to be wrong; then it is listed in `tests/upstream.py` by name, with the reason. None is.
345
+ - **To read the counts:** `python -m tests.upstream`. CI prints them on every run.
346
+
347
+ Peppol's files are not in this repository (see Licences). `python tools/fetch_peppol.py` fetches the 101 listed in `tools/peppol-files.tsv` (billing's examples, its unit tests, and the rule file itself, which a test reads Peppol's code lists from) and the 28 in `tools/peppol-response-files.tsv` (the Invoice Response's examples, unit tests, hand-written rules, code lists and the description of its structure) from the pinned commit, checks each against the git hash listed for it, and puts them where the tests look. Without them those two tests are skipped and say so. CI fetches them on two of its jobs.
348
+
349
+ Two things were checked while building and are not tests, because their sources are not here:
350
+
351
+ - The table of where each term sits agrees, term for term, with the syntax description Peppol publishes for BIS Billing 3.0.21, for both documents.
352
+ - Its order agrees with the UBL 2.1 schemas from OASIS, for both documents and every aggregate under them.
353
+
354
+ ## Licences
355
+
356
+ The code values of UNTDID 1001, the United Nations' list of kinds of document, are in `mockeinvoice/rules/untdid.py`: 727 numbers from edition D.17A as UNECE publishes it, and none of the names or descriptions, which are the United Nations'. The directory's pages say "Copyright United Nations, all rights reserved"; the numbers are taken to be facts and not text.
357
+
358
+ Nothing of Peppol's is in the package. Its rules are written here by hand from reading the tests, each under its published identifier and in this project's words. Where a Peppol rule holds a value to a code list, the list is the EN 16931 one already in the package, with the differences named: one currency code, twenty-one electronic address schemes, and two short lists of document type codes. A test compares the result with Peppol's own lists whenever its files have been fetched.
359
+
360
+ The package is MIT, with two files that are not. `mockeinvoice/rules/codelists.py` holds the code lists of the EN 16931 code list rules (currencies, countries, units of measure and the rest), generated from the published rules by `tools/code_lists.py` and kept exactly as published. `mockeinvoice/rules/ublsyntax.py` holds the paths of the rules about the UBL document itself, generated by `tools/ubl_syntax.py`. Both are from the EN 16931 validation artefacts and are under the EUPL 1.2, whose text is beside them and goes into the wheel with them. One list more is in `rules/en16931.py`, the country prefixes `BR-CO-09` searches, and is from the same source. The wheel holds the package and nothing else.
361
+
362
+ The files under `tests/samples/external/` are other people's, copied unmodified, each directory with the licence its files are under and a README saying where they came from. They are in the repository and the source distribution, which is about 5 MB because of them.
363
+
364
+ | Directory | From | Licence |
365
+ | --- | --- | --- |
366
+ | `en16931/` | the EN 16931 validation artefacts, `validation-1.3.16` | EUPL 1.2 |
367
+ | `xrechnung/` | the XRechnung test suite, `v2026-08-31` | Apache 2.0 |
368
+
369
+ Peppol's examples and unit tests are **not** here. Peppol BIS Billing is published with a statement that it may not be redistributed without OpenPeppol's consent, so they are fetched for the tests and are in nothing this project ships. CI checks the source distribution for them.
370
+
371
+ This is a reading of the licence texts by the people who wrote the code, not legal advice.
372
+
373
+ ## Development
374
+
375
+ ```
376
+ python -m unittest
377
+ ```
378
+
379
+ Python 3.8 or later, and nothing to install.
380
+
381
+ The tests start the server on a port the operating system chooses, and a stand-in seller beside it.
382
+
383
+ `tools/published_rules.py` regenerates `mockeinvoice/rules/published.py` from the three Schematron files when a pin moves. It takes each rule's identifier and flag and nothing else. The repository's settings are described in [docs/GITHUB.md](docs/GITHUB.md).