e-bookkeeping-compliance

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

優良な電子帳簿コンプライアンス診断

Excellent Electronic Bookkeeping Compliance Diagnosis

税務調査への備え、または優良な電子帳簿の要件充足状況を診断するスキル。 電子帳簿保存法施行規則第5条第5項(優良な電子帳簿の要件)に基づき、 shinkoku の帳簿データが要件を満たしているかを自動チェックする。
A skill to prepare for tax audits or diagnose whether the requirements for excellent electronic books are met. Automatically checks whether shinkoku's book data meets the requirements based on Article 5, Paragraph 5 of the Enforcement Regulations of the Electronic Bookkeeping Preservation Act (Requirements for Excellent Electronic Books).

前提知識

Prerequisite Knowledge

  • 電帳法の要件詳細:
    skills/tax-advisor/reference/electronic-bookkeeping.md
  • システム概要書:
    docs/system-overview.md

  • Detailed requirements of the Electronic Bookkeeping Law:
    skills/tax-advisor/reference/electronic-bookkeeping.md
  • System overview document:
    docs/system-overview.md

Step 0: 前提確認

Step 0: Prerequisite Confirmation

ユーザーに以下を確認する:
  1. DB パス:
    --db-path
    に使用するデータベースファイルのパス
  2. 対象年度:
    --fiscal-year
    に使用する会計年度
  3. 届出書の提出状況: 「国税関係帳簿の電磁的記録等による保存等に係る届出書」を所轄税務署に提出済みか
届出について: 優良な電子帳簿の保存を適用するには、あらかじめ届出書の提出が必要です。 令和9年分から適用する場合は、令和8年中に届出書を提出する必要があります。 届出書の様式は国税庁ウェブサイトからダウンロードできます。

Confirm the following with the user:
  1. DB Path: Path to the database file to use for
    --db-path
  2. Target Fiscal Year: Fiscal year to use for
    --fiscal-year
  3. Notification Submission Status: Whether the "Notification Concerning the Preservation of National Tax-Related Books via Electronic Records, etc." has been submitted to the competent tax office
Regarding Notification: To apply the preservation of excellent electronic books, prior submission of the notification is required. If applying for Reiwa 9, the notification must be submitted by the end of Reiwa 8. The notification form can be downloaded from the National Tax Agency website.

Step 1: 自動診断 & サマリー出力

Step 1: Automatic Diagnosis & Summary Output

以下のコマンドを実行してシステムの適合状況を診断する。 結果はテーブル形式でユーザーに提示する。
Execute the following commands to diagnose the system's compliance status. Present the results to the user in table format.

チェック項目と実行コマンド

Check Items and Execution Commands

#要件条文チェック方法
G1システム関係書類の備付け施行規則2条2項1号
docs/system-overview.md
ファイルの存在を確認
G2見読可能性の確保施行規則2条2項2号
shinkoku ledger trial-balance --db-path <db> --fiscal-year <year>
を実行し、正常出力を確認
G3ダウンロード対応施行規則2条2項3号
shinkoku ledger search --db-path <db> --input <params> --format csv
を実行し、CSV出力を確認
G4訂正・削除履歴施行規則5条5項1号イ
shinkoku ledger audit-log --db-path <db>
を実行し、テーブルが機能することを確認
G5相互関連性の確保施行規則5条5項1号ロ
shinkoku ledger general-ledger --db-path <db> --fiscal-year <year> --account-code <code>
を実行し、仕訳帳⇔総勘定元帳の関連を確認
G6取引先検索施行規則5条5項1号ハ
counterparty_contains
パラメータで検索を実行
G7日付・金額の範囲指定検索施行規則5条5項1号ハ
date_from
/
date_to
/
amount_min
/
amount_max
パラメータで検索を実行
G8組合せ検索施行規則5条5項1号ハ日付+取引先+金額を組み合わせた検索を実行
#RequirementRegulationCheck Method
G1Availability of system-related documentsArticle 2, Paragraph 2, Item 1 of the Enforcement RegulationsVerify the existence of the
docs/system-overview.md
file
G2Ensuring readabilityArticle 2, Paragraph 2, Item 2 of the Enforcement RegulationsExecute
shinkoku ledger trial-balance --db-path <db> --fiscal-year <year>
and confirm normal output
G3Download supportArticle 2, Paragraph 2, Item 3 of the Enforcement RegulationsExecute
shinkoku ledger search --db-path <db> --input <params> --format csv
and confirm CSV output
G4Correction/deletion historyArticle 5, Paragraph 5, Item 1(a) of the Enforcement RegulationsExecute
shinkoku ledger audit-log --db-path <db>
and confirm the table function works
G5Ensuring interrelatednessArticle 5, Paragraph 5, Item 1(b) of the Enforcement RegulationsExecute
shinkoku ledger general-ledger --db-path <db> --fiscal-year <year> --account-code <code>
and confirm the relationship between journals and general ledgers
G6Counterparty searchArticle 5, Paragraph 5, Item 1(c) of the Enforcement RegulationsExecute a search using the
counterparty_contains
parameter
G7Range search by date/amountArticle 5, Paragraph 5, Item 1(c) of the Enforcement RegulationsExecute a search using the
date_from
/
date_to
/
amount_min
/
amount_max
parameters
G8Combined searchArticle 5, Paragraph 5, Item 1(c) of the Enforcement RegulationsExecute a combined search of date + counterparty + amount

