Search Posts

Views: 231

Nobuyuki SAMBUICHI

ISO/TC295 Audit data services/SG1 Semantic model Convener

5月23日の記事に、税込み価額について記載を追加しました。

2023年5月19日公開

次のページから草案が公開されました。適格請求書発行事業者でない事業者が発行するデジタルインボイスです。

適格請求書発行事業者の登録番号がないので、デジタルインボイスに登録事業者番号を記載しないことの他に次のような変更点があります。

2.1.1. Documents used in process
The Summarised invoicing process requires the use of the following documents:

Non-tax Invoice (480)

Delivery Note

区分記載請求書のInvoice type code (ibt-003) 請求書タイプコードは、480です。
Delivery Note 納品書 の記載がありますが、今後提供される予定なのでしょうか。

380は、次のコード表から選択されたものですが、次のコード表には480は含まれていません。

税込み価額について

明細行の請求金額は、
ibt-131 Invoice line net amount
The total amount of the Invoice line (before tax).
と定義されており、JP PINT V1と同様に、税抜き金額です。

Open PeppolのJP PINT Invoiceは、Sharedルールに次のルールがあり、税抜価額が基本です。
[ibr-co-10]-Sum of Invoice line net amount (ibt-106) = Σ Invoice line net amount (ibt-131).
明細行の税抜き金額 Invoice line net amount (ibt-131)にある値を合計するので必須項目です。

日本だけこの項目の意味を税込み価額と解釈することはできません。区分記載請求書の基本は、税込み価額だったかと思いますので、どういった対応を想定されているのでしょうか。

望ましい形は、UBL 2.3 の税込み価額の項目 cbc:TaxInclusiveLineExtensionAmount の使用ですが。

税込み価額については、次の記事をご確認ください。

スキーマトロンの確認

テストについては、CEF eInvoicingに基づいたJP PINT1.0ルール検証環境とテスト も併せてご確認ください。

Download resources から配布されるzipファイルには、V1ではサンプルインボイスとスキーマトロンファイル、そしてスキーマトロンファイルから生成したxsltファイルが含めれていましたが、今回の配布ではサンプルインボイスはふくまれていませんでした。

スキーマトロンファイルしか含まれていませんでしたが、このファイルを使用して検証してみます。サンプルインボイスは、V1に含まれていたものを適宜修正しながら検証作業を進めます。

サンプルインボイス

V1の配布ファイルJapan PINT Invoice UBL Example.xmlを適宜修正しました。

a) Invoice type code(ibt-003)請求書タイプコードを 480 に変更しました。

b) PROCESS CONTROL(ibg-02)プロセスコントロール の値をJP BIS Invoice for Non-tax Registered Businessesの値に修正しました。
• Business process type(ibt-023)ビジネスプロセスタイプ cbc:CustomizationID
urn:peppol:bis:billing は同じです。
• Specification identifier(ibt-024)仕様ID cbc:ProfileID
urn:peppol:pint:billing-3.0@jp:peppol-1 を urn:peppol:pint:nontaxinvoice-1@jp-1 に変更されました。
ビジネスプロセスタイプは変更ありませんが、仕様IDが変更されました。

c) 登録事業者番号がないので、 次の項目が定義できません。
• Seller TAX identifier(ibt-031)売り手税ID

上記の修正だけなので、スキーマトロンでエラーが報告されると予想していましたが、正常終了してしまいました。

また、計算方法の変更点は、税額がゼロであることとされています。

5.3.1. Calculation of Consumption Tax
A Non-tax Invoice is not allowed to have any tax amount by Consumption Tax law. So that, Invoice total tax amount in tax accounting currency (ibt-111), Tax category tax amount (ibt-117) and Tax category tax amount in tax accounting currency (ibt-190) must be zero.

が、肝心の Invoice total TAX amount(ibt-110)請求書消費税合計金額についての規定がありません。

のtable2では、税額と税率を x としていますが、税額は、ゼロとすることが要請されていますが、税率はV1 380と同様に定義することとされています。

table2

サンプルインボイス Japan-PINT_ntr_Invoice_UBL_Example.xml は、ページの最後に掲載しました。これはほぼすべての項目を網羅したインボイスですので実際にはありえないのですが、テストに適しています。

mavenコマンドでスキーマトロンファイルからxsltファイルを生成

実行パラメタ

jp-ntr-xslt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed under European Union Public Licence (EUPL) version 1.2.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.helger</groupId>
    <artifactId>parent-pom</artifactId>
    <version>1.10.8</version>
  </parent>
  <artifactId>centc434-validation-rules</artifactId>
  <version>1.0.0</version>
  <name>centc434-validation-rules</name>
  <description>EN16931 - CEN/TC 434 validation rules</description>
  <url>https://github.com/CenPC434/validation</url>
  <inceptionYear>2016</inceptionYear>
  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <build>
    <plugins>
      <plugin>
        <groupId>com.helger.maven</groupId>
        <artifactId>ph-schematron-maven-plugin</artifactId>
        <version>5.2.0</version>
        <executions>
          <execution>
            <id>ubl</id>
            <goals>
              <goal>convert</goal>
            </goals>
            <configuration>
              <schematronDirectory>${basedir}/ubl/schematron/preprocessed_ntr</schematronDirectory>
              <xsltDirectory>${basedir}/ubl/xslt/ntr</xsltDirectory>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <schematronPattern>*.sch</schematronPattern>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

実行コマンドは次です。

$ mvn -f jp-ntr-xslt.xml process-resources

実行ログ
$ mvn -f jp-ntr-xslt.xml process-resources
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------< com.helger:centc434-validation-rules >----------------
[INFO] Building centc434-validation-rules 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- ph-buildinfo-maven-plugin:3.0.0:generate-buildinfo (default) @ centc434-validation-rules ---
[INFO] Successfully created temp directory buildinfo-maven-plugin
[INFO] 
[INFO] --- ph-schematron-maven-plugin:5.2.0:convert (ubl) @ centc434-validation-rules ---
[INFO] Converting Schematron file '.../PINT-jurisdiction-aligned-rules.sch' to XSLT file '.../PINT-jurisdiction-aligned-rules.xslt'
[WARNING] .../PINT-jurisdiction-aligned-rules.sch [0:0]: Transformation warning - A function that computes atomic values should use xsl:sequence rather than xsl:value-of
[INFO] Converting Schematron file '.../PINT-jurisdiction-aligned-revised-rules.sch' to XSLT file '.../PINT-jurisdiction-aligned-revised-rules.xslt'
[WARNING] .../preprocessed_ntr/PINT-jurisdiction-aligned-revised-rules.sch [0:0]: Transformation warning - A function that computes atomic values should use xsl:sequence rather than xsl:value-of
[INFO] Converting Schematron file '.../PINT-UBL-validation-preprocessed.sch' to XSLT file '.../PINT-UBL-validation-preprocessed.xslt'
[WARNING] .../preprocessed_ntr/PINT-UBL-validation-preprocessed.sch [0:0]: Transformation warning - A function that computes atomic values should use xsl:sequence rather than xsl:value-of
[WARNING] .../preprocessed_ntr/PINT-UBL-validation-preprocessed.sch [0:0]: Transformation warning - A function that computes atomic values should use xsl:sequence rather than xsl:value-of
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ centc434-validation-rules ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory .../validation/src/main/resources
[INFO] Copying 1 resource to META-INF
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.829 s
[INFO] Finished at: 2023-05-23T18:53:15+09:00
[INFO] ------------------------------------------------------------------------
$ 

