This commit is contained in:
admin
2026-02-21 10:51:25 +09:00
parent 584530937b
commit 3b028b8fc0
25 changed files with 1852 additions and 244 deletions

View File

@@ -9,14 +9,17 @@ def D(x) -> Decimal:
# 科目グループ定義(表示順序を制御)- PDFフォーマットに準拠
ACCOUNT_GROUPS = [
# 資産の部
("現金・預金合計", ["101", "102", "103", "104"]),
("流動資産合計", ["101", "102", "103", "104", "201", "202", "203", "204", "205"]),
("現金・預金合計", ["101", "102", "103", "104", "105"]),
("売上債権合計", ["201", "202"]),
("有価証券合計", ["301"]),
("棚卸資産合計", ["210"]),
("他流動資産合計", ["203", "204", "205", "206", "207", "208"]),
("流動資産合計", ["101", "102", "103", "104", "105", "201", "202", "203", "204", "205", "206", "207", "208", "210", "301"]),
("有形固定資産合計", ["401", "402", "403", "404", "405", "406", "407"]),
("無形固定資産合計", ["408"]),
("投資その他の資産合計", ["301", "410"]),
("固定資産合計", ["301", "401", "402", "403", "404", "405", "406", "407", "408", "410"]),
("資産合計", ["101", "102", "103", "104", "201", "202", "203", "204", "205", "301", "401", "402", "403", "404", "405", "406", "407", "408", "410"]),
("資産合計", ["101", "102", "103", "104", "105", "201", "202", "203", "204", "205", "206", "207", "208", "210", "301", "401", "402", "403", "404", "405", "406", "407", "408", "410"]),
# 負債の部
("仕入債務合計", ["501"]),
("流動負債合計", ["501", "502", "503", "504", "505", "506", "507", "508"]),
@@ -169,7 +172,7 @@ def fetch_trial_balance(date_from: str, date_to: str):
# 繰越利益の行を追加
result_accounts.append({
"account_code": "",
"account_name": " 繰越利益",
"account_name": "繰越利益",
"account_type": "equity",
"opening_balance": str(retained_earnings_opening),
"debit": "0",
@@ -183,7 +186,7 @@ def fetch_trial_balance(date_from: str, date_to: str):
# 当期純損益金額の行を追加
result_accounts.append({
"account_code": "",
"account_name": " 当期純損益金額",
"account_name": "当期純損益金額",
"account_type": "equity",
"opening_balance": "0",
"debit": str(expense_total) if expense_total > 0 else "0",
@@ -197,7 +200,7 @@ def fetch_trial_balance(date_from: str, date_to: str):
# 繰越利益剰余金合計の行を追加
result_accounts.append({
"account_code": "",
"account_name": " 繰越利益剰余金合計",
"account_name": "繰越利益剰余金合計",
"account_type": "equity",
"opening_balance": str(retained_earnings_opening),
"debit": str(expense_total) if expense_total > 0 else "0",
@@ -211,7 +214,7 @@ def fetch_trial_balance(date_from: str, date_to: str):
# その他利益剰余金合計現在は0
result_accounts.append({
"account_code": "",
"account_name": " その他利益剰余金合計",
"account_name": "その他利益剰余金合計",
"account_type": "equity",
"opening_balance": "0",
"debit": "0",