診断手順

Diagnosis Procedure

  1. G1:
    docs/system-overview.md
    の存在を確認する
  2. G2: 残高試算表を生成する
    bash
    shinkoku ledger trial-balance --db-path <db> --fiscal-year <year>
  3. G3: 仕訳をCSV形式で出力する
    bash
    shinkoku ledger search --db-path <db> --input <params> --format csv
    (params には
    {"fiscal_year": <year>, "limit": 5}
    を指定)
  4. G4: 監査ログを取得する
    bash
    shinkoku ledger audit-log --db-path <db>
  5. G5: 任意の勘定科目で総勘定元帳を出力する(仕訳が存在する科目を使用)
    bash
    shinkoku ledger general-ledger --db-path <db> --fiscal-year <year> --account-code <code>
  6. G6-G8: 検索機能のテスト
    bash
    # G6: 取引先検索
    shinkoku ledger search --db-path <db> --input <params>
    # params: {"fiscal_year": <year>, "counterparty_contains": "<取引先名の一部>"}
    
    # G7: 範囲指定検索
    # params: {"fiscal_year": <year>, "date_from": "<開始日>", "date_to": "<終了日>", "amount_min": 1, "amount_max": 1000000}
    
    # G8: 組合せ検索
    # params: {"fiscal_year": <year>, "date_from": "...", "counterparty_contains": "...", "amount_min": 1}
  1. G1: Verify the existence of
    docs/system-overview.md
  2. G2: Generate a trial balance
    bash
    shinkoku ledger trial-balance --db-path <db> --fiscal-year <year>
  3. G3: Output journals in CSV format
    bash
    shinkoku ledger search --db-path <db> --input <params> --format csv
    (Specify
    {"fiscal_year": <year>, "limit": 5}
    for params)
  4. G4: Obtain audit logs
    bash
    shinkoku ledger audit-log --db-path <db>
  5. G5: Output the general ledger for any account (use an account with existing journals)
    bash
    shinkoku ledger general-ledger --db-path <db> --fiscal-year <year> --account-code <code>
  6. G6-G8: Test search functions
    bash
    # G6: Counterparty search
    shinkoku ledger search --db-path <db> --input <params>
    # params: {"fiscal_year": <year>, "counterparty_contains": "<part of counterparty name>"}
    
    # G7: Range search
    # params: {"fiscal_year": <year>, "date_from": "<start date>", "date_to": "<end date>", "amount_min": 1, "amount_max": 1000000}
    
    # G8: Combined search
    # params: {"fiscal_year": <year>, "date_from": "...", "counterparty_contains": "...", "amount_min": 1}

サマリー出力形式

Summary Output Format

診断結果を以下のテーブル形式で出力する:
undefined
Present the diagnosis results in the following table format:
undefined

優良な電子帳簿 コンプライアンス診断結果

Excellent Electronic Bookkeeping Compliance Diagnosis Results

#要件条文結果備考
G1システム関係書類施行規則2条2項1号✓ / ✗...
G2見読可能性施行規則2条2項2号✓ / ✗...
G3ダウンロード対応施行規則2条2項3号✓ / ✗...
G4訂正・削除履歴施行規則5条5項1号イ✓ / ✗...
G5相互関連性施行規則5条5項1号ロ✓ / ✗...
G6取引先検索施行規則5条5項1号ハ✓ / ✗...
G7範囲指定検索施行規則5条5項1号ハ✓ / ✗...
G8組合せ検索施行規則5条5項1号ハ✓ / ✗...

不適合項目がある場合は、対応方法を案内する。

---
#RequirementRegulationResultRemarks
G1System-related documentsArticle 2, Paragraph 2, Item 1 of the Enforcement Regulations✓ / ✗...
G2ReadabilityArticle 2, Paragraph 2, Item 2 of the Enforcement Regulations✓ / ✗...
G3Download supportArticle 2, Paragraph 2, Item 3 of the Enforcement Regulations✓ / ✗...
G4Correction/deletion historyArticle 5, Paragraph 5, Item 1(a) of the Enforcement Regulations✓ / ✗...
G5InterrelatednessArticle 5, Paragraph 5, Item 1(b) of the Enforcement Regulations✓ / ✗...
G6Counterparty searchArticle 5, Paragraph 5, Item 1(c) of the Enforcement Regulations✓ / ✗...
G7Range searchArticle 5, Paragraph 5, Item 1(c) of the Enforcement Regulations✓ / ✗...
G8Combined searchArticle 5, Paragraph 5, Item 1(c) of the Enforcement Regulations✓ / ✗...

If there are non-compliant items, guide the user on how to address them.

---

Step 2: エビデンス出力(任意)

Step 2: Evidence Output (Optional)

ユーザーが「詳細を確認」「エビデンスを出力」と依頼した場合に実行する。
Execute this if the user requests "Check details" or "Output evidence".