Shared rule PINT-UBL-validation-preprocessed.xslt
Aligned rule PINT-jurisdiction-aligned-rules.xslt
Aligned rule修正版 PINT-jurisdiction-aligned-revised-rules.xslt

後述するように配布されたスキーマトロンファイルでは、税額が記載されていたもエラーが報告されないので、適宜修正しています。

mavenコマンドでxsltファイルによるルール検証

実行パラメタ

jp-ntr-validate.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed under European Union Public Licence (EUPL) version 1.2.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.helger</groupId>
    <artifactId>parent-pom</artifactId>
    <version>1.10.8</version>
  </parent>
  <artifactId>pint-validation-rules</artifactId>
  <version>1.0.0</version>
  <name>jp-pint-validation-rules</name>
  <description>JP PINT validation rules</description>
  <url>https://github.com/CenPC434/validation</url>
  <inceptionYear>2016</inceptionYear>
  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <build>
    <plugins>
      <plugin>
        <groupId>com.helger.maven</groupId>
        <artifactId>ph-schematron-maven-plugin</artifactId>
        <version>5.2.0</version>
        <executions>
          <execution>
            <id>PINT</id>
            <phase>validate</phase>
            <goals>
              <goal>validate</goal>
            </goals>
            <configuration>
              <xmlDirectory>${basedir}/examples/ntr</xmlDirectory>
              <schematronProcessingEngine>XSLT</schematronProcessingEngine>
              <schematronFile>${basedir}/ubl/xslt/ntr/PINT-UBL-validation-preprocessed.xslt</schematronFile>
            </configuration>
          </execution>
          <execution>
            <id>Japan aligned</id>
            <phase>validate</phase>
            <goals>
              <goal>validate</goal>
            </goals>
            <configuration>
              <xmlDirectory>${basedir}/examples/ntr</xmlDirectory>
              <schematronProcessingEngine>XSLT</schematronProcessingEngine>
              <schematronFile>${basedir}/ubl/xslt/ntr/PINT-jurisdiction-aligned-rules.xslt</schematronFile>
            </configuration>
          </execution>
          <execution>
            <id>Japan aligned ntr</id>
            <phase>validate</phase>
            <goals>
              <goal>validate</goal>
            </goals>
            <configuration>
              <xmlDirectory>${basedir}/examples/ntr</xmlDirectory>
              <schematronProcessingEngine>XSLT</schematronProcessingEngine>
              <schematronFile>${basedir}/ubl/xslt/ntr/PINT-jurisdiction-aligned-revised-rules.xslt</schematronFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

実行コマンドは次です。

$ mvn -f jp-ntr-validate.xml validate

