lucabook 0.2.10 → 0.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/exe/luca-book +121 -50
- data/lib/luca_book.rb +4 -0
- data/lib/luca_book/console.rb +7 -15
- data/lib/luca_book/dict.rb +10 -3
- data/lib/luca_book/import.rb +51 -43
- data/lib/luca_book/journal.rb +26 -22
- data/lib/luca_book/list.rb +138 -0
- data/lib/luca_book/setup.rb +23 -3
- data/lib/luca_book/state.rb +161 -100
- data/lib/luca_book/templates/base-jp.xbrl.erb +78 -0
- data/lib/luca_book/templates/dict-en.tsv +35 -31
- data/lib/luca_book/templates/dict-jp.tsv +163 -0
- data/lib/luca_book/util.rb +46 -0
- data/lib/luca_book/version.rb +1 -1
- metadata +6 -4
- data/lib/luca_book/report.rb +0 -3
- data/lib/luca_book/templates/dict-ja.tsv +0 -145
@@ -0,0 +1,78 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xbrli:xbrl xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jpfr-etax-di="http://xml.e-tax.nta.go.jp/jp/fr/etax/o/di/2013-03-25" xmlns:jpfr-oe="http://info.edinet-fsa.go.jp/jp/fr/gaap/o/oe/2012-01-25" xmlns:jppfs_cor="http://disclosure.edinet-fsa.go.jp/taxonomy/jppfs/2019-11-01/jppfs_cor">
|
3
|
+
<%# eTax spec Begin: conflict with EDINET %>
|
4
|
+
<xbrli:context_id="CurrentYearNonConsolidatedInstant">
|
5
|
+
<xbrli:entity>
|
6
|
+
<xbrli:identifier scheme="http://www.e-tax.nta.go.jp"><%= @company %></xbrli:identifier>
|
7
|
+
</xbrli:entity>
|
8
|
+
<xbrli:period>
|
9
|
+
<xbrli:instant><%= @end_date %></xbrli:instant>
|
10
|
+
</xbrli:period>
|
11
|
+
<xbrli:scenario>
|
12
|
+
<jpfr-oe:NonConsolidated />
|
13
|
+
</xbrli:scenario>
|
14
|
+
</xbrli:context>
|
15
|
+
|
16
|
+
<xbrli:context_id="CurrentYearNonConsolidatedDuration">
|
17
|
+
<xbrli:entity>
|
18
|
+
<xbrli:identifier scheme="http://www.e-tax.nta.go.jp"><%= @company %></xbrli:identifier>
|
19
|
+
</xbrli:entity>
|
20
|
+
<xbrli:period>
|
21
|
+
<xbrli:startDate><%= @start_date %></xbrli:startDate>
|
22
|
+
<xbrli:endDate><%= @end_date %></xbrli:endDate>
|
23
|
+
</xbrli:period>
|
24
|
+
<xbrli:scenario>
|
25
|
+
<jpfr-oe:NonConsolidated />
|
26
|
+
</xbrli:scenario>
|
27
|
+
</xbrli:context>
|
28
|
+
|
29
|
+
<xbrli:context_id="Prior1YearNonConsolidatedInstant">
|
30
|
+
<xbrli:entity>
|
31
|
+
<xbrli:identifier scheme="http://www.e-tax.nta.go.jp"><%= @company %></xbrli:identifier>
|
32
|
+
</xbrli:entity>
|
33
|
+
<xbrli:period>
|
34
|
+
<xbrli:instant><%= @previous_fy_end_date %></xbrli:instant>
|
35
|
+
</xbrli:period>
|
36
|
+
<xbrli:scenario>
|
37
|
+
<jpfr-oe:NonConsolidated />
|
38
|
+
</xbrli:scenario>
|
39
|
+
</xbrli:context>
|
40
|
+
<%# eTax spec End %>
|
41
|
+
|
42
|
+
<xbrli:unit id="JPY">
|
43
|
+
<xbrli:measure>iso4217:JPY</xbrli:measure>
|
44
|
+
</xbrli:unit>
|
45
|
+
|
46
|
+
<%# eTax spec Begin: extra items %>
|
47
|
+
<xbrli:context_id="DocumentInfo">
|
48
|
+
<xbrli:entity>
|
49
|
+
<xbrli:identifier scheme="http://www.e-tax.nta.go.jp"><%= @company %></xbrli:identifier>
|
50
|
+
</xbrli:entity>
|
51
|
+
<xbrli:period>
|
52
|
+
<xbrli:instant><%= @issue_date %></xbrli:instant>
|
53
|
+
</xbrli:period>
|
54
|
+
</xbrli:context>
|
55
|
+
<jpfr-etax-di:NonconsolidatedBalanceSheetsDocInfo contextRef="DocumentInfo"><%= @balance_sheet_selected %></jpfr-etax-di:NonconsolidatedBalanceSheetsDocInfo>
|
56
|
+
<jpfr-etax-di:ExtendedLinkRoleLabelBalanceSheets contextRef="DocumentInfo">http://www.xbrl.org/2003/role/link</jpfr-etax-di:ExtendedLinkRoleLabelBalanceSheets>
|
57
|
+
<jpfr-etax-di:ExtendedLinkRolePresentationBalanceSheets contextRef="DocumentInfo">http://xml.e-tax.nta.go.jp/jp/fr/etax/role/NonConsolidatedBalanceSheets</jpfr-etax-di:ExtendedLinkRolePresentationBalanceSheets>
|
58
|
+
<jpfr-etax-di:ContextIDEndOfPeriodBalanceSheets contextRef="DocumentInfo">CurrentYearNonConsolidatedInstant</jpfr-etax-di:ContextIDEndOfPeriodBalanceSheets>
|
59
|
+
|
60
|
+
<jpfr-etax-di:NonconsolidatedStatementsOfIncomeDocInfo contextRef="DocumentInfo"><%= @pl_selected %></jpfr-etax-di:NonconsolidatedStatementsOfIncomeDocInfo>
|
61
|
+
<jpfr-etax-di:ExtendedLinkRoleLabelStatementsOfIncome contextRef="DocumentInfo">http://www.xbrl.org/2003/role/link</jpfr-etax-di:ExtendedLinkRoleLabelStatementsOfIncome>
|
62
|
+
<jpfr-etax-di:ExtendedLinkRolePresentationStatementsOfIncome contextRef="DocumentInfo">http://xml.e-tax.nta.go.jp/jp/fr/etax/role/NonConsolidatedStatementsOfIncome</jpfr-etax-di:ExtendedLinkRolePresentationStatementsOfIncome>
|
63
|
+
<jpfr-etax-di:ContextIDPeriodStatementsOfIncome contextRef="DocumentInfo">CurrentYearNonConsolidatedDuration</jpfr-etax-di:ContextIDPeriodStatementsOfIncome>
|
64
|
+
|
65
|
+
|
66
|
+
<jpfr-etax-di:NonconsolidatedScheduleOfCostOfGoodsManufacturedDocInfo contextRef="DocumentInfo">false</jpfr-etax-di:NonconsolidatedScheduleOfCostOfGoodsManufacturedDocInfo>
|
67
|
+
<jpfr-etax-di:NonconsolidatedNotesDocInfo contextRef="DocumentInfo">false</jpfr-etax-di:NonconsolidatedNotesDocInfo>
|
68
|
+
|
69
|
+
<jpfr-etax-di:NonconsolidatedStatementsOfChangesInNetAssetsDocInfo contextRef="DocumentInfo"><%= @balance_sheet_selected %></jpfr-etax-di:NonconsolidatedStatementsOfChangesInNetAssetsDocInfo>
|
70
|
+
<jpfr-etax-di:ExtendedLinkRoleLabelStatementsOfChangesInNetAssets contextRef="DocumentInfo">http://www.xbrl.org/2003/role/link</jpfr-etax-di:ExtendedLinkRoleLabelStatementsOfChangesInNetAssets>
|
71
|
+
<jpfr-etax-di:ExtendedLinkRolePresentationStatementsOfChangesInNetAssets contextRef="DocumentInfo">http://xml.e-tax.nta.go.jp/jp/fr/etax/role/NonConsolidatedStatementsOfChangesInNetAssets</jpfr-etax-di:ExtendedLinkRolePresentationStatementsOfChangesInNetAssets>
|
72
|
+
<jpfr-etax-di:ContextIDBeginningOfPeriodStatementsOfChangesInNetAssets contextRef="DocumentInfo">Prior1YearNonConsolidatedInstant</jpfr-etax-di:ContextIDBeginningOfPeriodStatementsOfChangesInNetAssets>
|
73
|
+
<jpfr-etax-di:ContextIDPeriodStatementsOfChangesInNetAssets contextRef="DocumentInfo">CurrentYearNonConsolidatedDuration</jpfr-etax-di:ContextIDPeriodStatementsOfChangesInNetAssets>
|
74
|
+
<jpfr-etax-di:ContextIDEndOfPeriodStatementsOfChangesInNetAssets contextRef="DocumentInfo">CurrentYearNonConsolidatedInstant</jpfr-etax-di:ContextIDEndOfPeriodStatementsOfChangesInNetAssets>
|
75
|
+
<%# etax spec End %>
|
76
|
+
|
77
|
+
<%= @xbrl_entries %>
|
78
|
+
</xbrli:xbrl>
|
@@ -1,23 +1,19 @@
|
|
1
|
-
code label consumption_tax income_tax
|
1
|
+
code label xbrl_id consumption_tax income_tax
|
2
2
|
10 Current Assets
|
3
|
+
10XX UNSETTLED_IMPORT
|
3
4
|
110 Cash and cash equivalents
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
116 通知預金
|
10
|
-
117 納税準備預金
|
11
|
-
118 別段預金
|
12
|
-
120 Notes receivable
|
13
|
-
130 Accounts receivable - trade
|
5
|
+
1101 Saving accounts
|
6
|
+
1102 Checking accounts
|
7
|
+
111 Cash,us-gaap:Cash
|
8
|
+
120 Notes receivable,us-gaap:NotesReceivableGross
|
9
|
+
130 Accounts receivable - trade,us-gaap:AccountsReceivableGross
|
14
10
|
140 短期貸付金
|
15
11
|
150 未収入金
|
16
|
-
160
|
12
|
+
160 Inventory,us-gaap:InventoryGross
|
17
13
|
161 商品
|
18
14
|
162 製品
|
19
|
-
163
|
20
|
-
164
|
15
|
+
163 Inventory work in process,us-gaap:InventoryWorkInProcess
|
16
|
+
164 Supplies,us-gaap:Supplies
|
21
17
|
180 その他流動資産
|
22
18
|
181 前渡金
|
23
19
|
182 Prepaid expenses
|
@@ -26,17 +22,17 @@ code label consumption_tax income_tax
|
|
26
22
|
1D0 Deferred income tax
|
27
23
|
40 Fixed Assets
|
28
24
|
410 Tangible Assets
|
29
|
-
411 Buildings
|
25
|
+
411 Buildings,us-gaap:BuildingsAndImprovementsGross
|
30
26
|
412 Equipment
|
31
27
|
413 Machinery
|
32
28
|
414 Vehicles
|
33
29
|
415 Tools
|
34
30
|
416 Land
|
35
|
-
417 Construction in progress
|
31
|
+
417 Construction in progress,us-gaap:ConstructionInProgressGross
|
36
32
|
418 Ships
|
37
33
|
420 Intangible Assets
|
38
34
|
421 Software
|
39
|
-
422 Goodwill
|
35
|
+
422 Goodwill,us-gaap:Goodwill
|
40
36
|
423 Patents
|
41
37
|
424 借地権
|
42
38
|
425 商標権
|
@@ -55,10 +51,11 @@ code label consumption_tax income_tax
|
|
55
51
|
442 新株発行費
|
56
52
|
443 社債発行費
|
57
53
|
50 Current Liabilities
|
58
|
-
|
54
|
+
50XX UNSETTLED_IMPORT
|
55
|
+
510 Notes payable,us-gaap:NotesPayable
|
59
56
|
511 Accounts payable - trade
|
60
|
-
512 Short-term
|
61
|
-
513 Commercial paper
|
57
|
+
512 Short-term borrowings,us-gaap:ShortermBorrowings
|
58
|
+
513 Commercial paper,us-gaap:CommercialPaper
|
62
59
|
514 Accounts payable - other
|
63
60
|
515 Income taxes payable
|
64
61
|
516 未払消費税等
|
@@ -69,7 +66,7 @@ code label consumption_tax income_tax
|
|
69
66
|
51B Deferred tax liabilities
|
70
67
|
70 Long-term Liabilities
|
71
68
|
711 Debt securities
|
72
|
-
712 Loans payable
|
69
|
+
712 Loans payable,us-gaap:LoansPayable
|
73
70
|
713 退職給付引当金
|
74
71
|
714 Deferred tax liabilities
|
75
72
|
90 Net Assets
|
@@ -77,7 +74,7 @@ code label consumption_tax income_tax
|
|
77
74
|
911 Capital stock
|
78
75
|
912 Capital surplus
|
79
76
|
913 Retained earnings
|
80
|
-
914 Treasury stock
|
77
|
+
914 Treasury stock,us-gaap:TreasuryStockValue
|
81
78
|
920 評価換算差額等
|
82
79
|
921 有価証券評価差額金
|
83
80
|
922 為替換算調整勘定
|
@@ -91,33 +88,38 @@ B12 Parts
|
|
91
88
|
B13 Labor
|
92
89
|
BA Gross profit
|
93
90
|
C0 Operating expenses
|
94
|
-
C11
|
95
|
-
C12 Salaries
|
91
|
+
C11 Officers Compensation,us-gaap:OfficersCompensation
|
92
|
+
C12 Salaries,us-gaap:SalariesAndWages
|
96
93
|
C13 Bonuses
|
97
94
|
C14 役員賞与
|
98
95
|
C15 退職金
|
99
96
|
C16 Legal welfare
|
100
|
-
C17 Travel
|
101
|
-
C18 Communication
|
102
|
-
C19 Repairs
|
103
|
-
C1A Advertising
|
97
|
+
C17 Travel,us-gaap:TravelAndEntertainmentExpense
|
98
|
+
C18 Communication,us-gaap:Communication
|
99
|
+
C19 Repairs,us-gaap:CostOfPropertyRepairsAndMaintenance
|
100
|
+
C1A Advertising,us-gaap:AdvertisingExpense
|
104
101
|
C1B Entertainment
|
105
102
|
C1C Packing-and-freight
|
106
103
|
C1D Welfare
|
107
104
|
C1E Rents
|
108
105
|
C1F Utilities
|
109
|
-
C1G Supplies
|
106
|
+
C1G Supplies,us-gaap:SuppliesExpense
|
110
107
|
C1H Insurance
|
111
108
|
C1I Taxes
|
112
109
|
C1J 賃借料
|
113
110
|
C1K Books
|
114
111
|
C1L 貸倒損失
|
115
112
|
C1M 諸会費
|
116
|
-
C1N
|
113
|
+
C1N Fees and commisions,us-gaap:BankingFeesAndCommisions
|
117
114
|
C1O 外注費
|
118
|
-
C1P
|
115
|
+
C1P Depreciation
|
119
116
|
C1Q Miscellaneous
|
120
117
|
C1R 貸倒引当金繰入
|
118
|
+
C1S 支払報酬
|
119
|
+
C1T 研修費
|
120
|
+
C1U 採用費
|
121
|
+
C1V 業務委託費
|
122
|
+
C1W 会議費
|
121
123
|
CA Operating profit/loss
|
122
124
|
D0 営業外収益
|
123
125
|
D11 Interest income
|
@@ -142,4 +144,6 @@ G11 固定資産売却損
|
|
142
144
|
G12 固定資産除却損
|
143
145
|
G13 災害損失
|
144
146
|
GA Income before taxes
|
147
|
+
H0 Income Taxes
|
148
|
+
H11 Income Taxes Current
|
145
149
|
HA Net Income/Loss
|
@@ -0,0 +1,163 @@
|
|
1
|
+
code label xbrl_id consumption_tax income_tax
|
2
|
+
1 資産合計 jppfs_cor:AssetsAbstract
|
3
|
+
10 流動資産 jppfs_cor:CurrentAssetsAbstract
|
4
|
+
10XX UNSETTLED_IMPORT
|
5
|
+
110 現金及び預金 jppfs_cor:CashAndDeposits
|
6
|
+
1101 現金
|
7
|
+
1102 小口現金
|
8
|
+
1103 普通預金
|
9
|
+
1104 当座預金
|
10
|
+
1105 定期預金
|
11
|
+
1106 通知預金
|
12
|
+
1107 納税準備預金
|
13
|
+
1108 別段預金
|
14
|
+
120 受取手形 jppfs_cor:NotesReceivableTrade
|
15
|
+
130 売掛金 jppfs_cor:AccountsReceivableTrade
|
16
|
+
140 短期貸付金 jppfs_cor:ShortTermLoansReceivable
|
17
|
+
150 未収入金 jppfs_cor:AccountsReceivableOther
|
18
|
+
160 棚卸資産 jppfs_cor:Inventories
|
19
|
+
161 商品 jppfs_cor:Merchandize
|
20
|
+
162 製品 jppfs_cor:FinishedGoods
|
21
|
+
163 仕掛品 jppfs_cor:WorkInProcess
|
22
|
+
164 貯蔵品 jppfs_cor:Supplies
|
23
|
+
180 その他流動資産 jppfs_cor:OtherCA
|
24
|
+
181 前渡金 jppfs_cor:AdvancePaymentsTrade
|
25
|
+
182 前払費用 jppfs_cor:AdvancePaymentsOther
|
26
|
+
183 立替金 jppfs_cor:AdvancesPaid
|
27
|
+
184 仮払金 jppfs_cor:SuspensePayments
|
28
|
+
40 固定資産 jppfs_cor:NonCurrentAssetsAbstract
|
29
|
+
410 有形固定資産 jppfs_cor:PropertyPlantAndEquipmentAbstract
|
30
|
+
411 建物 jppfs_cor:Buildings
|
31
|
+
412 構築物 jppfs_cor:Structures
|
32
|
+
413 機械装置 jppfs_cor:MachineryAndEquipment
|
33
|
+
414 車両運搬具 jppfs_cor:Vehicles
|
34
|
+
415 工具器具備品 jppfs_cor:ToolsFurnitureAndFixtures
|
35
|
+
416 土地 jppfs_cor:Land
|
36
|
+
417 建設仮勘定 jppfs_cor:ConstructionInProgress
|
37
|
+
418 船舶 jppfs_cor:Vessels
|
38
|
+
420 無形固定資産 jppfs_cor:IntansibleAssetsAbstract
|
39
|
+
421 ソフトウェア jppfs_cor:Software
|
40
|
+
422 のれん jppfs_cor:Goodwill
|
41
|
+
423 特許権 jppfs_cor:PatentRight
|
42
|
+
424 借地権 jppfs_cor:LeaseholdRight
|
43
|
+
425 商標権 jppfs_cor:RightOfTrademark
|
44
|
+
426 電話加入権 jppfs_cor:TelephoneSubscriptionRight
|
45
|
+
430 投資その他の資産 jppfs_cor:InvestmentsAndOtherAssetsAbstract
|
46
|
+
431 投資有価証券 jppfs_cor:InvestmentSecurities
|
47
|
+
432 関係会社株式 jppfs_cor:StocksOfSubsidiariesAndAffiliates
|
48
|
+
433 長期貸付金 jppfs_cor:LongTermLoansReceivable
|
49
|
+
434 破産更正債権 jppfs_cor:ClaimsProvableInBankruptcyClaimsProvableInRehabilitationAndOther
|
50
|
+
435 長期前払費用 jppfs_cor:LongTermPrepaidExpenses
|
51
|
+
436 敷金保証金 jppfs_cor:LeaseAndGuaranteeDeposits
|
52
|
+
437 繰延税金資産 jppfs_cor:DiferredTaxAssets
|
53
|
+
440 繰延資産 jppfs_cor:DeferredAssets
|
54
|
+
441 開業費 jppfs_cor:BusinessCommencementExpensesDA
|
55
|
+
442 創立費 jppfs_cor:DeferredOrganisationExpensesDA
|
56
|
+
442 新株発行費 jppfs_cor:StockIssuanceCostDA
|
57
|
+
443 社債発行費 jppfs_cor:BondIssuanceCostDA
|
58
|
+
5 負債・純資産合計 jppfs_cor:LiabilitiesAndNetAssets
|
59
|
+
50 流動負債 jppfs_cor:CurrentLiabilitiesAbstract
|
60
|
+
50XX UNSETTLED_IMPORT
|
61
|
+
510 支払手形 jppfs_cor:NotePayableTrade
|
62
|
+
511 買掛金 jppfs_cor:AccountsPayableTrade
|
63
|
+
512 短期借入金 jppfs_cor:ShortTermLoansPayable
|
64
|
+
513 コマーシャルペーパー jppfs_cor:CommercialPapersLiabilities
|
65
|
+
514 未払金 jppfs_cor:AccountsPayableOther
|
66
|
+
515 未払法人税等 jppfs_cor:IncomeTaxesPayable
|
67
|
+
516 未払消費税等 jppfs_cor:AccruedConsumptionTaxes
|
68
|
+
517 未払費用 jppfs_cor:AccruedExpenses
|
69
|
+
518 前受金 jppfs_cor:AdvancesReceived
|
70
|
+
519 預り金 jppfs_cor:DepositsReceived
|
71
|
+
51A 仮受金 jppfs_cor:SuspenseReceipt
|
72
|
+
70 固定負債 jppfs_cor:NoncurrentLiabilitiesAbstract
|
73
|
+
711 社債 jppfs_cor:BondsPayable
|
74
|
+
712 長期借入金 jppfs_cor:LongTermLoansPayable
|
75
|
+
713 退職給付引当金 jppfs_cor:ProvisionForRetirementBenefits
|
76
|
+
714 繰延税金負債 jppfs_cor:DeferredTaxLiabilities
|
77
|
+
8ZZ 負債合計 jppfs_cor:LiabilitiesAbstract
|
78
|
+
91 株主資本 jppfs_cor:ShareholdersAbstract
|
79
|
+
911 資本金 jppfs_cor:CapitalStock
|
80
|
+
912 新株式申込証拠金 jppfs_cor:DepositForSubscriptionsToShares
|
81
|
+
913 資本剰余金 jppfs_cor:LegalCapitalSurplus
|
82
|
+
9131 資本準備金 jppfs_cor:LegalCapitalSurplus
|
83
|
+
9132 その他資本剰余金 jppfs_cor:OtherCapitalSurplus
|
84
|
+
914 利益剰余金 jppfs_cor:RetainedEarnings
|
85
|
+
9141 利益準備金 jppfs_cor:LegalRetainedEarnings
|
86
|
+
9142 その他利益剰余金 jppfs_cor:OtherRetainedEarningsAbstract
|
87
|
+
915 自己株式 jppfs_cor:TreasuryStock
|
88
|
+
916 自己株式申込証拠金 jppfs_cor:DepositForSubscriptionsToTreasuryStock
|
89
|
+
92 評価換算差額等 jppfs_cor:ValuationAndTranslationAdjustments
|
90
|
+
921 有価証券評価差額金 jppfs_cor:ValuationDifferenceOnAvailableForSaleSecurities
|
91
|
+
922 為替換算調整勘定 jppfs_cor:ForeignCurrencyTranslationAdjustment
|
92
|
+
93 新株予約権 jppfs_cor:SubscriptionRightsToShares
|
93
|
+
940 非支配株主持分 jppfs_cor:NonControllingInterests
|
94
|
+
9ZZ 純資産合計 jppfs_cor:NetAssetsAbstract
|
95
|
+
A0 売上 jppfs_cor:NetSalesAbstract
|
96
|
+
A11 売上高 jppfs_cor:NetSales
|
97
|
+
B0 売上原価 jppfs_cor:CostOfSalesAbstract
|
98
|
+
B11 仕入 jppfs_cor:TotalPurchaseOfGoods
|
99
|
+
B12 材料費 jppfs_cor:CostOfRawMaterialSalesCOSExpOA
|
100
|
+
B13 当期製品製造原価 jppfs_cor:CostOfProductsManufactured
|
101
|
+
B131 労務費
|
102
|
+
BA 粗利益 jppfs_cor:GrossProfit
|
103
|
+
C0 販売費及び一般管理費 jppfs_cor:SellingGeneralAndAdministrativeExpensesAbstract
|
104
|
+
C11 役員報酬 jppfs_cor:DirectorsCompensationsSGA
|
105
|
+
C111 役員賞与
|
106
|
+
C12 給料手当 jppfs_cor:SalariesSGA
|
107
|
+
C13 賞与 jppfs_cor:BonusesSGA
|
108
|
+
C14 賃金 jpfrs_cor:WagesSGA
|
109
|
+
C15 退職金 jppfs_cor:RetirementPaymentsSGA
|
110
|
+
C16 法定福利費 jppfs_cor:LegalWelfareExpensesSGA
|
111
|
+
C17 旅費交通費 jppfs_cor:TravellingAndTransportationExpensesSGA
|
112
|
+
C18 通信費 jppfs_cor:CommunicationExpensesSGA
|
113
|
+
C19 修繕費 jppfs_cor:RepairExpensesSGA
|
114
|
+
C1A 広告宣伝費 jppfs_cor:AdvertisingExpensesSGA
|
115
|
+
C1B 接待交際費 jppfs_cor:EntertainmentExpensesSGA
|
116
|
+
C1C 荷造運賃 jppfs_cor:FreightageAndPackingExpensesSGA
|
117
|
+
C1D 福利厚生費 jppfs_cor:WelfareExpensesSGA
|
118
|
+
C1E 地代家賃 jppfs_cor:RentsSGA
|
119
|
+
C1F 水道光熱費 jppfs_cor:UtilitiesExpensesSGA
|
120
|
+
C1G 消耗品費 jppfs_cor:SuppliesExpensesSGA
|
121
|
+
C1H 保険料 jppfs_cor:InsuranceExpensesSGA
|
122
|
+
C1I 租税公課 jppfs_cor:TaxesAndDuesSGA
|
123
|
+
C1J 賃借料 jppfs_cor:RentExpensesSGA
|
124
|
+
C1K 新聞図書費 jppfs_cor:BookExpensesSGA
|
125
|
+
C1L 貸倒損失 jppfs_cor:BadDebtsExpensesSGA
|
126
|
+
C1M 諸会費 jppfs_cor:MembershipFeeSGA
|
127
|
+
C1N 支払手数料 jppfs_cor:CommissionFeeSGA
|
128
|
+
C1O 外注費 jppfs_cor:SubcontructExpensesSGA
|
129
|
+
C1P 減価償却費 jppfs_cor:DepreciationSGA
|
130
|
+
C1Q 雑費 jppfs_cor:MiscellaneousExpensesSGA
|
131
|
+
C1R 貸倒引当金繰入 jppfs_cor:ProvisionOfAllowanceForDebtfulAccountsSGA
|
132
|
+
C1S 支払報酬 jppfs_cor:CompensationsSGA
|
133
|
+
C1T 研修費 jppfs_cor:TrainingExpensesSGA
|
134
|
+
C1U 採用費 jppfs_cor:RecruitingExpensesSGA
|
135
|
+
C1V 業務委託費 jppfs_cor:BusinessConsignmentExpensesSGA
|
136
|
+
C1W 会議費 jppfs_cor:ConferenceExpensesSGA
|
137
|
+
CA 営業利益 jppfs_cor:OperatingIncome
|
138
|
+
D0 営業外収益 jppfs_cor:NonOperatingIncomeAbstract
|
139
|
+
D11 受取利息 jppfs_cor:InterestIncomeNOI
|
140
|
+
D12 受取配当金 jppfs_cor:DividendsIncomeNOI
|
141
|
+
D13 有価証券売却益 jppfs_cor:GainOnSalesOfSecuritiesNOI
|
142
|
+
D14 有価証券利息 jppfs_cor:InterestsOnSecuritiesNOI
|
143
|
+
D15 為替差益 jppfs_cor:ForeignExchangeGainsNOI
|
144
|
+
D16 雑収入 jppfs_cor:MiscellaneousIncomeNOI
|
145
|
+
E0 営業外費用 jppfs_cor:NonOperatingExpensesAbstract
|
146
|
+
E11 支払利息 jppfs_cor:InterestExpensesNOE
|
147
|
+
E12 手形売却損 jppfs_cor:LossOnSalesOfNotesPayableNOE
|
148
|
+
E13 有価証券売却損 jppfs_cor:LossOnSalesOfSecuritiesNOE
|
149
|
+
E14 有価証券評価損 jppfs_cor:LossOnValuationOfSecuritiesNOE
|
150
|
+
E15 為替差損 jppfs_cor:ForeignExchangeLossesNOE
|
151
|
+
E16 雑損失 jppfs_cor:MiscellaneousLossNOE
|
152
|
+
EA 経常利益 jppfs_cor:OrdinaryIncome
|
153
|
+
F0 特別利益 jppfs_cor:ExtraordinaryIncomeAbstract
|
154
|
+
F11 固定資産売却益 jppfs_cor:GainOnSalesOfNoncurrentAssetsEI
|
155
|
+
F12 償却債権取立益 jppfs_cor:GainOnBadDebtsRecoveredEI
|
156
|
+
G0 特別損失 jppfs_cor:ExtraordinaryLossAbstract
|
157
|
+
G11 固定資産売却損 jppfs_cor:LossOnSalesOfNoncurrentAssetsEL
|
158
|
+
G12 固定資産除却損 jppfs_cor:LossOnRetirementOfNoncurrentAssetsEL
|
159
|
+
G13 災害損失 jppfs_cor:LossOnDisasterEL
|
160
|
+
GA 税引前利益 jppfs_cor:IncomeBeforeIncomeTaxes
|
161
|
+
H0 法人税等 jppfs_cor:IncomeTaxes
|
162
|
+
H11 法人税、住民税及び事業税 jppfs_cor:IncomeTaxesCurrent
|
163
|
+
HA 当期利益 jppfs_cor:ProfitLoss
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bigdecimal'
|
4
|
+
require 'luca_support/config'
|
5
|
+
|
6
|
+
module LucaBook
|
7
|
+
module Util
|
8
|
+
module_function
|
9
|
+
|
10
|
+
def validate_balance(items)
|
11
|
+
d = items.select { |k, _v| /^[1-4]/.match(k) }
|
12
|
+
.inject(BigDecimal('0')) { |sum, (_k, v)| sum + BigDecimal(v[:balance] || 0) }
|
13
|
+
c = items.select { |k, _v| /^[5-9]/.match(k) }
|
14
|
+
.inject(BigDecimal('0')) { |sum, (_k, v)| sum + BigDecimal(v[:balance] || 0) }
|
15
|
+
[d - c, { debit: d, credit: c }]
|
16
|
+
end
|
17
|
+
|
18
|
+
# items assumed as bellows:
|
19
|
+
# [{ code: '113', amount: 1000 }, ... ]
|
20
|
+
#
|
21
|
+
def diff_by_code(items, code)
|
22
|
+
calc_diff(amount_by_code(items, code), code)
|
23
|
+
end
|
24
|
+
|
25
|
+
def amount_by_code(items, code)
|
26
|
+
items
|
27
|
+
.select { |item| item.dig(:code) == code }
|
28
|
+
.inject(BigDecimal('0')) { |sum, item| sum + item[:amount] }
|
29
|
+
end
|
30
|
+
|
31
|
+
def calc_diff(num, code)
|
32
|
+
num * pn_debit(code.to_s)
|
33
|
+
end
|
34
|
+
|
35
|
+
def pn_debit(code)
|
36
|
+
case code
|
37
|
+
when /^[0-4BCEGH]/
|
38
|
+
1
|
39
|
+
when /^[5-9ADF]/
|
40
|
+
-1
|
41
|
+
else
|
42
|
+
nil
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/luca_book/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lucabook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuma Takahiro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lucarecord
|
@@ -83,11 +83,13 @@ files:
|
|
83
83
|
- lib/luca_book/dict.rb
|
84
84
|
- lib/luca_book/import.rb
|
85
85
|
- lib/luca_book/journal.rb
|
86
|
-
- lib/luca_book/
|
86
|
+
- lib/luca_book/list.rb
|
87
87
|
- lib/luca_book/setup.rb
|
88
88
|
- lib/luca_book/state.rb
|
89
|
+
- lib/luca_book/templates/base-jp.xbrl.erb
|
89
90
|
- lib/luca_book/templates/dict-en.tsv
|
90
|
-
- lib/luca_book/templates/dict-
|
91
|
+
- lib/luca_book/templates/dict-jp.tsv
|
92
|
+
- lib/luca_book/util.rb
|
91
93
|
- lib/luca_book/version.rb
|
92
94
|
homepage: https://github.com/chumaltd/luca/tree/master/lucabook
|
93
95
|
licenses:
|