{"id":6398,"date":"2022-06-04T13:19:28","date_gmt":"2022-06-04T04:19:28","guid":{"rendered":"https:\/\/www.sambuichi.jp\/?p=6398"},"modified":"2022-06-06T08:55:43","modified_gmt":"2022-06-05T23:55:43","slug":"jp-pint-0-9-2%e3%81%a7%e6%8f%90%e4%be%9b%e3%81%95%e3%82%8c%e3%82%8b%e6%a4%9c%e7%ae%97%e3%83%ab%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.sambuichi.jp\/?p=6398&lang=en","title":{"rendered":"Can schematron validation rules from JP PINT 0.9.2 make your validation  Compliant?"},"content":{"rendered":"<p>Views: 65<\/p><p>Peppol authority of Japan <a href=\"https:\/\/www.digital.go.jp\/policies\/electronic_invoice\/\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"><\/i><\/a> announced new releaseJP PINT 0.9.2 <a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"><\/i><\/a>.<\/p>\n<p>PINT Complience <a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/compliance\/\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"><\/i><\/a> states;<\/p>\n<blockquote>\n<h3>Senders compliance to PINT based BIS<\/h3>\n<p>A sending party may claim compliance to the Peppol International model if they send invoices that comply with the rules of the Peppol International Invoice when applied without any specialized rules even if that document may at the same time comply with any set of specialized rules.<\/p>\n<h4>Processing of rules<\/h4>\n<p>A sender SHALL NOT send messages that are not compliant to the BIS specification identified by the customization.<br \/>\nA sender shall <b>validate<\/b> an outgoing message that are in line with the customsation identifier.\n<\/p><\/blockquote>\n<p>I would like to compare this version with BIS Billing 3.0 to see which range of the validation defined in clause 5.<br \/>\nClause 5 Rules defines the validation rules for monetary amounts caliculation. These caliculation rules were fully supported by BIS Billing 3.0.<br \/>\nThe BIS Billing 3.0 rules defined in the following two pages.<\/p>\n<p><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/\">EN16931 model bound to UBL<\/a><br \/>\n<a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-peppol\/\">Rules for Peppol BIS 3.0 Billing<\/a><\/p>\n<table>\n<colgroup>\n<col width=\"15%\">\n<col width=\"30%\">\n<col width=\"45%\">\n<col width=\"10%\">\n<\/colgroup>\n<tr>\n<th>ID<\/th>\n<th>BT<\/th>\n<th>5.1 Calculations<\/th>\n<th>JP PINT 0.9.2<\/th>\n<\/tr>\n<tr>\n<td>ibt-092<\/td>\n<td>Document level allowance amount<br \/>\u8acb\u6c42\u66f8\u30ec\u30d9\u30eb\u306e\u8fd4\u91d1\u91d1\u984d<\/td>\n<td>ibt-092 = ibt-093 * (ibt-094 \/ 100)<\/td>\n<td>none<\/td>\n<\/tr>\n<tr>\n<td>ibt-099<\/td>\n<td>Document level charge amount<br \/>\u8acb\u6c42\u66f8\u30ec\u30d9\u30eb\u306e\u8ffd\u52a0\u8acb\u6c42\u91d1\u984d<\/td>\n<td>ibt-099 = ibt-100 * (ibt-101 \/ 100)<\/td>\n<td>none<\/td>\n<\/tr>\n<tr>\n<td>ibt-106<\/td>\n<td>Sum of Invoice line net amount<br \/>\u5024\u5f15\u5f8c\u8acb\u6c42\u66f8\u660e\u7d30\u884c\u91d1\u984d\u306e\u5408\u8a08<\/td>\n<td>ibt-106 = \u03a3 ibt-131<\/td>\n<td>Shared<\/td>\n<\/tr>\n<tr>\n<td>ibt-107<\/td>\n<td>Sum of allowances on document level<br \/>\u8acb\u6c42\u66f8\u30ec\u30d9\u30eb\u306e\u8fd4\u91d1\u306e\u5408\u8a08<\/td>\n<td>ibt-107 = \u03a3 ibt-092<\/td>\n<td>Shared<\/td>\n<\/tr>\n<tr>\n<td>ibt-108<\/td>\n<td>Sum of charges on document level<br \/>\u8acb\u6c42\u66f8\u30ec\u30d9\u30eb\u306e\u8ffd\u52a0\u8acb\u6c42\u306e\u5408\u8a08<\/td>\n<td>ibt-108 = \u03a3 ibt-099<\/td>\n<td>Shared<\/td>\n<\/tr>\n<tr>\n<td>ibt-109<\/td>\n<td>Invoice total amount without TAX<br \/>\u8acb\u6c42\u66f8\u5408\u8a08\u91d1\u984d(\u7a0e\u629c\u304d)<\/td>\n<td>ibt-109 = ibt-106 &#8211; ibt-107 + ibt-108<\/td>\n<td>Shared<\/td>\n<\/tr>\n<tr>\n<td>ibt-110<\/td>\n<td>Invoice total TAX amount<br \/>\u8acb\u6c42\u66f8\u6d88\u8cbb\u7a0e\u5408\u8a08\u91d1\u984d<\/td>\n<td>ibt-110 = \u03a3 ibt-117<\/td>\n<td>Shared<\/td>\n<\/tr>\n<tr>\n<td>ibt-112<\/td>\n<td>Invoice total amount with TAX<br \/>\u8acb\u6c42\u66f8\u5408\u8a08\u91d1\u984d(\u7a0e\u8fbc\u307f)<\/td>\n<td>ibt-112 = ibt-109 + ibt-110<\/td>\n<td>Shared<\/td>\n<\/tr>\n<tr>\n<td>ibt-115<\/td>\n<td>Amount due for payment<br \/>\u5dee\u5f15\u8acb\u6c42\u91d1\u984d<\/td>\n<td>ibt-115 = ibt-112 &#8211; ibt-113 + ibt-114<\/td>\n<td>Shared<\/td>\n<\/tr>\n<tr>\n<td>ibt-116<\/td>\n<td>TAX category taxable amount<br \/>\u8ab2\u7a0e\u5206\u985e\u6bce\u306e\u8ab2\u7a0e\u57fa\u6e96\u984d<\/td>\n<td>ibt-116 = \u03a3 ibt-131 &#8211; ibt-092 + ibt-099<\/td>\n<td>none<\/td>\n<\/tr>\n<tr>\n<td>ibt-117<\/td>\n<td>TAX category tax amount<br \/>\u8ab2\u7a0e\u5206\u985e\u6bce\u306e\u6d88\u8cbb\u7a0e\u984d<\/td>\n<td>ibt-117 = ibt-116 * (ibt-119 \/ 100)<br \/>rounded result amount shall be between the floor and the ceiling<\/td>\n<td>Specific<\/td>\n<\/tr>\n<tr>\n<td>ibt-131<\/td>\n<td>Invoice line net amount<br \/>\u5024\u5f15\u5f8c\u8acb\u6c42\u66f8\u660e\u7d30\u884c\u91d1\u984d(\u7a0e\u629c\u304d)<\/td>\n<td>ibt-131 = (ibt-146 \/ ibt-149) * ibt-129 &#8211; ibt-136 + ibt-141<\/td>\n<td>none<\/td>\n<\/tr>\n<tr>\n<td>ibt-136<\/td>\n<td>Invoice line allowance amount<br \/>\u8acb\u6c42\u66f8\u660e\u7d30\u884c\u306e\u8fd4\u91d1\u91d1\u984d(\u7a0e\u629c\u304d)<\/td>\n<td>ibt-136 = ibt-137 * (ibt-138 \/ 100)<\/td>\n<td>none<\/td>\n<\/tr>\n<tr>\n<td>ibt-141<\/td>\n<td>Invoice line charge amount,br>\u8acb\u6c42\u66f8\u660e\u7d30\u884c\u306e\u8ffd\u52a0\u8acb\u6c42\u91d1\u984d(\u7a0e\u629c\u304d)<\/td>\n<td>ibt-141 = ibt-142 * (ibt-143 \/ 100)<\/td>\n<td>none<\/td>\n<\/tr>\n<tr>\n<td>ibt-146<\/td>\n<td>Item net price<br \/>\u54c1\u76ee\u5358\u4fa1(\u5024\u5f15\u5f8c)(\u7a0e\u629c\u304d)<\/td>\n<td>ibt-146 = ibt-148 &#8211; ibt-147<\/td>\n<td>none<\/td>\n<\/tr>\n<\/table>\n<p>The following table shows the message for each rule.<\/p>\n<table>\n<colgroup>\n<col width=\"15%\">\n<col width=\"30%\">\n<col width=\"55%\">\n<\/colgroup>\n<tr>\n<th>ID<\/td>\n<td>BT<\/td>\n<td>rule<\/td>\n<\/tr>\n<tr>\n<td>ibt-106<\/td>\n<td>Sum of Invoice line net amount<br \/>\u5024\u5f15\u5f8c\u8acb\u6c42\u66f8\u660e\u7d30\u884c\u91d1\u984d\u306e\u5408\u8a08<\/td>\n<td><a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/trn-invoice\/rule\/ibr-co-10\/\">[ibr-co-10]<\/a><br \/>Sum of Invoice line net amount (ibt-106) = \u03a3 Invoice line net amount (ibt-131).<\/td>\n<\/tr>\n<tr>\n<td>ibt-107<\/td>\n<td>Sum of allowances on document level<br \/>\u8acb\u6c42\u66f8\u30ec\u30d9\u30eb\u306e\u8fd4\u91d1\u306e\u5408\u8a08<\/td>\n<td><a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/trn-invoice\/rule\/ibr-co-11\/\">[ibr-co-11]<\/a><br \/>Sum of allowances on document level (ibt-107) = \u03a3 Document level allowance amount (ibt-092).<\/td>\n<\/tr>\n<tr>\n<td>ibt-108<\/td>\n<td>Sum of charges on document level<br \/>\u8acb\u6c42\u66f8\u30ec\u30d9\u30eb\u306e\u8ffd\u52a0\u8acb\u6c42\u306e\u5408\u8a08<\/td>\n<td><a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/trn-invoice\/rule\/ibr-co-12\/\">[ibr-co-12]<\/a><br \/>Sum of charges on document level (ibt-108) = \u03a3 Document level charge amount (ibt-099).<\/td>\n<\/tr>\n<tr>\n<td>ibt-109<\/td>\n<td>Invoice total amount without TAX<br \/>\u8acb\u6c42\u66f8\u5408\u8a08\u91d1\u984d(\u7a0e\u629c\u304d)<\/td>\n<td><a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/trn-invoice\/rule\/ibr-co-13\/\">[ibr-co-13]<\/a><br \/>Invoice total amount without Tax (ibt-109) = \u03a3 Invoice line net amount (ibt-131) &#8211; Sum of allowances on document level (ibt-107) + Sum of charges on document level (ibt-108).<\/td>\n<\/tr>\n<tr>\n<td>ibt-110<\/td>\n<td>Invoice total TAX amount<br \/>\u8acb\u6c42\u66f8\u6d88\u8cbb\u7a0e\u5408\u8a08\u91d1\u984d<\/td>\n<td><a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/trn-invoice\/rule\/ibr-co-14\/\">[ibr-co-14]<\/a><br \/>Invoice total Tax amount (ibt-110) = \u03a3 Tax category tax amount (ibt-117).<\/td>\n<\/tr>\n<tr>\n<td>ibt-112<\/td>\n<td>Invoice total amount with TAX<br \/>\u8acb\u6c42\u66f8\u5408\u8a08\u91d1\u984d(\u7a0e\u8fbc\u307f)<\/td>\n<td><a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/trn-invoice\/rule\/ibr-co-15\/\">[ibr-co-15]<\/a><br \/>Invoice total amount with Tax (ibt-112) = Invoice total amount without Tax (ibt-109) + Invoice total Tax amount (ibt-110).<\/td>\n<\/tr>\n<tr>\n<td>ibt-115<\/td>\n<td>Amount due for payment<br \/>\u8acb\u6c42\u66f8\u5408\u8a08\u91d1\u984d(\u7a0e\u8fbc\u307f)<\/td>\n<td><a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/trn-invoice\/rule\/ibr-co-16\/\">[ibr-co-16]<\/a><br \/>Amount due for payment (ibt-115) = Invoice total amount with Tax (ibt-112) &#8211; Paid amount (ibt-113) + Rounding amount (ibt-114).<\/td>\n<\/tr>\n<tr>\n<td>ibt-117<\/td>\n<td>TAX category tax amount<br \/>\u8ab2\u7a0e\u5206\u985e\u6bce\u306e\u6d88\u8cbb\u7a0e\u984d<\/td>\n<td><a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/trn-invoice\/rule\/aligned-ibrp-051-jp\/\">[aligned-ibrp-051-jp]<\/a><br \/>Tax category tax amount (ibt-117) = tax category taxable amount (ibt-116) x (tax category rate (ibt-119) \/ 100), rounded to integer. The rounded result amount shall be between the floor and the ceiling.<br \/>[aligned-ibrp-e-09]<br \/>The tax category tax amount (ibt-117) In a tax breakdown (ibg-23) where the tax category code (ibt-118) equals &#8220;&#8221;Exempt from tax&#8221;&#8221; MUST equal 0 (zero).<br \/><a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/trn-invoice\/rule\/aligned-ibrp-g-09\/\">[aligned-ibrp-g-09]<\/a><br \/>The tax category tax amount (ibt-117) in a tax breakdown (ibg-23) where the tax category code (ibt-118) is &#8220;Export&#8221; MUST be 0 (zero).<br \/><a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/trn-invoice\/rule\/aligned-ibrp-o-09\/\">[aligned-ibrp-o-09]<\/a><br \/>The tax category tax amount (ibt-117) in a tax breakdown (ibg-23) where the tax category code (ibt-118) is &#8220;Not subject to tax&#8221; MUST be 0 (zero).<\/td>\n<\/tr>\n<\/tr>\n<\/table>\n<p>Since the coding of the [aligned-ibrp-051-jp] listed on the page is difficult to read, you can check the following by indenting the lines separately (though I don&#8217;t think it is necessary to apply the round () function to the tax rate).<\/p>\n<p>In the last part, this rule added the rules when the tax rate is 0 (zero) and when the Tax category code is \u2018O\u2019, when there is no tax rate.<\/p>\n<p>In addition, cbc: TaxAmount\/@currencyID = \/ubl: Invoice\/cbc: DocumentCurrencyCode\/text () is coded in the select condition of cac:taxSubtotal to which the rule is applied, but this rule  is only applicable when the currency is Japanese JPY. I think cbc:TaxAmount\/@currencyID=&#8217;JPY&#8217; is better. Since Invoices denominated in foreign currencies are not always rounded down or rounded up.<\/p>\n<pre class=\"height-set:true width-set:true lang:default decode:true \" >Context\r\n  cac:TaxSubtotal[cbc:TaxAmount\/@currencyID=\/ubl:Invoice\/cbc:DocumentCurrencyCode\/text()]\r\nTest\r\n  (\r\n    (cac:TaxCategory\/normalize-space(upper-case(cbc:ID)) != 'O') and \r\n    (\r\n      (\r\n        round(cac:TaxCategory\/xs:decimal(cbc:Percent)) != 0 and \r\n        (\r\n          xs:decimal(cbc:TaxAmount) &gt;= \r\n          floor(\r\n            xs:decimal(cbc:TaxableAmount) * (cac:TaxCategory\/xs:decimal(cbc:Percent) div 100)\r\n          )\r\n        ) and \r\n        (\r\n          xs:decimal(cbc:TaxAmount) &lt;= \r\n          ceiling(\r\n            xs:decimal(cbc:TaxableAmount) * (cac:TaxCategory\/xs:decimal(cbc:Percent) div 100)\r\n          )\r\n        )\r\n      ) or \r\n      (\r\n        round(cac:TaxCategory\/xs:decimal(cbc:Percent)) = 0 and \r\n        (xs:decimal(cbc:TaxAmount) = 0)\r\n      )\r\n    )\r\n  ) or \r\n  (\r\n    not(cac:TaxCategory\/cbc:Percent) and \r\n    (\r\n      cac:TaxCategory\/normalize-space(upper-case(cbc:ID)) = 'O'\r\n    ) and \r\n    (xs:decimal(cbc:TaxAmount) = 0)\r\n  )<\/pre>\n<p>Compared to JP JPINT 0.9.2, the following BIS Billing 3.0 table shows that all validation rules are provided for all monetary calculations.<\/p>\n<p>A rounding rule for the tax amount calculation for each tax category code is provided, but no following underlying amounts rule is provided.<\/p>\n<p>Validation rules for ibt-116 TAX category taxable amount, ibt-131 Invoice line net amount, and ibt-146 Item net price were provided with BIS Billing 3.0. Without these fundamental validation rule, even if a sender validate an outgoing message with provided schematron files that are in line with the customsation identifier, a sender CAN NOT claim that he never sends messages that are not compliant to the BIS specification identified by the customization.<\/p>\n<p>If each service provider (C2 \/ C3) or end user (C1 \/ C4) are asked to achieve this compliance requirement with their own additional validation functionality with their own software. This additional requirement not only deviates from the standardization intent, but  this also may require them unintentionally investmants in compliance. These monetary amounts validation rules were provided completely free of charge in BIS Billing 3.0.<\/p>\n<p>I hope that it will be improved in the next revision.<\/p>\n<table>\n<colgroup>\n<col width=\"10%\">\n<col width=\"30%\">\n<col width=\"60%\">\n<\/colgroup>\n<tr>\n<th>ID<\/th>\n<th>BT<\/th>\n<th>BIS Billing 3.0<\/th>\n<\/tr>\n<tr>\n<td>ibt-092<\/td>\n<td>Document level allowance amount<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-peppol\/PEPPOL-EN16931-R040\/\">PEPPOL-EN16931-R040<\/a><br \/>Allowance\/charge amount must equal base amount * percentage\/100 if base amount and percentage exists<\/td>\n<\/tr>\n<tr>\n<td>ibt-099<\/td>\n<td>Document level charge amount<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-peppol\/PEPPOL-EN16931-R040\/\">PEPPOL-EN16931-R040<\/a><br \/>Allowance\/charge amount must equal base amount * percentage\/100 if base amount and percentage exists<\/td>\n<\/tr>\n<tr>\n<td>ibt-106<\/td>\n<td>Sum of Invoice line net amount<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/BR-CO-10\/\">BR-CO-10<\/a><br \/>Sum of Invoice line net amount (BT-106) = \u03a3 Invoice line net amount (BT-131).<\/td>\n<\/tr>\n<tr>\n<td>ibt-107<\/td>\n<td>Sum of allowances on document level<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/BR-CO-11\/\">BR-CO-11<\/a><br \/>Sum of allowances on document level (BT-107) = \u03a3 Document level allowance amount (BT-92).<\/td>\n<\/tr>\n<tr>\n<td>ibt-108<\/td>\n<td>Sum of charges on document level<\/td>\n<td>B<a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/BR-CO-12\/\">BR-CO-12<\/a><br \/>Sum of charges on document level (BT-108) = \u03a3 Document level charge amount (BT-99).<\/td>\n<\/tr>\n<tr>\n<td>ibt-109<\/td>\n<td>Invoice total amount without TAX<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/BR-CO-13\/\">BR-CO-13<\/a><br \/>Invoice total amount without VAT (BT-109) = \u03a3 Invoice line net amount (BT-131) &#8211; Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).<\/td>\n<\/tr>\n<tr>\n<td>ibt-110<\/td>\n<td>Invoice total TAX amount<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/BR-CO-14\/\">BR-CO-14<\/a><br \/>Invoice total VAT amount (BT-110) = \u03a3 VAT category tax amount (BT-117).<\/td>\n<\/tr>\n<tr>\n<td>ibt-112<\/td>\n<td>Invoice total amount with TAX<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/BR-CO-15\/\">BR-CO-15<\/a><br \/>Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).<\/td>\n<\/tr>\n<tr>\n<td>ibt-115<\/td>\n<td>Amount due for payment<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/BR-CO-16\/\">BR-CO-16<\/a><br \/>Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114).<\/td>\n<\/tr>\n<tr>\n<td>ibt-116<\/td>\n<td>TAX category taxable amount<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/BR-S-08\/\">BR-S-08<\/a><br \/>For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is &#8220;Standard rated&#8221;, the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is &#8220;Standard rated&#8221; and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).<\/td>\n<\/tr>\n<tr>\n<td>ibt-117<\/td>\n<td>TAX category tax amount<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/BR-CO-17\/\">BR-CO-17<\/a><br \/>VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) \/ 100), rounded to two decimals.<br \/><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-tc434\/BR-S-09\/\">BR-S-09<\/a><br \/>The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is &#8220;Standard rated&#8221; shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).<\/td>\n<\/tr>\n<tr>\n<td>ibt-131<\/td>\n<td>Invoice line net amount<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-peppol\/PEPPOL-EN16931-R120\/\">PEPPOL-EN16931-R120<\/a><br \/>Invoice line net amount MUST equal (Invoiced quantity * (Item net price\/item price base quantity) + Sum of invoice line charge amount &#8211; sum of invoice line allowance amount<\/td>\n<\/tr>\n<tr>\n<td>ibt-136<\/td>\n<td>Invoice line allowance amount<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-peppol\/PEPPOL-EN16931-R040\/\">PEPPOL-EN16931-R040<\/a><br \/>Allowance\/charge amount must equal base amount * percentage\/100 if base amount and percentage exists<\/td>\n<\/tr>\n<tr>\n<td>ibt-141<\/td>\n<td>Invoice line charge amount<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-peppol\/PEPPOL-EN16931-R040\/\">PEPPOL-EN16931-R040<\/a>PEPPOL-EN16931-R040<br \/>Allowance\/charge amount must equal base amount * percentage\/100 if base amount and percentage exists<\/td>\n<\/tr>\n<tr>\n<td>ibt-146<\/td>\n<td>Item net price<\/td>\n<td><a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/rules\/ubl-peppol\/PEPPOL-EN16931-R046\/\">PEPPOL-EN16931-R046<\/a><br \/>Item net price MUST equal (Gross price &#8211; Allowance amount) when gross price is provided.<\/td>\n<\/tr>\n<\/table>\n<p>BIS Billing 3.0 defines validation of ibt-116 TAX category taxable amount as follows;<br \/>\nBR-S-08 (fatal)<br \/>\nFor each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is &#8220;Standard rated&#8221;, the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is &#8220;Standard rated&#8221; and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).<\/p>\n<p>where context targets cac:TaxSubtotal\/cac:TaxCategory and defines test as folllows.<br \/>\n\/*\/cac:TaxTotal\/cac:TaxSubtotal\/cac:TaxCategory[normalize-space(cbc:ID)=&#8217;S&#8217;][cac:TaxScheme\/normalize-space(upper-case(cbc:ID))=&#8217;VAT&#8217;]<\/p>\n<pre class=\"height-set:true width-set:true lang:default decode:true \" >every $rate in xs:decimal(cbc:Percent) satisfies (\r\n  (\r\n    (\r\n      exists(\/\/cac:InvoiceLine[cac:Item\/cac:ClassifiedTaxCategory\/normalize-space(cbc:ID)='S'][cac:Item\/cac:ClassifiedTaxCategory\/xs:decimal(cbc:Percent=$rate]) or\r\n      exists(\/\/cac:AllowanceCharge[cac:TaxCategory\/normalize-space(cbc:ID)='S'][cac:TaxCategory\/xs:decimal(cbc:Percent)=$rate])\r\n    ) and\r\n    (\r\n      (\r\n        ..\/xs:decimal(cbc:TaxableAmount - 1) &lt; \r\n        (\r\n          sum(..\/..\/..\/cac:InvoiceLine[cac:Item\/cac:ClassifiedTaxCategory\/normalize-space(cbc:ID)='S'][cac:Item\/cac:ClassifiedTaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:LineExtensionAmount)) +\r\n          sum(..\/..\/..\/cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory\/normalize-space(cbc:ID)='S'][cac:TaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:Amount)) -\r\n          sum(..\/..\/..\/cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory\/normalize-space(cbc:ID)='S'][cac:TaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:Amount))\r\n        )\r\n      ) and\r\n      (\r\n        ..\/xs:decimal(cbc:TaxableAmount + 1) &gt; \r\n        (\r\n          sum(..\/..\/..\/cac:InvoiceLine[cac:Item\/cac:ClassifiedTaxCategory\/normalize-space(cbc:ID)='S'][cac:Item\/cac:ClassifiedTaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:LineExtensionAmount)) +\r\n          sum(..\/..\/..\/cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory\/normalize-space(cbc:ID)='S'][cac:TaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:Amount)) -\r\n          sum(..\/..\/..\/cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory\/normalize-space(cbc:ID)='S'][cac:TaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:Amount))\r\n        )\r\n      )\r\n    )\r\n  ) or\r\n  (\r\n    exists(\/\/cac:CreditNoteLine[cac:Item\/cac:ClassifiedTaxCategory\/normalize-space(cbc:ID)='S'][cac:Item\/cac:ClassifiedTaxCategory\/xs:decimal(cbc:Percent)=$rate]) or\r\n    exists(\/\/cac:AllowanceCharge[cac:TaxCategory\/normalize-space(cbc:ID)='S'][cac:TaxCategory\/xs:decimal(cbc:Percent)=$rate])\r\n  ) and\r\n  (\r\n    (\r\n      ..\/xs:decimal(cbc:TaxableAmount - 1) &lt; \r\n      (\r\n        sum(..\/..\/..\/cac:CreditNoteLine[cac:Item\/cac:ClassifiedTaxCategory\/normalize-space(cbc:ID)='S'][cac:Item\/cac:ClassifiedTaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:LineExtensionAmount)) +\r\n        sum(..\/..\/..\/cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory\/normalize-space(cbc:ID)='S'][cac:TaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:Amount)) -\r\n        sum(..\/..\/..\/cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory\/normalize-space(cbc:ID)='S'][cac:TaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:Amount))\r\n      )\r\n    ) and\r\n    (\r\n      ..\/xs:decimal(cbc:TaxableAmount + 1) &gt; \r\n      (\r\n        sum(..\/..\/..\/cac:CreditNoteLine[cac:Item\/cac:ClassifiedTaxCategory\/normalize-space(cbc:ID)='S'][cac:Item\/cac:ClassifiedTaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:LineExtensionAmount)) +\r\n        sum(..\/..\/..\/cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory\/normalize-space(cbc:ID)='S'][cac:TaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:Amount)) -\r\n        sum(..\/..\/..\/cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory\/normalize-space(cbc:ID)='S'][cac:TaxCategory\/xs:decimal(cbc:Percent)=$rate]\/xs:decimal(cbc:Amount))\r\n      )\r\n    )\r\n  )\r\n)<\/pre>\n<p>For ibt-131 net invoice line amount, the slack () function is used in the invoice line amount (excluding tax) validation rule as follows:<\/p>\n<pre class=\"height-set:true width-set:true lang:default decode:true \" title=\"PEPPOL-EN16931-R120\" >Context\r\n  cac:InvoiceLine | cac:CreditNoteLine\r\nTest\r\n  u:slack($lineExtensionAmount, \r\n  (\r\n    $quantity * ($priceAmount div $baseQuantity)) + \r\n    $chargesTotal - \r\n    $allowancesTotal,\r\n    0.02\r\n  )<\/pre>\n<p>The slack() function is following XSL function.<\/p>\n<pre class=\"height-set:true width-set:true lang:default decode:true \" >&lt;function xmlns=\"http:\/\/www.w3.org\/1999\/XSL\/Transform\" name=\"u:slack\" as=\"xs:boolean\"&gt;\r\n    &lt;param name=\"exp\" as=\"xs:decimal\"\/&gt;\r\n    &lt;param name=\"val\" as=\"xs:decimal\"\/&gt;\r\n    &lt;param name=\"slack\" as=\"xs:decimal\"\/&gt;\r\n    &lt;value-of select=\"\r\n        xs:decimal($exp + $slack) &amp;gt;= $val and \r\n        xs:decimal($exp - $slack) &amp;lt;= $val\r\n    \"\/&gt;\r\n&lt;\/function&gt;<\/pre>\n<p>It is determined whether the amount to be compared and the amount of the check result are within the range of \u00b1 slack value. In the case of foreign currency, the slack value declared is usually 0.02 because there are two digits after the decimal point. If the difference between the check result and the comparison target amount is within this range, it is judged to be a correct calculation. In Japanese yen, the slack value may be 2 because the normal monetary amount is expressed as an integer.<\/p>\n<p>This article is based on the following sources:<br \/>\nDownloaded files from Japan PINT Invoice Version 0.9.2 Download resources button.<br \/>\n<a href=\"https:\/\/test-docs.peppol.eu\/pint\/pint-jp\/work-v1\/pint-jp\/\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-6.57.35-1024x673.png\" alt=\"\" width=\"1024\" height=\"673\" class=\"alignnone size-large wp-image-6392\" srcset=\"https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-6.57.35-1024x673.png 1024w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-6.57.35-300x197.png 300w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-6.57.35-768x504.png 768w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-6.57.35-1536x1009.png 1536w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-6.57.35-2048x1345.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><br \/>\nand Peppol BIS Billing 3.0 Home page.<br \/>\n<a href=\"https:\/\/docs.peppol.eu\/poacc\/billing\/3.0\/\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-7.05.05-1024x698.png\" alt=\"\" width=\"1024\" height=\"698\" class=\"alignnone size-large wp-image-6394\" srcset=\"https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-7.05.05-1024x698.png 1024w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-7.05.05-300x205.png 300w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-7.05.05-768x524.png 768w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-7.05.05-1536x1047.png 1536w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/06\/Screen-Shot-2022-06-05-at-7.05.05-2048x1396.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>I listed the result of tree command for unzipped directory. The schematron file listed above is the Shared rule and the below is the Specific(Aligned).<br \/>\n    \u251c\u2500\u2500 schematron<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 PINT-UBL-validation-preprocessed.sch<br \/>\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 PINT-jurisdiction-aligned-rules.sch<br \/>\n    \u251c\u2500\u2500 semantic-model.yaml<br \/>\n    \u2514\u2500\u2500 syntax-binding.yaml<\/p>\n<p>Files included in the downloaded directory contains yaml files corresponding to the code list, the Semantic model page, and the Syntax binding page. Unfotunately XSLT file contained in the previous download is not included in this directory. Please make sure to update customizationId in XSLT file, if you want to use previous file.<\/p>\n<p>pint-jp-resources-dev pontsoleil$ tree .<br \/>\n.<br \/>\n\u251c\u2500\u2500 common<br \/>\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 docs<br \/>\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 bis.pdf<br \/>\n\u2502\u00a0\u00a0     \u251c\u2500\u2500 compliance.pdf<br \/>\n\u2502\u00a0\u00a0     \u2514\u2500\u2500 release-notes.pdf<br \/>\n\u2514\u2500\u2500 trn-invoice<br \/>\n    \u251c\u2500\u2500 codelist<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 Aligned-TaxCategoryCodes.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 Aligned-TaxCategoryCodes.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 Aligned-TaxExemptionCodes.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 Aligned-TaxExemptionCodes.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 ICD.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 ICD.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 ISO3166.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 ISO3166.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 ISO4217.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 ISO4217.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 MimeCode.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 MimeCode.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 SEPA.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 SEPA.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL1001-inv.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL1001-inv.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL1153.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL1153.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL2005.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL2005.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL4461.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL4461.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL5189.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL5189.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL7143.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL7143.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL7161.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNCL7161.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNECERec20.gc<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 UNECERec20.yaml<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 eas.gc<br \/>\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 eas.yaml<br \/>\n    \u251c\u2500\u2500 schematron<br \/>\n    \u2502\u00a0\u00a0 \u251c\u2500\u2500 PINT-UBL-validation-preprocessed.sch<br \/>\n    \u2502\u00a0\u00a0 \u2514\u2500\u2500 PINT-jurisdiction-aligned-rules.sch<br \/>\n    \u251c\u2500\u2500 semantic-model.yaml<br \/>\n    \u2514\u2500\u2500 syntax-binding.yaml<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Views: 65Peppol authority of Japan announced new releaseJP PINT 0.9.2 . PINT Complience states; Senders compli [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6373,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[64,57],"tags":[],"_links":{"self":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts\/6398"}],"collection":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6398"}],"version-history":[{"count":6,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts\/6398\/revisions"}],"predecessor-version":[{"id":6409,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts\/6398\/revisions\/6409"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/media\/6373"}],"wp:attachment":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}