実行ログ
$ mvn -f jp-ntr-validate.xml validate
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< com.helger:pint-validation-rules >------------------
[INFO] Building jp-pint-validation-rules 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- ph-schematron-maven-plugin:5.2.0:validate (PINT) @ pint-validation-rules ---
[INFO] Compiling XSLT instance [file=..省略../xslt/ntr/PINT-UBL-validation-preprocessed.xslt]
[WARNING] ..省略../xslt/ntr/PINT-UBL-validation-preprocessed.xslt [0:0]: Transformation warning - A function that computes atomic values should use xsl:sequence rather than xsl:value-of
[WARNING] ..省略../xslt/ntr/PINT-UBL-validation-preprocessed.xslt [0:0]: Transformation warning - A function that computes atomic values should use xsl:sequence rather than xsl:value-of
[INFO] Successfully parsed Schematron file '..省略../xslt/ntr/PINT-UBL-validation-preprocessed.xslt'
[INFO] Validating XML file '..省略..examples/ntr/Japan-PINT_ntr_Invoice_UBL_Example.xml' against Schematron rules from '..省略../xslt/ntr/PINT-UBL-validation-preprocessed.xslt' expecting success
[INFO] Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader ClassRealm[plugin>com.helger.maven:ph-schematron-maven-plugin:5.2.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@42110406]
[INFO] 
[INFO] --- ph-schematron-maven-plugin:5.2.0:validate (Japan aligned) @ pint-validation-rules ---
[INFO] Compiling XSLT instance [file=..省略../xslt/ntr/PINT-jurisdiction-aligned-rules.xslt]
[WARNING] ..省略../xslt/ntr/PINT-jurisdiction-aligned-rules.xslt [0:0]: Transformation warning - A function that computes atomic values should use xsl:sequence rather than xsl:value-of
[INFO] Successfully parsed Schematron file '..省略../xslt/ntr/PINT-jurisdiction-aligned-rules.xslt'
[INFO] Validating XML file '..省略..examples/ntr/Japan-PINT_ntr_Invoice_UBL_Example.xml' against Schematron rules from '..省略../xslt/ntr/PINT-jurisdiction-aligned-rules.xslt' expecting success
[INFO] 
[INFO] --- ph-schematron-maven-plugin:5.2.0:validate (Japan aligned ntr) @ pint-validation-rules ---
[INFO] Compiling XSLT instance [file=..省略../xslt/ntr/PINT-jurisdiction-aligned-revised-rules.xslt]
[WARNING] ..省略../xslt/ntr/PINT-jurisdiction-aligned-revised-rules.xslt [0:0]: Transformation warning - A function that computes atomic values should use xsl:sequence rather than xsl:value-of
[INFO] Successfully parsed Schematron file '..省略../xslt/ntr/PINT-jurisdiction-aligned-revised-rules.xslt'
[INFO] Validating XML file '..省略..examples/ntr/Japan-PINT_ntr_Invoice_UBL_Example.xml' against Schematron rules from '..省略../xslt/ntr/PINT-jurisdiction-aligned-revised-rules.xslt' expecting success
[ERROR] 1 failed Schematron assertions for XML file '..省略..examples/ntr/Japan-PINT_ntr_Invoice_UBL_Example.xml'
[ERROR] [fatal_error] in /*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:TaxTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1] @ ..省略..examples/ntr/Japan-PINT_ntr_Invoice_UBL_Example.xml [aligned-ibr-jp-07-ntr] Invoice total TAX amount (ibt-110) MUST be 0 (zero). Test=xs:decimal(cbc:taxTotal) = 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.404 s
[INFO] Finished at: 2023-05-23T17:47:17+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.helger.maven:ph-schematron-maven-plugin:5.2.0:validate (Japan aligned ntr) on project pint-validation-rules: 1 failed Schematron assertions for XML file '..省略..examples/ntr/Japan-PINT_ntr_Invoice_UBL_Example.xml' -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
$ 

提供されたスキーマトロンでは、税額が記載されていてもエラーが報告されません。
税額が記載されていたらエラーを報告するようにスキーマトロンファイルを訂正しました。

[ERROR] [fatal_error] in /*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:TaxTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1] @ ..省略..examples/ntr/Japan-PINT_ntr_Invoice_UBL_Example.xml [aligned-ibr-jp-07-ntr] Invoice total TAX amount (ibt-110) MUST be 0 (zero). Test=xs:decimal(cbc:taxTotal) = 0

スキーマトロンの修正点

PINT-jurisdiction-aligned-rules.sch
<rule context="cac:TaxTotal">
    <assert id="aligned-ibr-jp-07-ntr" flag="fatal" test="//cbc:TaxAmount = 0">
    [aligned-ibr-jp-07-ntr]-Invoice total TAX amount in tax accounting currency (ibt-111),
    TAX category tax amount (ibt-117) and TAX category tax amount in accounting currency (ibt-190)
    MUST be 0 (zero).</assert>
</rule>

訂正後のルールは、次としました。

PINT-jurisdiction-aligned-revised-rules.sch
<rule context="cac:TaxTotal">
    <assert id="aligned-ibr-jp-07-ntr" flag="fatal" test="xs:decimal(cbc:taxTotal) = 0">[aligned-ibr-jp-07-ntr] Invoice total TAX amount (ibt-110) MUST be 0 (zero).</assert>
</rule>
<rule context="cac:TaxTotal/cac:TaxSubTotal">
    <assert id="aligned-ibr-jp-08-ntr" flag="fatal" test="xs:decimal(cbc:taxTotal) = 0">[aligned-ibr-jp-08-ntr] TAX category tax amount (ibt-117) MUST be 0 (zero).</assert>
</rule>

ChatGPTに理由を説明してもらいましょう。

User
次のスキーマトロンのテスト処理を説明してください

<rule context="cac:TaxTotal">
    <assert id="aligned-ibr-jp-07-ntr" flag="fatal" test="//cbc:TaxAmount = 0">
    [aligned-ibr-jp-07-ntr]-Invoice total TAX amount in tax accounting currency (ibt-111),
    TAX category tax amount (ibt-117) and TAX category tax amount in accounting currency (ibt-190)
    MUST be 0 (zero).</assert>
</rule>

ChatGPT
このスキーマトロンのテスト処理は、XML文書内の特定の要素に対してテストを行い、指定された条件が満たされているかどうかを確認します。

具体的には、以下の処理が行われます:

rule要素のcontext属性によって、テストが適用される対象の要素が指定されます。この場合、cac:TaxTotalという要素が対象となります。

assert要素には、テストの条件が記述されています。id属性はテストの識別子を表し、flag属性はテストの重要度を示します。この場合、flag=”fatal”に設定されており、テストが失敗した場合には致命的なエラーとして扱われます。

test属性には、テストの条件式が指定されています。この場合、//cbc:TaxAmount = 0というXPath式が使用されています。これは、cbc:TaxAmount要素の値が0であるかどうかをテストします。

assert要素の内容は、テストが失敗した場合に表示されるメッセージです。この場合、”[aligned-ibr-jp-07-ntr]-Invoice total TAX amount in tax accounting currency (ibt-111), TAX category tax amount (ibt-117) and TAX category tax amount in accounting currency (ibt-190) MUST be 0 (zero).”というメッセージが表示されます。

つまり、このテスト処理は、XML文書内のcac:TaxTotal要素に対して、cbc:TaxAmount要素の値が0であることを確認します。もし値が0でない場合、致命的なエラーとして報告されます。

User
次のXMLでこのルールを適用しようとしましたがエラーとなりません。なぜでしょうか。

<cac:TaxTotal>
		<cbc:TaxAmount currencyID="JPY">26000</cbc:TaxAmount> <!-- IBT-110 - Invoice total TAX amount -->
		<cac:TaxSubtotal> <!-- IBG-23 - TAX BREAKDOWN -->
			<cbc:TaxableAmount currencyID="JPY">260000</cbc:TaxableAmount> <!-- IBT-116 - TAX category taxable amount -->
			<cbc:TaxAmount currencyID="JPY">26000</cbc:TaxAmount> <!-- IBT-117 - TAX category tax amount -->
			<cac:TaxCategory>
				<cbc:ID>S</cbc:ID> <!-- IBT-118 - TAX category code -->
				<cbc:Percent>10</cbc:Percent> <!-- IBT-119 - TAX category rate -->
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID> <!-- IBT-118, qualifier -->
				</cac:TaxScheme>
			</cac:TaxCategory>
		</cac:TaxSubtotal>
		<cac:TaxSubtotal> <!-- IBG-23 - TAX BREAKDOWN -->
			<cbc:TaxableAmount currencyID="JPY">3490</cbc:TaxableAmount> <!-- IBT-116 - TAX category taxable amount -->
			<cbc:TaxAmount currencyID="JPY">0</cbc:TaxAmount> <!-- IBT-117 - TAX category tax amount -->
			<cac:TaxCategory>
				<cbc:ID>E</cbc:ID> <!-- IBT-118 - TAX category code -->
				<cbc:Percent>0</cbc:Percent> <!-- IBT-119 - TAX category rate -->
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID> <!-- IBT-118, qualifier -->
				</cac:TaxScheme>
			</cac:TaxCategory>
		</cac:TaxSubtotal>
	</cac:TaxTotal>

ChatGPT
与えられたXMLでは、cbc:TaxAmount要素の値が0の場合が存在します。スキーマトロンで指定された条件は、//cbc:TaxAmount = 0というものです。この条件はXML文書内の任意の場所でcbc:TaxAmountが0であることをテストします。

しかしながら、与えられたXMLでは、cbc:TaxAmount要素の値が0の場合が存在するため、エラーとならずにテストが合格となる可能性があります。スキーマトロンはテストが失敗した場合にエラーとして報告されます。

もし、このXMLでエラーとなるべきである場合、可能性としては以下の点が考えられます:

XML内の名前空間 (cac:および cbc:) がスキーマトロンで期待されるものと一致していない。
スキーマトロンには他の条件や制約が含まれており、それらの条件も満たされている場合にのみエラーとなる。
スキーマトロン自体にバグや誤りがある。
これらの可能性を確認してみてください。また、スキーマトロンが適切に実行されていることや、スキーマトロンとXMLのマッピングが正確であることを再確認することも重要です。

修正項目

`//cbc:TaxAmount = 0`という条件では、`cbc:TaxAmount = 0`を満足する要素があると true が返され、エラーとならないので、それぞれの条件に対応して、ルールを定義しました。

  • `<rule>`を条件ごとに分割し、cbc:TaxAmountの親要素を条件として指定した。

  • `//cbc:TaxAmount = 0`でなく、条件指定で選択された要素の子要素 cbc:taxAmount の値を数値として判定するように条件を変更し次の定義とた。

test=”xs:decimal(cbc:taxTotal) = 0″

ibt-110 Invoice total TAX amount
<rule context="cac:TaxTotal">
    <assert id="aligned-ibr-jp-07-ntr" flag="fatal" test="xs:decimal(cbc:taxAmount) = 0">[aligned-ibr-jp-07-ntr] Invoice total TAX amount (ibt-110) MUST be 0 (zero).</assert>
</rule>
ibt-117 TAX category tax amount
<rule context="cac:TaxTotal/cac:TaxSubTotal">
    <assert id="aligned-ibr-jp-08-ntr" flag="fatal" test="xs:decimal(cbc:taxAmount) = 0">[aligned-ibr-jp-08-ntr] TAX category tax amount (ibt-117) MUST be 0 (zero).</assert>
</rule>

この修正でエラーが報告されるようになりました。

あるいは、すべての cbc:TaxAmountが 0 でなければならない。

公開にあたっては、複数の条件を検討して正常ケースと不正ケースそれぞれテストした上で、サンプルも併せて提供いただけると助かるのですが。

サンプルインボイス

Japan-PINT_ntr_Invoice_UBL_Example.xml
<?xml version="1.0" encoding="UTF-8"?>
<Invoice 
	xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" 
	xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" 
	xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" 
	xmlns:ccts="urn:un:unece:uncefact:documentation:2" 
	xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" 
	xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" 
	xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 https://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/UBL-Invoice-2.1.xsd">

	<!--<cbc:UBLVersionID>2.1</cbc:UBLVersionID>-->
	<cbc:CustomizationID>urn:peppol:pint:nontaxinvoice-1@jp-1</cbc:CustomizationID> 	<!-- IBT-024 - Specification identifier -->
	<cbc:ProfileID>urn:peppol:bis:billing</cbc:ProfileID> <!-- IBT-023 - Business process type -->
	<cbc:ID>156</cbc:ID> <!-- IBT-001 - Invoice number -->
	<cbc:IssueDate>2023-10-24</cbc:IssueDate> <!-- IBT-002 - Invoice issue date -->
	<!-- cbc:IssueTime, IBT-168 - Invoice issue time -->
	<cbc:DueDate>2023-11-20</cbc:DueDate> <!-- IBT-009 - Payment due date -->
	<cbc:InvoiceTypeCode>480</cbc:InvoiceTypeCode> <!-- IBT-003 - Invoice type code -->
	<cbc:Note>Ordered at trade show</cbc:Note> <!-- IBT-022 - Invoice note -->
	<!-- cbc:TaxPointDate, IBT-007 - TAX point date -->
	<cbc:DocumentCurrencyCode>JPY</cbc:DocumentCurrencyCode> <!-- IBT-005 - Invoice currency code -->
	<!-- cbc:TaxCurrencyCode, IBT-006 - Tax accounting currency -->
	<cbc:AccountingCost>4217:2323:2323</cbc:AccountingCost> <!-- IBT-019 - Buyer accounting reference -->
	<cbc:BuyerReference>0150abc</cbc:BuyerReference> <!-- IBT-010 - Buyer reference -->
	<cac:InvoicePeriod> <!-- IBG-14 - INVOICING PERIOD -->
		<cbc:StartDate>2023-10-18</cbc:StartDate> <!-- IBT-073 - Invoicing period start date -->
		<cbc:EndDate>2023-10-18</cbc:EndDate> <!-- IBT-074 - Invoicing period end date -->
		<!-- cbc:DescriptionCode, IBT-008 - TAX point date code -->
	</cac:InvoicePeriod>
	<cac:OrderReference>
		<cbc:ID>O-998877</cbc:ID> <!-- IBT-013 - Purchase order reference -->
		<cbc:SalesOrderID>SO-12343</cbc:SalesOrderID> <!-- IBT-014 - Sales order reference -->
	</cac:OrderReference>
	<cac:BillingReference> <!-- IBG-03 - PRECEDING INVOICE REFERENCE -->
		<cac:InvoiceDocumentReference>
			<cbc:ID>123</cbc:ID> <!-- IBT-025 - Preceding Invoice reference -->
			<cbc:IssueDate>2023-10-20</cbc:IssueDate> <!-- IBT-026 - Preceding Invoice issue date -->
		</cac:InvoiceDocumentReference>
	</cac:BillingReference>
	<cac:DespatchDocumentReference>
		<cbc:ID>despadv-3</cbc:ID> <!-- IBT-016 - Despatch advice reference -->
	</cac:DespatchDocumentReference>
	<cac:ReceiptDocumentReference>
		<cbc:ID>resadv-1</cbc:ID>  <!-- IBT-015 - Receiving advice reference -->
	</cac:ReceiptDocumentReference>
	<cac:OriginatorDocumentReference>
		<cbc:ID>ppid-123</cbc:ID>  <!-- IBT-017 - Tender or lot reference -->
	</cac:OriginatorDocumentReference>
	<cac:ContractDocumentReference>
		<cbc:ID>framework no 1</cbc:ID> <!-- IBT-012 - Contract reference -->
	</cac:ContractDocumentReference>
	<cac:AdditionalDocumentReference> 
		<cbc:ID schemeID="ABT">DR35141</cbc:ID> <!-- IBT-018 - Invoiced object identifier, IBT-018-1 - The identification scheme identifier of the Invoiced object identifier -->
		<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode> <!-- IBT-018 qualifier -->
	</cac:AdditionalDocumentReference>
	<cac:AdditionalDocumentReference>
		<cbc:ID>doc1</cbc:ID>  <!-- IBT-122 - Supporting document reference -->
		<cbc:DocumentDescription>Usage summary</cbc:DocumentDescription> <!-- IBT-123 - Supporting document description -->
		<cac:Attachment>
			<cbc:EmbeddedDocumentBinaryObject filename="report.csv" mimeCode="text/csv">aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXMvcG9hY2MvYmlsbGluZy8zLjAvYmlzLw==</cbc:EmbeddedDocumentBinaryObject> 
			<!-- IBT-125 - Attached document, IBT-125-1 - Attached document Mime code, IBT-125-2 - Attached document Filename -->
			<cac:ExternalReference>
				<cbc:URI>http://www.salescompany.com/summary001.html</cbc:URI> <!-- IBT-124 - External document location -->
			</cac:ExternalReference>
		</cac:Attachment>
	</cac:AdditionalDocumentReference>	
	<cac:AdditionalDocumentReference>
		<cbc:ID>doc2</cbc:ID> <!-- IBT-122 - Supporting document reference -->
		<cbc:DocumentDescription>Usage breakdown</cbc:DocumentDescription> <!-- IBT-123 - Supporting document description -->
		<cac:Attachment>
			<cac:ExternalReference>
				<cbc:URI>http://www.salescompany.com/breakdown001.html</cbc:URI> <!-- IBT-124 - External document location -->
			</cac:ExternalReference>
		</cac:Attachment>
	</cac:AdditionalDocumentReference>
	<cac:ProjectReference>
		<cbc:ID>project333</cbc:ID> <!-- IBT-011 - Project reference -->
	</cac:ProjectReference>
	<cac:AccountingSupplierParty> <!-- IBG-04 - SELLER -->
		<cac:Party>
			<cbc:EndpointID schemeID="0188">1234567890123</cbc:EndpointID> <!-- IBT-034 - Seller electronic address, IBT-034-1 - Scheme identifier -->
			<cac:PartyIdentification>
				<cbc:ID schemeID="0147">123456:000123:0147:1</cbc:ID> <!-- IBT-029 Seller identifier, IBT-029-1 Scheme identifier -->
			</cac:PartyIdentification>
			<cac:PartyName>
				<cbc:Name>株式会社 〇〇商事</cbc:Name> <!-- IBT-028 - Seller trading name -->
			</cac:PartyName>
			<cac:PostalAddress> <!-- IBG-05 - SELLER POSTAL ADDRESS -->
				<cbc:StreetName>四谷4-29-X</cbc:StreetName> <!-- IBT-035 - Seller address line 1 -->
				<cbc:AdditionalStreetName>〇〇商事ビル</cbc:AdditionalStreetName> <!-- IBT-036 - Seller address line 2 -->
				<cbc:CityName>新宿区</cbc:CityName> <!-- IBT-037 - Seller city -->
				<cbc:PostalZone>1600044</cbc:PostalZone> <!-- IBT-038 - Seller post code -->
				<cbc:CountrySubentity>東京都</cbc:CountrySubentity> <!-- IBT-039 - Seller country subdivision -->
				<cac:AddressLine> 
					<cbc:Line>Third address line</cbc:Line> <!-- IBT-162 - Seller address line 3 -->
				</cac:AddressLine>
				<cac:Country>
					<cbc:IdentificationCode>JP</cbc:IdentificationCode> <!-- IBT-040 - Seller country code -->
				</cac:Country>
			</cac:PostalAddress>
			<!--<cac:PartyTaxScheme>
				<cbc:CompanyID>T1234567890123</cbc:CompanyID> <!-\- IBT-031 - Seller TAX identifier -\->
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID> <!-\- IBT-031, qualifier -\->
				</cac:TaxScheme>
			</cac:PartyTaxScheme>-->
			<cac:PartyLegalEntity>
				<cbc:RegistrationName>株式会社 〇〇商事</cbc:RegistrationName> <!-- IBT-027 - Seller name -->
				<cbc:CompanyID schemeID="0188">1234567890123</cbc:CompanyID> <!-- IBT-030 - Seller legal registration identifier, IBT-030-1 - Scheme identifier -->
				<cbc:CompanyLegalForm>Private Limited Company</cbc:CompanyLegalForm> <!-- IBT-033 - Seller additional legal information -->
			</cac:PartyLegalEntity>
			<cac:Contact> <!-- IBG-06 - SELLER CONTACT -->
				<cbc:Name>青木 志郎</cbc:Name> <!-- IBT-041 - Seller contact point -->
				<cbc:Telephone>03-3xxx-0001</cbc:Telephone> <!-- IBT-042 - Seller contact telephone number -->
				<cbc:ElectronicMail>shirou_aoki@〇〇co.jp</cbc:ElectronicMail> <!-- IBT-043 - Seller contact email address -->
			</cac:Contact>
		</cac:Party>
	</cac:AccountingSupplierParty>
	<cac:AccountingCustomerParty> <!-- IBG-07 - BUYER -->
		<cac:Party>
			<cbc:EndpointID schemeID="0188">3210987654321</cbc:EndpointID> <!-- IBT-049 - Buyer electronic address, IBT-049-1 - Scheme identifier -->
			<cac:PartyIdentification>
				<cbc:ID schemeID="0147">654321:000321:0147:1</cbc:ID> <!-- IBT-046 - Buyer identifier, IBT-046-1 - Scheme identifier -->
			</cac:PartyIdentification>
			<cac:PartyName>
				<cbc:Name>株式会社 〇〇物産</cbc:Name> <!-- IBT-045 - Buyer trading name -->
			</cac:PartyName>
			<cac:PostalAddress> <!-- IBG-08 - BUYER POSTAL ADDRESS -->
				<cbc:StreetName>北区</cbc:StreetName> <!-- IBT-050 - Buyer address line 1 -->
				<cbc:AdditionalStreetName>北十二条西76-X</cbc:AdditionalStreetName> <!-- IBT-051 - Buyer address line 2 -->
				<cbc:CityName>札幌市</cbc:CityName> <!-- IBT-052 - Buyer city	 -->
				<cbc:PostalZone>0010012</cbc:PostalZone> <!-- IBT-053 - Buyer post code -->
				<cbc:CountrySubentity>北海道</cbc:CountrySubentity> <!-- IBT-054 - Buyer country subdivision -->
				<cac:AddressLine>
					<cbc:Line>Third line</cbc:Line> <!-- IBT-163 - Buyer address line 3 -->
				</cac:AddressLine>
				<cac:Country>
					<cbc:IdentificationCode>JP</cbc:IdentificationCode> <!-- IBT-055 - Buyer country code -->
				</cac:Country>
			</cac:PostalAddress>
			<cac:PartyTaxScheme>
            	<cbc:CompanyID>>T3210987654321</cbc:CompanyID> <!-- IBT-048 - Buyer TAX identifier -->
            	<cac:TaxScheme>
                	<cbc:ID>VAT</cbc:ID> <!-- IBT-048, qualifier --> 
            	</cac:TaxScheme>
        	</cac:PartyTaxScheme>
			<cac:PartyLegalEntity>
				<cbc:RegistrationName>株式会社 〇〇物産</cbc:RegistrationName> <!-- IBT-044 - Buyer name -->
				<cbc:CompanyID schemeID="0147">654321:000321:0147:1</cbc:CompanyID> <!-- IBT-047 - Buyer legal registration identifier, IBT-047-1 - Scheme identifier -->
			</cac:PartyLegalEntity>
			<cac:Contact> <!-- IBG-09 - BUYER CONTACT -->
				<cbc:Name>株式会社 〇〇物産</cbc:Name> <!-- IBT-056 - Buyer contact point -->
				<cbc:Telephone>011-757-1xxx</cbc:Telephone> <!-- IBT-057 - Buyer contact telephone number -->
				<cbc:ElectronicMail>purchaser@oobussan.co.jp</cbc:ElectronicMail> <!-- IBT-058 - Buyer contact email address -->
			</cac:Contact>
		</cac:Party>
	</cac:AccountingCustomerParty>
	<cac:PayeeParty> <!-- IBG-10 - PAYEE -->
		<cac:PartyIdentification>
			<cbc:ID schemeID="0147">123456:000124:0147:1</cbc:ID> <!-- IBT-060 - Payee identifier, IBT-060-1 - Scheme identifier, must not be same as ibt-029 -->
		</cac:PartyIdentification>
		<cac:PartyName>
			<cbc:Name>Payee party</cbc:Name> <!-- IBT-059 - Payee name, must not be same as ibt-028 -->
		</cac:PartyName>
		<cac:PartyLegalEntity>
        	<cbc:CompanyID schemeID="0147">123456:000124:0147:1</cbc:CompanyID> <!-- IBT-061 - Payee legal registration identifier, IBT-061-1 - Scheme identifier -->
    	</cac:PartyLegalEntity>
	</cac:PayeeParty>
	<cac:TaxRepresentativeParty> <!-- IBG-11 - SELLER TAX REPRESENTATIVE PARTY -->
    	<cac:PartyName>
        	<cbc:Name>TaxRepresentative Name</cbc:Name> <!-- IBT-062 - Seller tax representative name -->
    	</cac:PartyName>
    	<cac:PostalAddress> <!-- IBG-12 - SELLER TAX REPRESENTATIVE POSTAL ADDRESS -->
        	<cbc:StreetName>四谷4-32-X</cbc:StreetName> <!-- IBT-064 - Tax representative address line 1 -->
        	<cbc:AdditionalStreetName>〇〇商事ビル</cbc:AdditionalStreetName> <!-- IBT-065 - Tax representative address line 2 -->
        	<cbc:CityName>新宿区</cbc:CityName> <!-- IBT-066 - Tax representative city -->
        	<cbc:PostalZone>1600044</cbc:PostalZone> <!-- IBT-067 - Tax representative post code -->
        	<cbc:CountrySubentity>東京都</cbc:CountrySubentity> <!-- IBT-068 - Tax representative country subdivision -->
        	<cac:AddressLine>
            	<cbc:Line>Third line</cbc:Line> <!-- IBT-164 - Tax representative address line 3 -->
        	</cac:AddressLine>
        	<cac:Country>
            	<cbc:IdentificationCode>JP</cbc:IdentificationCode> <!-- IBT-069 - Tax representative country code -->
        	</cac:Country>
    	</cac:PostalAddress>
    	<cac:PartyTaxScheme>
        	<cbc:CompanyID>T7654321098765</cbc:CompanyID> <!-- IBT-063 - Seller tax representative TAX identifier --> 
        	<cac:TaxScheme>
            	<cbc:ID>VAT</cbc:ID> <!-- IBT-063, qualifier -->
        	</cac:TaxScheme>
    	</cac:PartyTaxScheme>
	</cac:TaxRepresentativeParty>
	<cac:Delivery> <!-- IBG-13 - DELIVERY INFORMATION -->
		<cbc:ActualDeliveryDate>2023-10-18</cbc:ActualDeliveryDate> <!-- IBT-072 - Actual delivery date -->		
		<cac:DeliveryLocation>
			<cbc:ID schemeID="0147">123456:000123:0147:1</cbc:ID> <!-- IBT-071 - Deliver to location identifier, IBT-071-1 - Scheme identifier -->
			<cac:Address> <!-- IBG-15 - DELIVER TO ADDRESS -->
				<cbc:StreetName>北区</cbc:StreetName> <!-- IBT-075 - Deliver to address line 1 -->
				<cbc:AdditionalStreetName>北十二条西76-X</cbc:AdditionalStreetName> <!-- IBT-076 - Deliver to address line 2 -->
				<cbc:CityName>札幌市</cbc:CityName> <!-- IBT-077 - Deliver to city -->
				<cbc:PostalZone>0010012</cbc:PostalZone> <!-- IBT-078 - Deliver to post code -->
				<cbc:CountrySubentity>北海道</cbc:CountrySubentity> <!-- IBT-079 - Deliver to country subdivision -->
				<cac:AddressLine>
					<cbc:Line>Gate 15</cbc:Line> <!-- IBT-165 - Deliver to address line 3 -->
				</cac:AddressLine>
				<cac:Country>
					<cbc:IdentificationCode>JP</cbc:IdentificationCode> <!-- IBT-080 - Deliver to country code -->
				</cac:Country>
			</cac:Address>
		</cac:DeliveryLocation>
		<cac:DeliveryParty>
			<cac:PartyName>
				<cbc:Name>株式会社 〇〇物産 札幌支社</cbc:Name> <!-- IBT-070 - Deliver to party name -->
			</cac:PartyName>
		</cac:DeliveryParty>
	</cac:Delivery>
	<cac:PaymentMeans> <!-- IBG-16 - PAYMENT INSTRUCTIONS -->
		<!-- cbc:ID, IBT-178 - Payment Instructions ID -->
	   	<cbc:PaymentMeansCode name="Credit transfer">30</cbc:PaymentMeansCode> <!-- IBT-081 - Payment means type code, IBT-082 - Payment means text -->
	   	<!-- cbc:PaymentID, IBT-083 - Remittance information -->
		<!-- cac:CardAccount, IBG-18 - PAYMENT CARD INFORMATION -->
		<cac:PayeeFinancialAccount> <!-- IBG-17 - CREDIT TRANSFER -->
        	<cbc:ID>1234:567:1:3242394</cbc:ID> <!-- IBT-084 - Payment account identifier, IBT-084-1 - Scheme identifier -->
        	<cbc:Name>カ)マルマルシヨウジ</cbc:Name> <!-- IBT-085 - Payment account name -->
			<!-- cac:FinancialInstitutionBranch, cbc:ID, IBT-086 - Payment service provider identifier -->
			<!-- cac:FinancialInstitutionBranch, cac:PostalAddress, IBG-34 - FINANCIAL INSTITUTION ADDRESS -->
		</cac:PayeeFinancialAccount>
		<!-- cac:PaymentMandate, IBG-19 - DIRECT DEBIT -->
	</cac:PaymentMeans> 
	<cac:PaymentTerms> <!-- IBG-33 - INVOICE TERMS -->
		<!-- cbc:PaymentMeansID, IBT-187 - Terms payment instructions ID -->
		<cbc:Note>月末締め翌月20日払い, 銀行手数料振込人負担</cbc:Note> <!-- IBT-020 - Payment terms -->
		<!-- cbc:Amount, IBT-176 - Terms amount-->
		<!-- cbc:InstallmentDueDate, IBT-177 - Terms installment due date -->
	</cac:PaymentTerms>
	<!-- cac:PrepaidPayment, IBG-35 - Paid amounts -->
	<cac:AllowanceCharge> <!-- IBG-20 - DOCUMENT LEVEL ALLOWANCES -->
    	<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
    	<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode> <!-- IBT-098 - Document level allowance reason code -->
    	<cbc:AllowanceChargeReason>値引</cbc:AllowanceChargeReason> <!-- IBT-097 - Document level allowance reason -->
		<!-- cbc:MultiplierFactorNumeric, IBT-094 - Document level allowance percentage -->
    	<cbc:Amount currencyID="JPY">179</cbc:Amount> <!-- IBT-092 - Document level allowance amount -->
		<!-- cbc:BaseAmount, IBT-093 - Document level allowance base amount -->
    	<cac:TaxCategory>
        	<cbc:ID>S</cbc:ID> <!-- IBT-095 - Document level allowance TAX category code -->
        	<cbc:Percent>10</cbc:Percent> <!-- IBT-096 - Document level allowance TAX rate -->
        	<cac:TaxScheme>
            	<cbc:ID>VAT</cbc:ID> <!-- IBT-095, qualifier -->
        	</cac:TaxScheme>
    	</cac:TaxCategory>
	</cac:AllowanceCharge>
	<cac:AllowanceCharge> <!-- IBG-21 - DOCUMENT LEVEL CHARGES -->
    	<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
    	<cbc:AllowanceChargeReasonCode>FC</cbc:AllowanceChargeReasonCode> <!-- IBT-105 - Document level charge reason code -->
    	<cbc:AllowanceChargeReason>配送サービス</cbc:AllowanceChargeReason> <!-- IBT-104 - Document level charge reason -->
    	<!-- cbc:MultiplierFactorNumeric, IBT-101 - Document level charge percentage -->
    	<cbc:Amount currencyID="JPY">7679</cbc:Amount> <!-- IBT-099 - Document level charge amount -->  
    	<!-- cbc:BaseAmount, IBT-100 - Document level charge base amount -->
    	<cac:TaxCategory>
        	<cbc:ID>S</cbc:ID> <!-- IBT-102 - Document level charge TAX category code -->
        	<cbc:Percent>10</cbc:Percent> <!-- IBT-103 - Document level charge TAX rate -->
        	<cac:TaxScheme>
            	<cbc:ID>VAT</cbc:ID> <!-- IBT-102, qualifier -->
        	</cac:TaxScheme>
    	</cac:TaxCategory>
	</cac:AllowanceCharge>
	<cac:TaxTotal>
		<cbc:TaxAmount currencyID="JPY">26000</cbc:TaxAmount> <!-- IBT-110 - Invoice total TAX amount -->
		<cac:TaxSubtotal> <!-- IBG-23 - TAX BREAKDOWN -->
			<cbc:TaxableAmount currencyID="JPY">260000</cbc:TaxableAmount> <!-- IBT-116 - TAX category taxable amount -->
			<cbc:TaxAmount currencyID="JPY">26000</cbc:TaxAmount> <!-- IBT-117 - TAX category tax amount -->
			<cac:TaxCategory>
				<cbc:ID>S</cbc:ID> <!-- IBT-118 - TAX category code -->
				<cbc:Percent>10</cbc:Percent> <!-- IBT-119 - TAX category rate -->
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID> <!-- IBT-118, qualifier -->
				</cac:TaxScheme>
			</cac:TaxCategory>
		</cac:TaxSubtotal>
		<cac:TaxSubtotal> <!-- IBG-23 - TAX BREAKDOWN -->
			<cbc:TaxableAmount currencyID="JPY">3490</cbc:TaxableAmount> <!-- IBT-116 - TAX category taxable amount -->
			<cbc:TaxAmount currencyID="JPY">0</cbc:TaxAmount> <!-- IBT-117 - TAX category tax amount -->
			<cac:TaxCategory>
				<cbc:ID>E</cbc:ID> <!-- IBT-118 - TAX category code -->
				<cbc:Percent>0</cbc:Percent> <!-- IBT-119 - TAX category rate -->
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID> <!-- IBT-118, qualifier -->
				</cac:TaxScheme>
			</cac:TaxCategory>
		</cac:TaxSubtotal>
	</cac:TaxTotal>
	<cac:LegalMonetaryTotal> <!-- IBG-22 - DOCUMENT TOTALS -->
		<cbc:LineExtensionAmount currencyID="JPY">255990</cbc:LineExtensionAmount> <!-- IBT-106 - Sum of Invoice line net amount -->
		<cbc:TaxExclusiveAmount currencyID="JPY">263490</cbc:TaxExclusiveAmount> <!-- IBT-109 - Invoice total amount without TAX -->
		<cbc:TaxInclusiveAmount currencyID="JPY">289490</cbc:TaxInclusiveAmount> <!-- IBT-112 - Invoice total amount with TAX -->
		<cbc:AllowanceTotalAmount currencyID="JPY">179</cbc:AllowanceTotalAmount> <!-- IBT-107 - Sum of allowances on document level -->
		<cbc:ChargeTotalAmount currencyID="JPY">7679</cbc:ChargeTotalAmount> <!-- IBT-108 - Sum of charges on document level -->
		<cbc:PrepaidAmount currencyID="JPY">0</cbc:PrepaidAmount> <!-- IBT-113 - Paid amount -->
		<cbc:PayableRoundingAmount currencyID="JPY">0</cbc:PayableRoundingAmount> <!-- IBT-114 - Rounding amount -->
		<cbc:PayableAmount currencyID="JPY">289490</cbc:PayableAmount> <!-- IBT-115 - Amount due for payment -->
	</cac:LegalMonetaryTotal>
	<cac:InvoiceLine> <!-- IBG-25 - INVOICE LINE -->
		<cbc:ID>1</cbc:ID> <!-- IBT-126 - Invoice line identifier -->
		<cbc:Note>The equipment has 3 year warranty.</cbc:Note> <!-- IBT-127 - Invoice line note -->
		<cbc:InvoicedQuantity unitCode="H87">5</cbc:InvoicedQuantity> <!-- IBT-129 - Invoiced quantity, IBT-130 - Invoiced quantity unit of measure code -->
		<cbc:LineExtensionAmount currencyID="JPY">250000</cbc:LineExtensionAmount> <!-- IBT-131 - Invoice line net amount -->
		<cbc:AccountingCost>Cost id 654</cbc:AccountingCost> <!-- IBT-133 - Invoice line Buyer accounting reference -->
		<cac:InvoicePeriod> <!-- IBG-26 - INVOICE LINE PERIOD -->
			<cbc:StartDate>2023-10-18</cbc:StartDate> <!-- IBT-134 - Invoice line period start date -->
			<cbc:EndDate>2023-10-18</cbc:EndDate> <!-- IBT-135 - Invoice line period end date -->
		</cac:InvoicePeriod>
		<cac:OrderLineReference>
			<cbc:LineID>1</cbc:LineID> <!-- IBT-132 - Referenced purchase order line reference -->
			<cac:OrderReference>
				<cbc:ID>1</cbc:ID> <!-- IBT-183 - Purchase order reference -->
			</cac:OrderReference>
		</cac:OrderLineReference>
		<cac:DespatchLineReference>
    		<cbc:LineID>010</cbc:LineID>
    		<cac:DocumentReference>
        		<cbc:ID>789</cbc:ID> <!-- IBT-184 - Despatch advice reference -->
    		</cac:DocumentReference>
		</cac:DespatchLineReference>
		<cac:DocumentReference> <!-- IBG-36 - LINE DOCUMENT REFERENCE -->
			<cbc:ID>D001-1</cbc:ID> <!-- IBT-188 - Invoice line document identifier -->
			<!-- cbc:DocumentTypeCode, IBT-189 - Document type code -->
		</cac:DocumentReference>
		<cac:DocumentReference>
			<cbc:ID schemeID="ABZ">AB-123</cbc:ID> <!-- IBT-128 - Invoice line object identifier, IBT-128-1 - Scheme identifier -->
			<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode> <!-- IBT-128, qualifier -->
		</cac:DocumentReference>
		<cac:AllowanceCharge> <!-- IBG-27 - INVOICE LINE ALLOWANCES -->
    		<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
    		<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode> <!-- IBT-140 - Invoice line allowance reason code -->
    		<cbc:AllowanceChargeReason>値引</cbc:AllowanceChargeReason> <!-- IBT-139 - Invoice line allowance reason -->
			<!-- cbc:MultiplierFactorNumeric, IBT-138 - Invoice line allowance percentage -->
    		<cbc:Amount currencyID="JPY">1500</cbc:Amount> <!-- IBT-136 - Invoice line allowance amount -->
			<!-- cbc:BaseAmount, IBT-137 - Invoice line allowance base amount -->
		</cac:AllowanceCharge>
		<cac:AllowanceCharge> <!-- IBG-28 - INVOICE LINE CHARGES -->
        	<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
        	<cbc:AllowanceChargeReasonCode>CG</cbc:AllowanceChargeReasonCode> <!-- IBT-145 - Invoice line charge reason code -->
        	<cbc:AllowanceChargeReason>クリーニング</cbc:AllowanceChargeReason> <!-- IBT-144 - Invoice line charge reason -->
        	<!-- cbc:MultiplierFactorNumeric, IBT-143 - Invoice line charge percentage -->
        	<cbc:Amount currencyID="JPY">1500</cbc:Amount> <!-- IBT-141 - Invoice line charge amount -->
        	<!-- cbc:BaseAmount, IBT-142 - Invoice line charge base amount-->
    	</cac:AllowanceCharge>
		<cac:Item> <!-- IBG-31 - ITEM INFORMATION -->
			<!-- cbc:Description, IBT-154 - Item description -->
			<cbc:Name>デスクチェア</cbc:Name> <!-- IBT-153 - Item name -->
			<cac:BuyersItemIdentification>
    			<cbc:ID>b-13214</cbc:ID> <!-- IBT-156 - Item Buyer's identifier -->
			</cac:BuyersItemIdentification>
			<cac:SellersItemIdentification>
    			<cbc:ID>97iugug876</cbc:ID> <!-- IBT-155 - Item Seller's identifier -->
			</cac:SellersItemIdentification>
			<cac:StandardItemIdentification>
    			<cbc:ID schemeID="0160">4503994155481</cbc:ID> <!-- IBT-157 - Item standard identifier --> 
			</cac:StandardItemIdentification>
			<cac:OriginCountry>
				<cbc:IdentificationCode>JP</cbc:IdentificationCode> <!-- IBT-159 - Item country of origin -->
			</cac:OriginCountry>
			<cac:CommodityClassification>
    			<cbc:ItemClassificationCode listID="TST" listVersionID="19.05.01">86776</cbc:ItemClassificationCode>
				<!-- IBT-158 - Item classification identifier, IBT-158-1 - Scheme identifier, IBT-158-2 - Scheme version identifier -->
			</cac:CommodityClassification>
			<cac:ClassifiedTaxCategory> <!-- IBG-30 - LINE TAX INFORMATION -->
				<cbc:ID>S</cbc:ID> <!-- IBT-151 - Invoiced item TAX category code -->
				<cbc:Percent>10</cbc:Percent> <!-- IBT-152 - Invoiced item TAX rate -->
				<!-- cbc:PerUnitAmount, IBT-166 - Unit TAX -->
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID> <!-- IBT-167 - Tax Scheme --> 
				</cac:TaxScheme>
			</cac:ClassifiedTaxCategory>
			<cac:AdditionalItemProperty> <!-- IBG-32 - ITEM ATTRIBUTES -->
				<cbc:Name>表示単位名称</cbc:Name> <!-- IBT-160 - Item attribute name -->
				<cbc:Value>脚</cbc:Value> <!-- IBT-161 - Item attribute value -->
			</cac:AdditionalItemProperty>
		</cac:Item>
		<cac:Price> <!-- IBG-29 - PRICE DETAILS -->
			<cbc:PriceAmount currencyID="JPY">50000</cbc:PriceAmount> <!-- IBT-146 - Item net price -->
			<cbc:BaseQuantity unitCode="H87">1</cbc:BaseQuantity> <!-- IBT-149 - Item price base quantity, IBT-150 - Item price base quantity unit of measure code -->
		</cac:Price>
	</cac:InvoiceLine>
	<cac:InvoiceLine> <!-- IBG-25 - INVOICE LINE -->
		<cbc:ID>2</cbc:ID> <!-- IBT-126 - Invoice line identifier -->
		<!-- cbc:Note, IBT-127 - Invoice line note -->
		<cbc:InvoicedQuantity unitCode="H87">5</cbc:InvoicedQuantity> <!-- IBT-130 - Invoiced quantity unit of measure code, IBT-129 - Invoiced quantity -->
		<cbc:LineExtensionAmount currencyID="JPY">2500</cbc:LineExtensionAmount> <!-- IBT-131 - Invoice line net amount -->
		<!-- cbc:AccountingCost, IBT-133 - Invoice line Buyer accounting reference -->
		<cac:InvoicePeriod> <!-- IBG-26 - INVOICE LINE PERIOD -->
			<cbc:StartDate>2023-10-18</cbc:StartDate> <!-- IBT-134 - Invoice line period start date -->
			<cbc:EndDate>2023-10-18</cbc:EndDate> <!-- IBT-135 - Invoice line period end date -->
		</cac:InvoicePeriod>
		<cac:DocumentReference> <!-- IBG-36 - LINE DOCUMENT REFERENCE -->
        	<cbc:ID>D001-2</cbc:ID> <!-- IBT-188 - Invoice line document identifier -->  
			<!-- cbc:DocumentTypeCode, IBT-189 - Document type code -->
		</cac:DocumentReference>
		<cac:Item> <!-- IBG-31 - ITEM INFORMATION -->
			<!-- cbc:Description, IBT-154 - Item description -->
			<cbc:Name>コピー用紙(A4)</cbc:Name> <!-- IBT-153 - Item name -->
			<!-- cac:BuyersItemIdentification, cbc:ID, IBT-156 - Item Buyer's identifier -->
			<cac:SellersItemIdentification>
				<cbc:ID>Item3</cbc:ID> <!-- IBT-155 - Item Seller's identifier -->
			</cac:SellersItemIdentification>
			<cac:StandardItemIdentification>
				<cbc:ID schemeID="0160">1234567890121</cbc:ID> <!-- IBT-157 - Item standard identifier, IBT-157-1 Scheme identifier -->
			</cac:StandardItemIdentification>
			<!-- cac:OriginCountry, cbc:IdentificationCode, IBT-159 - Item country of origin -->
			<cac:CommodityClassification>
				<cbc:ItemClassificationCode listID="MP">43211503</cbc:ItemClassificationCode> <!-- IBT-158 - Item classification identifier, IBT-158-1 - Scheme identifier -->
			</cac:CommodityClassification>
			<cac:ClassifiedTaxCategory> <!-- IBG-30 - LINE TAX INFORMATION -->
				<cbc:ID>S</cbc:ID> <!-- IBT-151 - Invoiced item TAX category code -->
				<cbc:Percent>10</cbc:Percent> <!-- IBT-152 - Invoiced item TAX rate -->
				<!-- cbc:PerUnitAmount, IBT-166 - Unit TAX -->
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID> <!-- IBT-167 - Tax Scheme -->
				</cac:TaxScheme>
			</cac:ClassifiedTaxCategory> <!-- IBG-32 - ITEM ATTRIBUTES -->
			<cac:AdditionalItemProperty>
				<cbc:Name>表示単位名称</cbc:Name> <!-- IBT-160 - Item attribute name -->
				<cbc:Value>冊</cbc:Value> <!-- IBT-161 - Item attribute value -->
			</cac:AdditionalItemProperty>
		</cac:Item>
		<cac:Price> <!-- IBG-29 - PRICE DETAILS -->
			<cbc:PriceAmount currencyID="JPY">500</cbc:PriceAmount> <!-- IBT-146 - Item net price -->
			<cbc:BaseQuantity unitCode="H87">1</cbc:BaseQuantity> <!-- IBT-149 - Item price base quantity, IBT-150 - Item price base quantity unit of measure code -->
			<cac:AllowanceCharge>
        		<cbc:ChargeIndicator>false</cbc:ChargeIndicator> <!-- Mandatory element. Value must be “false”. -->
        		<cbc:Amount currencyID="JPY">100</cbc:Amount> <!-- IBT-147 - Item price discount --> 
        		<cbc:BaseAmount currencyID="JPY">600</cbc:BaseAmount> <!-- IBT-148 - Item gross price -->
    		</cac:AllowanceCharge>
		</cac:Price>
	</cac:InvoiceLine>
		<cac:InvoiceLine> <!-- IBG-25 - INVOICE LINE -->
		<cbc:ID>3</cbc:ID> <!-- IBT-126 - Invoice line identifier -->
		<!-- cbc:Note, IBT-127 - Invoice line note -->
		<cbc:InvoicedQuantity unitCode="H87">10</cbc:InvoicedQuantity> <!-- IBT-130 - Invoiced quantity unit of measure code, IBT-129 - Invoiced quantity -->
		<cbc:LineExtensionAmount currencyID="JPY">3490</cbc:LineExtensionAmount> <!-- IBT-131 - Invoice line net amount -->
		<!-- cbc:AccountingCost, IBT-133 - Invoice line Buyer accounting reference -->
		<cac:InvoicePeriod> <!-- IBG-26 - INVOICE LINE PERIOD -->
			<cbc:StartDate>2023-10-18</cbc:StartDate> <!-- IBT-134 - Invoice line period start date -->
			<cbc:EndDate>2023-10-18</cbc:EndDate> <!-- IBT-135 - Invoice line period end date -->
		</cac:InvoicePeriod>
		<cac:DocumentReference> <!-- IBG-36 - LINE DOCUMENT REFERENCE -->
        	<cbc:ID>D001-3</cbc:ID> <!-- IBT-188 - Invoice line document identifier -->  
    	</cac:DocumentReference>
		<cac:Item> <!-- IBG-31 - ITEM INFORMATION -->
			<!-- cbc:Description, IBT-154 - Item description -->
			<cbc:Name>検定済教科書(算数)</cbc:Name> <!-- IBT-153 - Item name -->
			<cac:ClassifiedTaxCategory> <!-- IBG-30 - LINE TAX INFORMATION -->
				<cbc:ID>E</cbc:ID> <!-- IBT-151 - Invoiced item TAX category code -->
				<cbc:Percent>0</cbc:Percent> <!-- IBT-152 - Invoiced item TAX rate -->
				<!-- cbc:PerUnitAmount, IBT-166 - Unit TAX -->
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID> <!-- IBT-167 - Tax Scheme -->
				</cac:TaxScheme>
			</cac:ClassifiedTaxCategory>
			<cac:AdditionalItemProperty> <!-- IBG-32 - ITEM ATTRIBUTES -->
				<cbc:Name>表示単位名称</cbc:Name> <!-- IBT-160 - Item attribute name -->
				<cbc:Value>冊</cbc:Value> <!-- IBT-161 - Item attribute value -->
			</cac:AdditionalItemProperty>
		</cac:Item>
		<cac:Price> <!-- IBG-29 - PRICE DETAILS -->
			<cbc:PriceAmount currencyID="JPY">349</cbc:PriceAmount> <!-- IBT-146 - Item net price -->
			<cbc:BaseQuantity unitCode="H87">1</cbc:BaseQuantity> <!-- IBT-149 - Item price base quantity, IBT-150 - Item price base quantity unit of measure code -->
		</cac:Price>
	</cac:InvoiceLine>
</Invoice>

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です