(a) 帳簿出力

(a) Book Output

以下のコマンドで各帳簿を出力し、テーブル形式でユーザーに提示する:
bash
undefined
Output each book using the following commands and present them to the user in table format:
bash
undefined

残高試算表

Trial balance

shinkoku ledger trial-balance --db-path <db> --fiscal-year <year>
shinkoku ledger trial-balance --db-path <db> --fiscal-year <year>

損益計算書

Profit and loss statement

shinkoku ledger pl --db-path <db> --fiscal-year <year>
shinkoku ledger pl --db-path <db> --fiscal-year <year>

貸借対照表

Balance sheet

shinkoku ledger bs --db-path <db> --fiscal-year <year>
shinkoku ledger bs --db-path <db> --fiscal-year <year>

総勘定元帳(主要科目)

General ledger (main accounts)

shinkoku ledger general-ledger --db-path <db> --fiscal-year <year> --account-code <code>

CSV出力も可能であることを案内:
```bash
shinkoku ledger general-ledger --db-path <db> --fiscal-year <year> --account-code <code>

Inform the user that CSV output is also possible:
```bash

CSV 形式で出力する場合は --format csv を追加

Add --format csv to output in CSV format

shinkoku ledger trial-balance --db-path <db> --fiscal-year <year> --format csv
undefined
shinkoku ledger trial-balance --db-path <db> --fiscal-year <year> --format csv
undefined

(b) 監査ログ

(b) Audit Logs

bash
shinkoku ledger audit-log --db-path <db> --fiscal-year <year>
変更履歴をテーブル形式で表示する。
bash
shinkoku ledger audit-log --db-path <db> --fiscal-year <year>
Display the change history in table format.

(c) 検索デモ

(c) Search Demo

日付範囲・金額範囲・取引先の各検索を実演し、検索機能が正常に動作することを確認する。
Demonstrate searches by date range, amount range, and counterparty to confirm the search functions operate normally.

(d) システム関係書類

(d) System-related Documents

docs/system-overview.md
の場所を案内する。必要に応じて内容を表示する。

Guide the user to the location of
docs/system-overview.md
. Display the content if necessary.

Step 3: 結果サマリー & 次のアクション

Step 3: Result Summary & Next Actions

全要件充足の場合

If All Requirements Are Met

undefined
undefined

診断結果: 全要件適合

Diagnosis Result: All Requirements Compliant

shinkoku は優良な電子帳簿の要件(施行規則第5条第5項)を 技術的に充足しています。
shinkoku technically satisfies the requirements for excellent electronic books (Article 5, Paragraph 5 of the Enforcement Regulations).

次のアクション

Next Actions

  1. 届出書の提出(未提出の場合)
    • 「国税関係帳簿の電磁的記録等による保存等に係る届出書」を所轄税務署に提出
  2. 定期的なバックアップの実施
  3. 帳簿データの7年間保存の確保
undefined
  1. Submit the notification (if not already submitted)
    • Submit the "Notification Concerning the Preservation of National Tax-Related Books via Electronic Records, etc." to the competent tax office
  2. Perform regular backups
  3. Ensure book data is preserved for 7 years
undefined

不足事項がある場合

If There Are Deficiencies

不足事項と対応アクションを一覧で表示する。
Display a list of deficiencies and corresponding actions.

免責事項

Disclaimer

> **注記**: 本システムは電子帳簿保存法施行規則第5条第5項に定める優良な電子帳簿の
> 技術的要件を満たすよう設計されています。令和3年度税制改正により事前承認制度は
> 廃止されており、JIIMA認証等の第三者認証は法令上の要件ではありません
> (ただし要件充足の確認手段として活用できます)。
> 優良な電子帳簿の保存の適用にあたっては、あらかじめ所轄税務署への届出書の
> 提出が必要です(電子帳簿保存法第8条第4項)。
> **Note**: This system is designed to meet the technical requirements for excellent electronic books specified in Article 5, Paragraph 5 of the Enforcement Regulations of the Electronic Bookkeeping Preservation Act. The prior approval system was abolished by the Reiwa 3 tax system reform, and third-party certifications such as JIIMA certification are not legal requirements (however, they can be used as a means to confirm compliance).
> To apply the preservation of excellent electronic books, prior submission of a notification to the competent tax office is required (Article 8, Paragraph 4 of the Electronic Bookkeeping Preservation Act).

制限事項

Limitations

> **制限事項**:
> - 監査ログ(journal_audit_log)はアプリケーション層で記録しており、
>   データベースの直接操作による変更は記録されません。
>   改ざん防止のためのデータベーストリガーは今後の対応予定です。
> - タイムスタンプは UTC で記録されています(JST への変換は今後対応予定)。
> - 操作者情報の記録は個人利用を前提としているため、現在は未実装です。
> **Limitations**:
> - Audit logs (journal_audit_log) are recorded at the application layer, so changes made via direct database operations are not recorded.
>   Database triggers for tamper prevention are planned for future implementation.
> - Timestamps are recorded in UTC (conversion to JST is planned for future implementation).
> - Operator information recording is not currently implemented, as the system is intended for personal use.