Skip to content

Commit

Permalink
Minor cleaning.
Browse files Browse the repository at this point in the history
  • Loading branch information
klakegg committed Aug 17, 2017
1 parent deb0b89 commit 83168b0
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
| Issue | Description | Type

| link:https://github.com/difi/vefa-ehf-postaward/issues/200[#200]
| Adding rules link:{ruleurl-inv}NONAT-T10-R031/[NONAT-T10-R031] (**W**), link:{ruleurl-inv}NONAT-T10-R032/[NONAT-T10-R032] (**W**), link:{ruleurl-inv}NONAT-T14-R031/[NONAT-T14-R031] (**W**) and link:{ruleurl-inv}NONAT-T14-R032/[NONAT-T14-R032] (**W**) for validation of tax categories.
| Adding rules link:{ruleurl-inv}NONAT-T10-R031/[NONAT-T10-R031] (**W**), link:{ruleurl-inv}NONAT-T10-R032/[NONAT-T10-R032] (**W**), link:{ruleurl-cre}NONAT-T14-R030/[NONAT-T14-R030] (**W**) and link:{ruleurl-cre}NONAT-T14-R031/[NONAT-T14-R031] (**W**) for validation of tax categories.
| Validator

| link:https://github.com/difi/vefa-ehf-postaward/issues/215[#215]
| Fixing implementation of most rules for higher quality.
| Validator

| link:https://github.com/difi/vefa-validator-conf/issues/184[#184]
| Changing rules link:{ruleurl-inv}NONAT-T10-R028/[NONAT-T10-R028] (**F**) and link:{ruleurl-cre}NONAT-T14-R028/[NONAT-T14-R028] (**F**) from **W**.
| Changing rule link:{ruleurl-cre}NONAT-T14-R028/[NONAT-T14-R028] (**F**) from **W**, replacing NONAT-T10-R028 with link:{ruleurl-inv}NONAT-T10-R030/[NONAT-T10-R030] (**F**).
| Validator

| link:https://github.com/difi/vefa-ehf-postaward/issues/210[#210]
| Changing rules link:{ruleurl-inv}NONAT-T10-R029/[NONAT-T10-R029] (**F**) and link:{ruleurl-cre}NONAT-T14-R029/[NONAT-T14-R029] (**F**) from **W**.
| Validator

| link:https://github.com/difi/vefa-ehf-postaward/issues/217[#217]
| Adding rules link:{ruleurl-inv}NONAT-T10-R044/[NONAT-T10-R044] (**W**) and link:{ruleurl-cre}NONAT-T14-R044/[NONAT-T14-R044] (**W**) for validation of GLN identifiers.
| Adding rules link:{ruleurl-inv}NOGOV-T10-R044/[NOGOV-T10-R044] (**W**) and link:{ruleurl-cre}NOGOV-T14-R044/[NOGOV-T14-R044] (**W**) for validation of GLN identifiers.
| Validator

|===
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
| Sak | Beskrivelse | Type

| link:https://github.com/difi/vefa-ehf-postaward/issues/200[#200]
| Legge til reglene link:{ruleurl-inv}NONAT-T10-R031/[NONAT-T10-R031] (**W**), link:{ruleurl-inv}NONAT-T10-R032/[NONAT-T10-R032] (**W**), link:{ruleurl-inv}NONAT-T14-R031/[NONAT-T14-R031] (**W**) and link:{ruleurl-inv}NONAT-T14-R032/[NONAT-T14-R032] (**W**) for validering av mva-kategorier.
| Legge til reglene link:{ruleurl-inv}NONAT-T10-R031/[NONAT-T10-R031] (**W**), link:{ruleurl-inv}NONAT-T10-R032/[NONAT-T10-R032] (**W**), link:{ruleurl-cre}NONAT-T14-R030/[NONAT-T14-R030] (**W**) and link:{ruleurl-cre}NONAT-T14-R031/[NONAT-T14-R031] (**W**) for validering av mva-kategorier.
| Validator

| link:https://github.com/difi/vefa-ehf-postaward/issues/215[#215]
| Fikse implementasjonen for en del regler for å oppnå høyere kvalitet.
| Validator

