Views: 18
The New Era of Data Conversion: Semantic and Syntactic Binding through Hierarchical Tidy Data
Nobuyuki SAMBUICHI
ISO/TC295 Audit data services/SG1 Semantic model Convener
This article stems from the Proof of Concept (POC) executed by XBRL Japan for the Core Invoice Gateway service and the General Ledger Viewer.
Note 1: A trial version of the Core Invoice Gateway, courtesy of Sanbunichi Professional Engineers Office, is available at the following link:
Core Invoice Gateway
Note 2: Experience a trial of the General Ledger Browser using the link provided below:
General Ledger Browser
1. Overview
This explanatory article focuses on two main topics:
-
Understanding Standardized CSV through Hierarchical Tidy Data: This section provides a detailed explanation about standardized CSV formats using Hierarchical Tidy Data.
-
Understanding Bindings for Data Interchange:
-
Syntactic Binding: This topic explains the conversion process between XML files that express the same content but in different syntactical rules, and a standard format CSV. This syntactic binding serves as a gateway function between different formats.
-
Semantic Binding: This explains the process of mutual conversion between a proprietary CSV format provided by accounting software and a standard format CSV.
-
The combination of these topics offers a comprehensive perspective on data standardization and interoperability. Hierarchical Tidy Data extends the concept of regular Tidy Data to efficiently represent data with complex hierarchical structures.
To understand the difference between regular Tidy Data and Hierarchical Tidy Data, consider the following points:
-
Regular Tidy Data: All observations are of the same type, each observation is in a separate row, and each variable is in a separate column.
-
Hierarchical Tidy Data: This structure allows for the coexistence of various types of observations that form an observational unit, using additional identifiers to differentiate observations within a particular hierarchy. While this structure is grounded in the three fundamental principles of regular Tidy Data, it is extended to accommodate observations across multiple hierarchies.
With this new format, data for the entire invoice and the detail lines can be efficiently represented in one table, replacing the conventional normalized multiple tables. For instance, relational algebra operations to join the invoice document table and the detail lines table are no longer necessary because the data are already aggregated into one table, allowing data retrieval without the need to manipulate relational algebra.
The use of Hierarchical Tidy Data is especially useful in cases of complex data structures, as will be illustrated in the following example.
2. Standardized CSV through Hierarchical Tidy Data
2.1. Hierarchical Tidy Data
Hierarchical Tidy Data is a data format used particularly when dealing with data that have complex structures. This format expands the general concept of Tidy Data.
The typical structure of Tidy Data arranges variables corresponding to the same kind of observations into individual columns. Hierarchical Tidy Data takes this concept further by providing a structure to represent observations of different types across multiple levels within a single table.
In other words, Hierarchical Tidy Data is a method for hierarchically structuring related information against general tabular data.
Hierarchical Tidy Data extends the Tidy Data concept proposed by Hadley Wickham and adheres to the same three rules as standard Tidy Data:
2.3. Tidy data
Tidy data is a standard way of mapping the meaning of a dataset to its structure. A dataset is messy or tidy depending on how rows, columns and tables are matched up with observations, variables and types. In tidy data:
Each variable forms a column.
Each observation forms a row.
Each type of observational unit forms a table.
H. . (2014). Tidy Data. Journal of Statistical Software
Building on the foundational principles of standard Tidy Data, Hierarchical Tidy Data offers a refined framework to effectively represent intricate data structures. Notably, it caters to observational units associated with variables spanning multiple levels.
While Wickham asserts that this approach mirrors “Codd’s 3rd normal form (Codd 1990), with the concepts recast in a statistical language and a focus on individual datasets rather than the many interlinked datasets common in relational databases,” it’s essential to recognize that an observational unit can encompass multiple types of observations. As an illustration, in our digital invoice scenario, an observational unit might combine observations from both the document header and the journal entry line items.
This new format clears the chaotic maze of previously complex normalized tables, vividly portraying data in a single sophisticated table. No need for cumbersome relational algebra operations or JOIN operations. Everything is compiled into one table, making it quick and easy to retrieve necessary information. This groundbreaking reform has innovatively simplified the handling of data.
The main advantage of this new Hierarchical Tidy Data approach is its ability to consistently organize and analyze unstructured data. Moreover, this format facilitates the process of data analysis and visualization, offering a powerful framework for handling different types of data in a consistent format.
2.2. Example: Invoice with Detail Lines
In the case of an invoice with detail lines, the concept of Hierarchical Tidy Data is especially useful. Within a single invoice, there exist data at different hierarchies (observations related to the entire invoice and observations related to the detail lines). With Hierarchical Tidy Data, these different hierarchical data can be efficiently represented in a single table. Here, we organize these observations using the format of Hierarchical Tidy Data.
Typically, an invoice includes the following observations:
– Invoice number
– Invoice issue date
– Seller
– Buyer
– Total amount
– Detail lines (items, quantities, invoiced amount, etc.)
In Hierarchical Tidy Data, these data are represented as follows:
-
Rows of observations related to the entire invoice: These rows list “invoice number,” “invoice issue date,” “seller,” “buyer,” “total amount,” etc., and leave “detail line number” blank.
-
Rows of observations related to the detail lines: These rows list “invoice number,” “detail line number,” “items,” “unit price,” “quantity,” “invoiced amount,” etc.
When representing these observations in Hierarchical Tidy Data, a specific example of issued invoice data by seller company X would look like the following table:
Invoice Number | Detail Line Number | Invoice Issue Date | Seller | Buyer | Total Amount | Item | Quantity | Invoiced Amount |
---|---|---|---|---|---|---|---|---|
1001 |
2023-01-01 |
Company X |
Company A |
1000 |
||||
1001 |
1 |
Item1 |
5 |
500 |
||||
1001 |
2 |
Item2 |
3 |
300 |
||||
1001 |
3 |
Item3 |
2 |
200 |
||||
1002 |
2023-01-02 |
Company X |
Company B |
400 |
||||
1002 |
1 |
Item4 |
4 |
400 |
Explanation
This table provides a powerful example of Hierarchical Tidy Data. The following elements characterize Hierarchical Tidy Data:
-The “invoice number” identifies the entire invoice, uniquely specifying each invoice.
-When the “detail line number” is blank, it indicates an observation for the entire document, and for the detail lines, a detail line number is assigned, uniquely specifying each detail line.
The process of constructing Hierarchical Tidy Data in this table can be described as follows:
Observations about the entire invoice
– The “invoice number” is the key that identifies the entire invoice and is used to associate the detail lines related to the same invoice.
– In the rows for the entire invoice, the columns of observations for variables related to the detail lines are left blank.
Observations about each detail line
– Utilizing “Invoice Number” and “Detail Line Number” as Unique Identifiers for Each Detail Line
– The Hierarchical Structure Represented by a Combination of “Invoice Number” and “Detail Line Number”
– Leaving Columns for Observations Pertaining to the Entire Invoice Blank in the Detail Line Rows.
2.3. Adding Tax Amounts by Taxation Classification
The CSV notation of the total invoice amount by taxation classification can be clearly stated in one table using Hierarchical Tidy Data. The traditional method required pre-defining columns for standard tax rates of 10%, reduced tax rates of 8%, export tax exemption of 0%, etc. However, with this method, definitions had to be changed every time tax rates were revised.
Explanation of the example of adding the total amount by taxation classification
In the following table, the taxation classification and tax rate have been added to the invoice detail line.
Invoice Number | Detail Line Number | Invoice Issuance Date | Seller | Buyer | Total Amount | Item | Quantity | Invoice Amount | Taxation Classification | Tax Rate |
---|---|---|---|---|---|---|---|---|---|---|
1001 |
2023-01-01 |
Company X |
Company A |
1000 |
||||||
1001 |
1 |
Item 1 |
5 |
500 |
S(Standard) |
10% |
||||
1001 |
2 |
Item 2 |
3 |
300 |
AA(Reduced) |
8% |
||||
1001 |
3 |
Item 3 |
2 |
200 |
E(Exempt) |
0% |
||||
1002 |
2023-01-02 |
Company X |
Company B |
400 |
||||||
1002 |
1 |
Item 4 |
4 |
400 |
G(Export) |
0% |
In the standard format CSV using Hierarchical Tidy Data, you can add the variables “Total Taxable Amount (by Tax Classification)” and “Total Tax Amount (by Tax Classification)” using “Invoice Number”, “Taxation Classification”, and “Tax Rate” as keys. This allows the total amount by tax classification for each invoice to be noted in one table.
Invoice Number | Taxation Classification | Tax Rate | Detail Line Number | Invoice Issuance Date | Seller | Buyer | Total Amount | Total Taxable Amount | Total Tax Amount | Item | Quantity | Invoice Amount | Taxation Classification | Tax Rate |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1001 |
2023-01-01 |
Company X |
Company A |
1000 |
||||||||||
1001 |
S(Standard) |
10% |
900 |
90 |
||||||||||
1001 |
AA(Reduced) |
8% |
300 |
24 |
||||||||||
1001 |
E(Exempt) |
0% |
200 |
0 |
||||||||||
1001 |
1 |
Item 1 |
5 |
500 |
S(Standard) |
10% |
||||||||
1001 |
2 |
Item 2 |
3 |
300 |
AA(Reduced) |
8% |
||||||||
1001 |
3 |
Item 3 |
2 |
200 |
E(Exempt) |
0% |
||||||||
1002 |
2023-01-02 |
Company X |
Company B |
400 |
||||||||||
1002 |
G(Export) |
0% |
400 |
0 |
||||||||||
1002 |
1 |
Item 4 |
4 |
400 |
G(Export) |
0% |
In this standard CSV, we use the hierarchical Tidy data format instead of the traditional normalized table format.
3. Hierarchically Defined Semantic Model
The hierarchically defined semantic model provides a framework to organize the structure of data hierarchically. In the table below, the information related to the invoice is divided and defined into multiple layers.
ID | Hierarchy | Name | Data Type | Repetition |
---|---|---|---|---|
BG-1 |
0 |
Invoice |
Group |
0..* |
BT-01 |
1 |
Invoice Number |
ID |
1..1 |
BT-02 |
1 |
Invoice Issue Date |
Date |
1..1 |
BT-03 |
1 |
Seller |
Text |
1..1 |
BT-04 |
1 |
Buyer |
Text |
1..1 |
BT-05 |
1 |
Total Amount |
Amount |
1..1 |
BG-2 |
1 |
Tax Amount by Category |
Group |
1..* |
BT-06 |
2 |
Tax Category |
Code |
1..1 |
BT-07 |
2 |
Tax Rate |
Percentage |
1..1 |
BT-09 |
2 |
Total Taxable Amount |
Amount |
1..1 |
BT-09 |
2 |
Total Tax Amount |
Amount |
1..1 |
BG-3 |
1 |
Line Item |
Group |
1..* |
BT-10 |
2 |
Line Item Number |
ID |
1..1 |
BT-11 |
2 |
Item |
Text |
1..1 |
BT-12 |
2 |
Quantity |
Quantity |
0..1 |
BT-13 |
2 |
Invoice Amount |
Amount |
1..1 |
BT-14 |
2 |
Tax Category |
Code |
1..1 |
BT-15 |
2 |
Tax Rate |
Percentage |
1..1 |
This model consists of three main parts:
-
Invoice Information: Data related to the whole invoice (Invoice number, issue date, seller, buyer, total amount, etc.).
-
Tax Amount by Category: Tax rate and total amount for each tax category.
-
Line Item: Detailed information for each item (line item number, item, quantity, invoice amount, tax category, tax rate, etc.).
With hierarchical Tidy data, you can accurately express such a hierarchical structure.
Since it is possible to create a definition of hierarchical Tidy data corresponding to all hierarchically defined semantic models, adopting hierarchical Tidy data as a standard CSV format allows handling of hierarchically defined data structures such as XML, JSON, and Yaml in a consistent format.
The standard CSV format of hierarchical Tidy data is compatible with various hierarchical data structures, greatly facilitating the processes of analysis and visualization.
4. Syntax Binding
Adopting hierarchical Tidy data enables the creation of definitions adaptable to various hierarchical semantic models. Once a syntax binding is defined, it eases the conversion between hierarchical data structures like XML, JSON, YAML and standard format CSV.
This conversion process is automated as the program interprets the syntax binding dictionary (taxonomy), thus data handling proceeds efficiently and flexibly. Moreover, by just modifying the syntax binding definition, it is possible to quickly respond to changes in the semantic model. This system enhances the consistency and flexibility of data management, greatly aiding the process of analysis and visualization.
4.1. JP PINT Syntax Binding
The following table is an excerpt of the syntax binding for the tax amount group by tax category mentioned in the invoice currency. Here, the condition specified is that the tax amount currency should match the document currency of the invoice to specify the /Invoice /cac:TaxTotal for the tax amount group by tax category mentioned in the invoice currency. The following part specifies that condition.
[cbc:TaxAmount /@currencyID = /Invoice /cbc:DocumentCurrencyCode]
This is the XPath expression to specify /Invoice /cac:TaxTotal, where the @currencyID attribute of the sub-element cbc:TaxAmount is the document currency code specified at the document level /Invoice /cbc:DocumentCurrencyCode.
/Invoice /cac:TaxTotal [cbc:TaxAmount /@currencyID = /Invoice /cbc:DocumentCurrencyCode]
[source,txt]
core_id | level | Item Name | Repeat | Id | Level | Business Term ja | Card. | UBL XPath |
---|---|---|---|---|---|---|---|---|
NC39-NC57 |
2 |
Document Header Tax Classification |
1..n |
IBG-23 |
1 |
Tax Breakdown Information |
1..n |
/Invoice /cac:TaxTotal [cbc:TaxAmount /@currencyID = /Invoice /cbc:DocumentCurrencyCode] /cac:TaxSubtotal |
NC57-01 |
3 |
Document Header Tax Classification Tax Amount |
1..1 |
IBT-117 |
2 |
Consumption Tax Amount by Tax Classification |
1..1 |
/Invoice /cac:TaxTotal [cbc:TaxAmount /@currencyID = /Invoice /cbc:DocumentCurrencyCode] /cac:TaxSubtotal /cbc:TaxAmount |
NC57-03 |
3 |
Document Header Tax Classification Total Transfer Asset Amount (Excluding Tax) |
1..1 |
IBT-116 |
2 |
Taxable Base Amount by Tax Classification |
1..1 |
/Invoice /cac:TaxTotal [cbc:TaxAmount /@currencyID = /Invoice /cbc:DocumentCurrencyCode] /cac:TaxSubtotal /cbc:TaxableAmount |
NC57-04 |
3 |
Document Header Tax Classification Code |
1..1 |
IBT-118 |
2 |
Tax Classification Code |
1..1 |
/Invoice /cac:TaxTotal [cbc:TaxAmount /@currencyID = /Invoice /cbc:DocumentCurrencyCode] /cac:TaxSubtotal /cac:TaxCategory /cbc:ID |
NC57-07 |
3 |
Document Header Tax Rate |
1..1 |
IBT-119 |
2 |
Tax Rate by Tax Classification |
0..1 |
/Invoice /cac:TaxTotal [cbc:TaxAmount /@currencyID = /Invoice /cbc:DocumentCurrencyCode] /cac:TaxSubtotal /cac:TaxCategory /cbc:Percent |
The following demonstrates the part of the electronic invoice that corresponds to this syntax binding specification.
<?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">
Omitted part
<cac:TaxTotal>
<cbc:TaxAmount currencyID="JPY">25250</cbc:TaxAmount> <!-- IBT-110 - Invoice total TAX amount -->
<cac:TaxSubtotal> <!-- IBG-23 - TAX BREAKDOWN -->
<cbc:TaxableAmount currencyID="JPY">252500</cbc:TaxableAmount> <!-- IBT-116 - TAX category taxable amount -->
<cbc:TaxAmount currencyID="JPY">25250</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>
Remaining part omitted
4.2. SME (Small and Medium Enterprises) Common EDI Syntax Binding
The following table is an excerpt of syntax binding for a group of tax amounts categorized by taxation, listed in the currency of the invoice.
Here, we specify /rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:IncludedCIILSupplyChainTradeLineItem /ram:SpecifiedCIILSupplyChainTradeSettlement /ram:ApplicableCITradeTax for the group of tax amounts listed in the invoice currency. The condition for specifying this is that the currency of the tax amount is the document currency of the invoice.
The condition is as follows:
[ram:CurrencyCode = /rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:ApplicableCIIHSupplyChainTradeSettlement /ram:InvoiceCurrencyCode]
This is an XPath expression that specifies /rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:IncludedCIILSupplyChainTradeLineItem /ram:SpecifiedCIILSupplyChainTradeSettlement /ram:ApplicableCITradeTax, where the subordinate element ram:CurrencyCode is the document currency code /rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:ApplicableCIIHSupplyChainTradeSettlement /ram:InvoiceCurrencyCode specified at the document level.
/rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:IncludedCIILSupplyChainTradeLineItem /ram:SpecifiedCIILSupplyChainTradeSettlement /ram:ApplicableCITradeTax [ram:CurrencyCode = /rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:ApplicableCIIHSupplyChainTradeSettlement /ram:InvoiceCurrencyCode]
core_id | level | Item Name | Repeat | UN_CCL_ID | Level | Item Name | Repeat | SME CII XPath |
---|---|---|---|---|---|---|---|---|
NC39-NC57 |
2 |
Document Header Tax Classification |
1..n |
UN01005996 |
5 |
Document Header Settlement/Document Header Tax Group |
1..n |
/rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:IncludedCIILSupplyChainTradeLineItem /ram:SpecifiedCIILSupplyChainTradeSettlement /ram:ApplicableCITradeTax [ram:CurrencyCode = /rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:ApplicableCIIHSupplyChainTradeSettlement /ram:InvoiceCurrencyCode] |
NC57-01 |
3 |
Document Header Tax Classification Tax Amount |
1..1 |
UN01005833 |
6 |
Document Header Tax Classification Tax Amount |
1..1 |
/rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:IncludedCIILSupplyChainTradeLineItem /ram:SpecifiedCIILSupplyChainTradeSettlement /ram:ApplicableCITradeTax [ram:CurrencyCode = /rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:ApplicableCIIHSupplyChainTradeSettlement /ram:InvoiceCurrencyCode] /ram:CalculatedAmount |
NC57-03 |
3 |
Document Header Tax Classification Total Transfer Asset Amount (Excluding Tax) |
1..1 |
UN01005839 |
6 |
Document Header Tax Classification Total Transfer Asset Amount (Excluding Tax) |
1..1 |
/rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:IncludedCIILSupplyChainTradeLineItem /ram:SpecifiedCIILSupplyChainTradeSettlement /ram:ApplicableCITradeTax [ram:CurrencyCode = /rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:ApplicableCIIHSupplyChainTradeSettlement /ram:InvoiceCurrencyCode] /ram:BasisAmount |
NC57-04 |
3 |
Document Header Tax Classification Code |
1..1 |
UN01005841 |
6 |
Document Header Tax Classification Code |
1..1 |
/rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:IncludedCIILSupplyChainTradeLineItem /ram:SpecifiedCIILSupplyChainTradeSettlement /ram:ApplicableCITradeTax [ram:CurrencyCode = /rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:ApplicableCIIHSupplyChainTradeSettlement /ram:InvoiceCurrencyCode] /ram:CategoryCode |
NC57-07 |
3 |
Document Header Tax Rate |
1..1 |
UN01007174 |
6 |
Document Header Tax Rate |
1..1 |
/rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:IncludedCIILSupplyChainTradeLineItem /ram:SpecifiedCIILSupplyChainTradeSettlement /ram:ApplicableCITradeTax [ram:CurrencyCode = /rsm:SMEinvoice /rsm:CIIHSupplyChainTradeTransaction /ram:ApplicableCIIHSupplyChainTradeSettlement /ram:InvoiceCurrencyCode] /ram:RateApplicablePercent |
The following is the part of the electronic invoice that corresponds to this syntax binding specification.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<rsm:SMEinvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:SMEinvoice"
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:31"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:31"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:31"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:un:unece:uncefact:data:standard:SMEinvoice https://www.wuwei.space/core-japan/server/data/schema/data/standard/SMEinvoice.xsd">
Partial omission
<ram:IncludedCIILSupplyChainTradeLineItem>
<ram:SpecifiedCIILSupplyChainTradeSettlement>
<ram:ApplicableCITradeTax>
<ram:CalculatedAmount>25250</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>252500</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:CurrencyCode>JPY</ram:CurrencyCode>
<ram:RateApplicablePercent>10</ram:RateApplicablePercent>
</ram:ApplicableCITradeTax>
<ram:ApplicableCITradeTax>
<ram:CalculatedAmount>0</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>3490</ram:BasisAmount>
<ram:CategoryCode>E</ram:CategoryCode>
<ram:CurrencyCode>JPY</ram:CurrencyCode>
<ram:RateApplicablePercent>0</ram:RateApplicablePercent>
</ram:ApplicableCITradeTax>
Omitted afterwards
4.3. Core Invoice Gateway Conversion Process
Processing Flow
The following flowchart illustrates the transformation process flow of syntax binding, centralized on standard format CSV.
5. Semantic Binding
Semantic Binding is the process of mutual transformation between proprietary CSV files provided by accounting software and standard format CSV. This transformation is accomplished using specific tools, namely .csv2tidy.py and tidy2csv.py.
5.1. Processing Flow
The following flowchart illustrates the transformation process flow of semantic binding, centralized on standard format CSV.
5.2. Processing Flow of Semantic Binding and Syntax Binding
When you include the transformation process flow between syntax binding and standard format CSV, the overall flow becomes as follows:
5.3. Detailed Semantic Binding
During semantic binding, a custom definition called “Semantic Path (semPath)” is used to locate the position of data. Similar to XPath in XML, semPath helps to conditionally specify a particular location on a logical hierarchical model.
The advantage of this method is that data conversion between different formats can be accomplished with adjustments only to the binding dictionary (taxonomy), without any programming changes. This allows data conversion to be performed efficiently and flexibly.
column |
name |
card |
Representation |
semSort |
semPath |
fixedValue |
– |
seq |
Identifier |
1010 |
GL02-01 |
||
A |
Month Type |
0 |
||||
B |
Type |
0 |
||||
C |
Format |
0..1 |
Document Reference |
1240 |
GL55-03 |
|
D |
Creation Method |
0 |
||||
E |
Tag |
0 |
||||
F |
Slip Date |
0..1 |
Date |
1230 |
GL55-02 |
|
G |
Slip Number |
0..1 |
Code |
1020 |
GL02-02 |
|
H |
Slip Summary |
0..1 |
Text |
1030 |
GL02-03 |
|
I |
Branch Number |
0..1 |
Code |
1220 |
GL55-01 |
|
J |
Debit Department |
0..1 |
Document Reference |
1490 |
GL02-GL55[GL55-05=Debit]/GL55-GL61[GL61-01=Department]/GL60-02 |
|
K |
Debit Department Name |
0..1 |
Text |
1500 |
GL02-GL55[GL55-05=Debit]/GL55-GL61[GL61-01=Department]/GL60-03 |
|
L |
Debit Account |
1..1 |
Identifier |
1320 |
GL02-GL55[GL55-05=Debit]/GL55-GL63/GL63-01 |
|
M |
Debit Account Name |
0..1 |
Text |
1330 |
GL02-GL55[GL55-05=Debit]/GL55-GL63/GL63-02 |
|
N |
Debit Subsidiary |
0..1 |
Text |
1390 |
GL02-GL55[GL55-05=Debit]/GL55-GL60[GL60-01=Subsidiary Account]/GL60-02 |
|
O |
Debit Subsidiary Account Name |
0..1 |
Text |
1400 |
GL02-GL55[GL55-05=Debit]/GL55-GL60[GL60-01=Subsidiary Account]/GL60-03 |
|
P |
Debit Amount |
1..1 |
Monetary Amount |
1350 |
GL02-GL55[GL55-05=Debit]/GL55-GL56/GL56-01 |
|
Q |
Debit Consumption Tax Code |
0..1 |
Code |
1520 |
GL02-GL55[GL55-05=Debit]/GL55-GL68[GL68-04=Consumption Tax]/GL68-01 |
|
R |
Debit Consumption Tax Industry |
0..1 |
Text |
1430 |
GL02-GL55[GL55-05=Debit]/GL55-GL60[GL60-01=Industry]/GL60-02 |
|
S |
Debit Consumption Tax Rate |
0..1 |
Percentage |
1530 |
GL02-GL55[GL55-05=Debit]/GL55-GL68[GL68-04=Consumption Tax]/GL68-02 |
|
T |
Debit Fund Classification |
0..1 |
Text |
1460 |
GL02-GL55[GL55-05=Debit]/GL55-GL60[GL60-01=Fund Classification]/GL60-02 |
|
U |
Debit Optional Item 1 |
|||||
V |
Debit Optional Item 2 |
|||||
W |
Credit Department |
0..1 |
0 |
1730 |
GL02-GL55[GL55-05=Credit]/GL55-GL61[GL61-01=Department]/GL60-02 |
|
X |
Credit Department Name |
0..1 |
Text |
1740 |
GL02-GL55[GL55-05=Credit]/GL55-GL61[GL61-01=Department]/GL60-03 |
|
Y |
Credit Account |
1..1 |
Identifier |
1560 |
GL02-GL55[GL55-05=Credit]/GL55-GL63/GL63-01 |
|
Z |
Credit Account Name |
0..1 |
Text |
1570 |
GL02-GL55[GL55-05=Credit]/GL55-GL63/GL63-02 |
|
AA |
Credit Subsidiary |
0..1 |
Text |
1630 |
GL02-GL55[GL55-05=Credit]/GL55-GL60[GL60-01=Subsidiary Account]/GL60-02 |
|
AB |
Credit Subsidiary Account Name |
0..1 |
Text |
1640 |
GL02-GL55[GL55-05=Credit]/GL55-GL60[GL60-01=Subsidiary Account]/GL60-03 |
|
AC |
Credit Amount |
1..1 |
Monetary Amount |
1590 |
GL02-GL55[GL55-05=Credit]/GL55-GL56/GL56-01 |
|
AD |
Credit Consumption Tax Code |
0..1 |
Code |
1760 |
GL02-GL55[GL55-05=Credit]/GL55-GL68[GL68-04=Consumption Tax]/GL68-01 |
|
AE |
Credit Consumption Tax Industry |
0..1 |
Text |
1670 |
GL02-GL55[GL55-05=Credit]/GL55-GL60[GL60-01=Industry]/GL60-02 |
|
AF |
Credit Consumption Tax Rate |
0..1 |
Percentage |
1770 |
GL02-GL55[GL55-05=Credit]/GL55-GL68[GL68-04=Consumption Tax]/GL68-02 |
|
AG |
Credit Fund Classification |
0..1 |
Text |
1700 |
GL02-GL55[GL55-05=Credit]/GL55-GL60[GL60-01=Fund Classification]/GL60-02 |
|
AH |
Credit Optional Item 1 |
|||||
AI |
Credit Optional Item 2 |
|||||
AJ |
Summary |
0..1 |
Text |
1250 |
GL55-04 |
|
AK |
Due Date |
0..1 |
Date |
1290 |
GL55-08 |
|
AL |
Certificate Number |
0..1 |
Code |
1270 |
GL55-06 |
|
AM |
Input User |
0..1 |
Identifier |
1150 |
GL57-01 |
|
AN |
Input Machine |
0..1 |
Document Reference |
1130 |
GL64-04 |
|
AO |
Input App |
0..1 |
Text |
1120 |
GL64-03 |
|
AP |
Input Company |
0..1 |
Text |
1110 |
GL64-02 |
|
AQ |
Input Date |
0..1 |
Date |
1160 |
GL57-02 |
6. Example: Japan PINT Invoice UBL Example1-minimum.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">
<!--
Japan common commercial invoice, example1-minimum
-->
<cbc:UBLVersionID>2.1</cbc:UBLVersionID>
<cbc:CustomizationID>urn:fdc:peppol:jp:billing:3.0</cbc:CustomizationID> <!-- IBT-024 - Specification identifier -->
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</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:InvoiceTypeCode>380</cbc:InvoiceTypeCode> <!-- IBT-003 - Invoice type code -->
<cbc:DocumentCurrencyCode>JPY</cbc:DocumentCurrencyCode> <!-- IBT-005 - Invoice currency code -->
<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 -->
</cac:InvoicePeriod>
<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:PostalAddress> <!-- IBG-05 - SELLER POSTAL ADDRESS -->
<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 -->
</cac:PartyLegalEntity>
</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:PostalAddress> <!-- IBG-08 - BUYER POSTAL ADDRESS -->
<cac:Country>
<cbc:IdentificationCode>JP</cbc:IdentificationCode> <!-- IBT-055 - Buyer country code -->
</cac:Country>
</cac:PostalAddress>
<cac:PartyLegalEntity>
<cbc:RegistrationName>株式会社 〇〇物産</cbc:RegistrationName> <!-- IBT-044 - Buyer name -->
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="JPY">25250</cbc:TaxAmount> <!-- IBT-110 - Invoice total TAX amount -->
<cac:TaxSubtotal> <!-- IBG-23 - TAX BREAKDOWN -->
<cbc:TaxableAmount currencyID="JPY">252500</cbc:TaxableAmount> <!-- IBT-116 - TAX category taxable amount -->
<cbc:TaxAmount currencyID="JPY">25250</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">255990</cbc:TaxExclusiveAmount> <!-- IBT-109 - Invoice total amount without TAX -->
<cbc:TaxInclusiveAmount currencyID="JPY">281240</cbc:TaxInclusiveAmount> <!-- IBT-112 - Invoice total amount with TAX -->
<cbc:AllowanceTotalAmount currencyID="JPY">0</cbc:AllowanceTotalAmount> <!-- IBT-107 - Sum of allowances on document level -->
<cbc:ChargeTotalAmount currencyID="JPY">0</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">281240</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: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 -->
<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:Item> <!-- IBG-31 - ITEM INFORMATION -->
<cbc:Name>デスクチェア</cbc:Name> <!-- IBT-153 - Item name -->
<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 -->
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID> <!-- IBT-167 - Tax Scheme -->
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</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: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 -->
<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:Item> <!-- IBG-31 - ITEM INFORMATION -->
<cbc:Name>コピー用紙(A4)</cbc:Name> <!-- IBT-153 - Item name -->
<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 -->
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID> <!-- IBT-167 - Tax Scheme -->
</cac:TaxScheme>
</cac:ClassifiedTaxCategory> <!-- IBG-32 - ITEM ATTRIBUTES -->
</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:Price>
</cac:InvoiceLine>
<cac:InvoiceLine> <!-- IBG-25 - INVOICE LINE -->
<cbc:ID>3</cbc:ID> <!-- IBT-126 - Invoice line identifier -->
<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 -->
<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:Item> <!-- IBG-31 - ITEM INFORMATION -->
<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 -->
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID> <!-- IBT-167 - Tax Scheme -->
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</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>
d_NC00 | 0 | 0 | 0 | 0 | 0 | 0 |
---|---|---|---|---|---|---|
d_NC39-NC57 |
0 |
1 |
||||
d_NC39-NC61 |
0 |
1 |
2 |
|||
NC00-01 |
JPY |
|||||
NC00-07 |
urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 |
|||||
NC00-15 |
urn:fdc:peppol:jp:billing:3.0 |
|||||
NC00-19 |
156 |
|||||
NC00-21 |
380 |
|||||
NC00-22 |
2023-10-24 |
|||||
NC00-29 |
2023-10-18 |
|||||
NC00-30 |
2023-10-18 |
|||||
NC09-05 |
株式会社 〇〇商事 |
|||||
NC09-07 |
T1234567890123 |
|||||
NC09-08 |
VAT |
|||||
NC09-10 |
VAT |
|||||
NC09-11 |
1234567890123 |
|||||
NC09-12 |
0188 |
|||||
NC11-07 |
JP |
|||||
NC12-05 |
株式会社 〇〇物産 |
|||||
NC12-09 |
3210987654321 |
|||||
NC12-10 |
0188 |
|||||
NC14-07 |
JP |
|||||
NC55-01 |
0 |
|||||
NC55-02 |
0 |
|||||
NC55-03 |
25250 |
|||||
NC55-04 |
255990 |
|||||
NC55-05 |
255990 |
|||||
NC55-06 |
281240 |
|||||
NC55-07 |
281240 |
|||||
NC57-01 |
25250 |
0 |
||||
NC57-02 |
VAT |
VAT |
||||
NC57-03 |
252500 |
3490 |
||||
NC57-04 |
S |
E |
||||
NC57-05 |
JPY |
JPY |
||||
NC57-07 |
10 |
0 |
||||
NC61-01 |
1 |
2 |
3 |
|||
NC61-03 |
250000 |
2500 |
3490 |
|||
NC62-01 |
2023-10-18 |
2023-10-18 |
2023-10-18 |
|||
NC62-02 |
2023-10-18 |
2023-10-18 |
2023-10-18 |
|||
NC63-04 |
5 |
5 |
10 |
|||
NC63-05 |
H87 |
H87 |
H87 |
|||
NC71-01 |
VAT |
VAT |
VAT |
|||
NC71-02 |
S |
S |
E |
|||
NC71-04 |
10 |
10 |
0 |
|||
NC75-07 |
デスクチェア |
コピー用紙(A4) |
検定済教科書(算数) |
|||
NC76-02 |
50000 |
500 |
349 |
|||
NC76-07 |
1 |
1 |
1 |
|||
NC76-08 |
H87 |
H87 |
H87 |
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<rsm:SMEinvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:SMEinvoice"
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:31"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:31"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:31"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:un:unece:uncefact:data:standard:SMEinvoice https://www.wuwei.space/core-japan/server/data/schema/data/standard/SMEinvoice.xsd">
<rsm:CIExchangedDocumentContext>
<ram:BusinessProcessSpecifiedCIDocumentContextParameter>
<ram:ID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</ram:ID>
</ram:BusinessProcessSpecifiedCIDocumentContextParameter>
<ram:SubsetSpecifiedCIDocumentContextParameter>
<ram:ID>urn:fdc:peppol:jp:billing:3.0</ram:ID>
</ram:SubsetSpecifiedCIDocumentContextParameter>
</rsm:CIExchangedDocumentContext>
<rsm:CIIHExchangedDocument>
<ram:ID>156</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString>2023-10-24</udt:DateTimeString>
</ram:IssueDateTime>
</rsm:CIIHExchangedDocument>
<rsm:CIIHSupplyChainTradeTransaction>
<ram:ApplicableCIIHSupplyChainTradeAgreement>
<ram:SellerCITradeParty>
<ram:Name>株式会社 〇〇商事</ram:Name>
<ram:RegisteredID>T1234567890123</ram:RegisteredID>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:EndPointURICIUniversalCommunication>
<ram:CompleteNumber>1234567890123</ram:CompleteNumber>
<ram:ChannelCode>0188</ram:ChannelCode>
</ram:EndPointURICIUniversalCommunication>
<ram:PostalCITradeAddress>
<ram:CountryID>JP</ram:CountryID>
</ram:PostalCITradeAddress>
</ram:SellerCITradeParty>
<ram:BuyerCITradeParty>
<ram:Name>株式会社 〇〇物産</ram:Name>
<ram:EndPointURICIUniversalCommunication>
<ram:CompleteNumber>3210987654321</ram:CompleteNumber>
<ram:ChannelCode>0188</ram:ChannelCode>
</ram:EndPointURICIUniversalCommunication>
<ram:PostalCITradeAddress>
<ram:CountryID>JP</ram:CountryID>
</ram:PostalCITradeAddress>
</ram:BuyerCITradeParty>
</ram:ApplicableCIIHSupplyChainTradeAgreement>
<ram:ApplicableCIIHSupplyChainTradeSettlement>
<ram:InvoiceCurrencyCode>JPY</ram:InvoiceCurrencyCode>
<ram:BillingCISpecifiedPeriod>
<ram:StartDateTime>
<udt:DateTimeString>2023-10-18</udt:DateTimeString>
</ram:StartDateTime>
<ram:EndDateTime>
<udt:DateTimeString>2023-10-18</udt:DateTimeString>
</ram:EndDateTime>
</ram:BillingCISpecifiedPeriod>
</ram:ApplicableCIIHSupplyChainTradeSettlement>
<ram:IncludedCIILSupplyChainTradeLineItem>
<ram:SpecifiedCIILSupplyChainTradeSettlement>
<ram:ApplicableCITradeTax>
<ram:CalculatedAmount>25250</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>252500</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:CurrencyCode>JPY</ram:CurrencyCode>
<ram:RateApplicablePercent>10</ram:RateApplicablePercent>
</ram:ApplicableCITradeTax>
<ram:ApplicableCITradeTax>
<ram:CalculatedAmount>0</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>3490</ram:BasisAmount>
<ram:CategoryCode>E</ram:CategoryCode>
<ram:CurrencyCode>JPY</ram:CurrencyCode>
<ram:RateApplicablePercent>0</ram:RateApplicablePercent>
</ram:ApplicableCITradeTax>
<ram:SpecifiedCIILTradeSettlementMonetarySummation>
<ram:ChargeTotalAmount>0</ram:ChargeTotalAmount>
<ram:AllowanceTotalAmount>0</ram:AllowanceTotalAmount>
<ram:TaxTotalAmount currencyID="JPY">25250</ram:TaxTotalAmount>
<ram:GrossLineTotalAmount>255990</ram:GrossLineTotalAmount>
<ram:NetLineTotalAmount>255990</ram:NetLineTotalAmount>
<ram:NetIncludingTaxesLineTotalAmount>281240</ram:NetIncludingTaxesLineTotalAmount>
<ram:GrandTotalAmount>281240</ram:GrandTotalAmount>
</ram:SpecifiedCIILTradeSettlementMonetarySummation>
</ram:SpecifiedCIILSupplyChainTradeSettlement>
<ram:SubordinateCIILBSubordinateTradeLineItem>
<ram:ID>1</ram:ID>
<ram:SpecifiedCIILBSupplyChainTradeAgreement>
<ram:NetPriceProductCITradePrice>
<ram:ChargeAmount>50000</ram:ChargeAmount>
<ram:BasisQuantity unitCode="H87">1</ram:BasisQuantity>
</ram:NetPriceProductCITradePrice>
</ram:SpecifiedCIILBSupplyChainTradeAgreement>
<ram:SpecifiedCIILBSupplyChainTradeDelivery>
<ram:BilledQuantity unitCode="H87">5</ram:BilledQuantity>
</ram:SpecifiedCIILBSupplyChainTradeDelivery>
<ram:SpecifiedCIILBSupplyChainTradeSettlement>
<ram:ApplicableCITradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>250000</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>10</ram:RateApplicablePercent>
</ram:ApplicableCITradeTax>
<ram:BillingCISpecifiedPeriod>
<ram:StartDateTime>
<udt:DateTimeString>2023-10-18</udt:DateTimeString>
</ram:StartDateTime>
<ram:EndDateTime>
<udt:DateTimeString>2023-10-18</udt:DateTimeString>
</ram:EndDateTime>
</ram:BillingCISpecifiedPeriod>
</ram:SpecifiedCIILBSupplyChainTradeSettlement>
<ram:ApplicableCITradeProduct>
<ram:Name>デスクチェア</ram:Name>
</ram:ApplicableCITradeProduct>
</ram:SubordinateCIILBSubordinateTradeLineItem>
<ram:SubordinateCIILBSubordinateTradeLineItem>
<ram:ID>2</ram:ID>
<ram:SpecifiedCIILBSupplyChainTradeAgreement>
<ram:NetPriceProductCITradePrice>
<ram:ChargeAmount>500</ram:ChargeAmount>
<ram:BasisQuantity unitCode="H87">1</ram:BasisQuantity>
</ram:NetPriceProductCITradePrice>
</ram:SpecifiedCIILBSupplyChainTradeAgreement>
<ram:SpecifiedCIILBSupplyChainTradeDelivery>
<ram:BilledQuantity unitCode="H87">5</ram:BilledQuantity>
</ram:SpecifiedCIILBSupplyChainTradeDelivery>
<ram:SpecifiedCIILBSupplyChainTradeSettlement>
<ram:ApplicableCITradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>2500</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>10</ram:RateApplicablePercent>
</ram:ApplicableCITradeTax>
<ram:BillingCISpecifiedPeriod>
<ram:StartDateTime>
<udt:DateTimeString>2023-10-18</udt:DateTimeString>
</ram:StartDateTime>
<ram:EndDateTime>
<udt:DateTimeString>2023-10-18</udt:DateTimeString>
</ram:EndDateTime>
</ram:BillingCISpecifiedPeriod>
</ram:SpecifiedCIILBSupplyChainTradeSettlement>
<ram:ApplicableCITradeProduct>
<ram:Name>コピー用紙(A4)</ram:Name>
</ram:ApplicableCITradeProduct>
</ram:SubordinateCIILBSubordinateTradeLineItem>
<ram:SubordinateCIILBSubordinateTradeLineItem>
<ram:ID>3</ram:ID>
<ram:SpecifiedCIILBSupplyChainTradeAgreement>
<ram:NetPriceProductCITradePrice>
<ram:ChargeAmount>349</ram:ChargeAmount>
<ram:BasisQuantity unitCode="H87">1</ram:BasisQuantity>
</ram:NetPriceProductCITradePrice>
</ram:SpecifiedCIILBSupplyChainTradeAgreement>
<ram:SpecifiedCIILBSupplyChainTradeDelivery>
<ram:BilledQuantity unitCode="H87">10</ram:BilledQuantity>
</ram:SpecifiedCIILBSupplyChainTradeDelivery>
<ram:SpecifiedCIILBSupplyChainTradeSettlement>
<ram:ApplicableCITradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>3490</ram:BasisAmount>
<ram:CategoryCode>E</ram:CategoryCode>
<ram:RateApplicablePercent>0</ram:RateApplicablePercent>
</ram:ApplicableCITradeTax>
<ram:BillingCISpecifiedPeriod>
<ram:StartDateTime>
<udt:DateTimeString>2023-10-18</udt:DateTimeString>
</ram:StartDateTime>
<ram:EndDateTime>
<udt:DateTimeString>2023-10-18</udt:DateTimeString>
</ram:EndDateTime>
</ram:BillingCISpecifiedPeriod>
</ram:SpecifiedCIILBSupplyChainTradeSettlement>
<ram:ApplicableCITradeProduct>
<ram:Name>検定済教科書(算数)</ram:Name>
</ram:ApplicableCITradeProduct>
</ram:SubordinateCIILBSubordinateTradeLineItem>
</ram:IncludedCIILSupplyChainTradeLineItem>
</rsm:CIIHSupplyChainTradeTransaction>
</rsm:SMEinvoice>