| link:https://github.com/difi/vefa-validator-conf/issues/184[#184]
| Endre link:{ruleurl-inv}NONAT-T10-R028/[NONAT-T10-R028] (**F**) og link:{ruleurl-cre}NONAT-T14-R028/[NONAT-T14-R028] (**F**) fra **W**.
| Endre link:{ruleurl-cre}NONAT-T14-R028/[NONAT-T14-R028] (**F**) fra **W**, bytte ut NONAT-T10-R028 (**W**) med link:{ruleurl-inv}NONAT-T10-R030/[NONAT-T10-R030] (**F**).
| Validator

| link:https://github.com/difi/vefa-ehf-postaward/issues/210[#210]
| Endre link:{ruleurl-inv}NONAT-T10-R029/[NONAT-T10-R029] (**F**) og link:{ruleurl-cre}NONAT-T14-R029/[NONAT-T14-R029] (**F**) fra **W**.
| Validator

| link:https://github.com/difi/vefa-ehf-postaward/issues/217[#217]
| Legge til reglene link:{ruleurl-inv}NONAT-T10-R044/[NONAT-T10-R044] (**W**) og link:{ruleurl-cre}NONAT-T14-R044/[NONAT-T14-R044] (**W**) for validering av GLN-nummer.
| Legge til reglene link:{ruleurl-inv}NOGOV-T10-R044/[NOGOV-T10-R044] (**W**) og link:{ruleurl-cre}NOGOV-T14-R044/[NOGOV-T14-R044] (**W**) for validering av GLN-nummer.
| Validator

|===
Expand Down
62 changes: 58 additions & 4 deletions rules/ehf-invoice-2.0/unit-NONAT/NONAT-T10-R029.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,71 @@

<cac:TaxTotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount>50</cbc:TaxableAmount>
<cbc:TaxableAmount>100</cbc:TaxableAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>

<cac:InvoiceLine>
<cbc:LineExtensionAmount>50</cbc:LineExtensionAmount>
<cac:Item>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
</cac:ClassifiedTaxCategory>
</cac:Item>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:LineExtensionAmount>50</cbc:LineExtensionAmount>
<cac:Item>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
</cac:ClassifiedTaxCategory>
</cac:Item>
</cac:InvoiceLine>

</Invoice>
</test>
<test>
<assert>
<description>Trigger no warning when taxable amount is correct.</description>
<success>NONAT-T10-R029</success>
</assert>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">

<cac:TaxTotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount>50</cbc:TaxableAmount>
<cbc:TaxableAmount>90</cbc:TaxableAmount> <!-- 50 + 50 - 30 + 20 -->
<cac:TaxCategory>
<cbc:ID>E</cbc:ID>
<cbc:ID>S</cbc:ID>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>

<!-- + 20 -->
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:Amount currencyID="NOK">20</cbc:Amount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
</cac:TaxCategory>
</cac:AllowanceCharge>

<!-- - 30 -->
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:Amount currencyID="NOK">30</cbc:Amount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
</cac:TaxCategory>
</cac:AllowanceCharge>

<!-- + 50 -->
<cac:InvoiceLine>
<cbc:LineExtensionAmount>50</cbc:LineExtensionAmount>
<cac:Item>
Expand All @@ -72,11 +124,13 @@
</cac:ClassifiedTaxCategory>
</cac:Item>
</cac:InvoiceLine>

<!-- + 50 -->
<cac:InvoiceLine>
<cbc:LineExtensionAmount>50</cbc:LineExtensionAmount>
<cac:Item>
<cac:ClassifiedTaxCategory>
<cbc:ID>E</cbc:ID>
<cbc:ID>S</cbc:ID>
</cac:ClassifiedTaxCategory>
</cac:Item>
</cac:InvoiceLine>
Expand Down
8 changes: 0 additions & 8 deletions tools/xquery/rules_asciidoc.xquery
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
declare namespace xsd = "http://www.w3.org/2001/XMLSchema";
declare namespace saxon = "http://saxon.sf.net/";
declare namespace xsl = "http://www.w3.org/1999/XSL/Transform";
declare namespace schold = "http://www.ascc.net/xml/schematron";
declare namespace iso = "http://purl.oclc.org/dsdl/schematron";
declare namespace xhtml = "http://www.w3.org/1999/xhtml";
declare namespace cbc = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2";
declare namespace cac = "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2";
declare namespace ubl = "urn:oasis:names:specification:ubl:schema:xsd:CallForTenders-2";
declare namespace svrl = "http://purl.oclc.org/dsdl/svrl";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method "text";

Expand Down

0 comments on commit 83168b0

Please sign in to comment.