lucabook 0.2.8 → 0.2.17
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 +90 -46
- data/lib/luca_book.rb +5 -0
- data/lib/luca_book/console.rb +7 -15
- data/lib/luca_book/dict.rb +10 -3
- data/lib/luca_book/import.rb +53 -45
- data/lib/luca_book/journal.rb +26 -22
- data/lib/luca_book/list.rb +138 -0
- data/lib/luca_book/setup.rb +39 -0
- data/lib/luca_book/state.rb +151 -98
- data/lib/luca_book/templates/base-jp.xbrl.erb +78 -0
- data/lib/luca_book/templates/dict-en.tsv +142 -0
- data/lib/luca_book/templates/dict-jp.tsv +158 -0
- data/lib/luca_book/util.rb +46 -0
- data/lib/luca_book/version.rb +1 -1
- metadata +24 -4
@@ -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>
|
@@ -0,0 +1,142 @@
|
|
1
|
+
code label xbrl_id consumption_tax income_tax
|
2
|
+
10 Current Assets
|
3
|
+
10XX UNSETTLED_IMPORT
|
4
|
+
110 Cash and cash equivalents
|
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
|
10
|
+
140 短期貸付金
|
11
|
+
150 未収入金
|
12
|
+
160 Inventory,us-gaap:InventoryGross
|
13
|
+
161 商品
|
14
|
+
162 製品
|
15
|
+
163 Inventory work in process,us-gaap:InventoryWorkInProcess
|
16
|
+
164 Supplies,us-gaap:Supplies
|
17
|
+
180 その他流動資産
|
18
|
+
181 前渡金
|
19
|
+
182 Prepaid expenses
|
20
|
+
183 立替金
|
21
|
+
184 仮払金
|
22
|
+
1D0 Deferred income tax
|
23
|
+
40 Fixed Assets
|
24
|
+
410 Tangible Assets
|
25
|
+
411 Buildings,us-gaap:BuildingsAndImprovementsGross
|
26
|
+
412 Equipment
|
27
|
+
413 Machinery
|
28
|
+
414 Vehicles
|
29
|
+
415 Tools
|
30
|
+
416 Land
|
31
|
+
417 Construction in progress,us-gaap:ConstructionInProgressGross
|
32
|
+
418 Ships
|
33
|
+
420 Intangible Assets
|
34
|
+
421 Software
|
35
|
+
422 Goodwill,us-gaap:Goodwill
|
36
|
+
423 Patents
|
37
|
+
424 借地権
|
38
|
+
425 商標権
|
39
|
+
426 電話加入権
|
40
|
+
430 Investments
|
41
|
+
431 Investment securities
|
42
|
+
432 Associated companies
|
43
|
+
433 長期貸付金
|
44
|
+
434 破産更正債権
|
45
|
+
435 長期前払費用
|
46
|
+
436 敷金保証金
|
47
|
+
437 Deferred income tax
|
48
|
+
440 繰延資産
|
49
|
+
441 開業費
|
50
|
+
442 創立費
|
51
|
+
442 新株発行費
|
52
|
+
443 社債発行費
|
53
|
+
50 Current Liabilities
|
54
|
+
50XX UNSETTLED_IMPORT
|
55
|
+
510 Notes payable,us-gaap:NotesPayable
|
56
|
+
511 Accounts payable - trade
|
57
|
+
512 Short-term borrowings,us-gaap:ShortermBorrowings
|
58
|
+
513 Commercial paper,us-gaap:CommercialPaper
|
59
|
+
514 Accounts payable - other
|
60
|
+
515 Income taxes payable
|
61
|
+
516 未払消費税等
|
62
|
+
517 Accrued expense
|
63
|
+
518 Recipt in advance
|
64
|
+
519 Receipt in trust
|
65
|
+
51A 仮受金
|
66
|
+
51B Deferred tax liabilities
|
67
|
+
70 Long-term Liabilities
|
68
|
+
711 Debt securities
|
69
|
+
712 Loans payable,us-gaap:LoansPayable
|
70
|
+
713 退職給付引当金
|
71
|
+
714 Deferred tax liabilities
|
72
|
+
90 Net Assets
|
73
|
+
910 Owners' Equity
|
74
|
+
911 Capital stock
|
75
|
+
912 Capital surplus
|
76
|
+
913 Retained earnings
|
77
|
+
914 Treasury stock,us-gaap:TreasuryStockValue
|
78
|
+
920 評価換算差額等
|
79
|
+
921 有価証券評価差額金
|
80
|
+
922 為替換算調整勘定
|
81
|
+
930 新株予約権
|
82
|
+
940 Non-controlling interest
|
83
|
+
A0 Revenue
|
84
|
+
A11 Amount of Sales
|
85
|
+
B0 Cost of goods sold
|
86
|
+
B11 Purchases
|
87
|
+
B12 Parts
|
88
|
+
B13 Labor
|
89
|
+
BA Gross profit
|
90
|
+
C0 Operating expenses
|
91
|
+
C11 Officers Compensation,us-gaap:OfficersCompensation
|
92
|
+
C12 Salaries,us-gaap:SalariesAndWages
|
93
|
+
C13 Bonuses
|
94
|
+
C14 役員賞与
|
95
|
+
C15 退職金
|
96
|
+
C16 Legal welfare
|
97
|
+
C17 Travel,us-gaap:TravelAndEntertainmentExpense
|
98
|
+
C18 Communication,us-gaap:Communication
|
99
|
+
C19 Repairs,us-gaap:CostOfPropertyRepairsAndMaintenance
|
100
|
+
C1A Advertising,us-gaap:AdvertisingExpense
|
101
|
+
C1B Entertainment
|
102
|
+
C1C Packing-and-freight
|
103
|
+
C1D Welfare
|
104
|
+
C1E Rents
|
105
|
+
C1F Utilities
|
106
|
+
C1G Supplies,us-gaap:SuppliesExpense
|
107
|
+
C1H Insurance
|
108
|
+
C1I Taxes
|
109
|
+
C1J 賃借料
|
110
|
+
C1K Books
|
111
|
+
C1L 貸倒損失
|
112
|
+
C1M 諸会費
|
113
|
+
C1N Fees and commisions,us-gaap:BankingFeesAndCommisions
|
114
|
+
C1O 外注費
|
115
|
+
C1P Depreciation
|
116
|
+
C1Q Miscellaneous
|
117
|
+
C1R 貸倒引当金繰入
|
118
|
+
CA Operating profit/loss
|
119
|
+
D0 営業外収益
|
120
|
+
D11 Interest income
|
121
|
+
D12 受取配当金
|
122
|
+
D13 有価証券売却益
|
123
|
+
D14 有価証券利息
|
124
|
+
D15 為替差益
|
125
|
+
D16 Miscellaneous income
|
126
|
+
E0 営業外損失
|
127
|
+
E11 Interest expenses
|
128
|
+
E12 手形売却損
|
129
|
+
E13 有価証券売却損
|
130
|
+
E14 有価証券評価損
|
131
|
+
E15 為替差損
|
132
|
+
E16 Miscellaneous losses
|
133
|
+
EA 経常利益
|
134
|
+
F0 特別利益
|
135
|
+
F11 固定資産売却益
|
136
|
+
F12 償却債権取立益
|
137
|
+
G0 特別損失
|
138
|
+
G11 固定資産売却損
|
139
|
+
G12 固定資産除却損
|
140
|
+
G13 災害損失
|
141
|
+
GA Income before taxes
|
142
|
+
HA Net Income/Loss
|
@@ -0,0 +1,158 @@
|
|
1
|
+
code label xbrl_id consumption_tax income_tax
|
2
|
+
1 資産合計
|
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 負債・純資産合計
|
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 負債合計
|
78
|
+
90 純資産 jppfs_cor:NetAssetsAbstract
|
79
|
+
91 株主資本 jppfs_cor:ShareholdersAbstract
|
80
|
+
911 資本金 jppfs_cor:CapitalStock
|
81
|
+
912 新株式申込証拠金
|
82
|
+
913 資本剰余金 jppfs_cor:LegalCapitalSurplus
|
83
|
+
9131 資本準備金
|
84
|
+
9132 その他資本剰余金
|
85
|
+
914 利益剰余金 jppfs_cor:RetainedEarnings
|
86
|
+
9141 利益準備金
|
87
|
+
9142 その他利益剰余金
|
88
|
+
915 自己株式 jppfs_cor:TreasuryStock
|
89
|
+
916 自己株式申込証拠金
|
90
|
+
92 評価換算差額等 jppfs_cor:ValuationAndTranslationAdjustments
|
91
|
+
921 有価証券評価差額金 jppfs_cor:ValuationDifferenceOnAvailableForSaleSecurities
|
92
|
+
922 為替換算調整勘定 jppfs_cor:ForeignCurrencyTranslationAdjustment
|
93
|
+
93 新株予約権 jppfs_cor:SubscriptionRightsToShares
|
94
|
+
940 非支配株主持分 jppfs_cor:NonControllingInterests
|
95
|
+
9ZZ 純資産合計
|
96
|
+
A0 売上 jppfs_cor:NetSalesAbstract
|
97
|
+
A11 売上高 jppfs_cor:NetSales
|
98
|
+
B0 売上原価 jppfs_cor:CostOfSalesAbstract
|
99
|
+
B11 仕入 jppfs_cor:TotalPurchaseOfGoods
|
100
|
+
B12 材料費 jppfs_cor:CostOfRawMaterialSalesCOSExpOA
|
101
|
+
B13 当期製品製造原価 jppfs_cor:CostOfProductsManufactured
|
102
|
+
B131 労務費
|
103
|
+
BA 粗利益 jppfs_cor:GrossProfit
|
104
|
+
C0 販売費及び一般管理費 jppfs_cor:SellingGeneralAndAdministrativeExpensesAbstract
|
105
|
+
C11 役員報酬 jppfs_cor:DirectorsCompensationsSGA
|
106
|
+
C111 役員賞与
|
107
|
+
C12 給料手当 jppfs_cor:SalariesSGA
|
108
|
+
C13 賞与 jppfs_cor:BonusesSGA
|
109
|
+
C14 賃金 jpfrs_cor:WagesSGA
|
110
|
+
C15 退職金 jppfs_cor:RetirementPaymentsSGA
|
111
|
+
C16 法定福利費 jppfs_cor:LegalWelfareExpensesSGA
|
112
|
+
C17 旅費交通費 jppfs_cor:TravellingAndTransportationExpensesSGA
|
113
|
+
C18 通信費 jppfs_cor:CommunicationExpensesSGA
|
114
|
+
C19 修繕費 jppfs_cor:RepairExpensesSGA
|
115
|
+
C1A 広告宣伝費 jppfs_cor:AdvertisingExpensesSGA
|
116
|
+
C1B 接待交際費 jppfs_cor:EntertainmentExpensesSGA
|
117
|
+
C1C 荷造運賃 jppfs_cor:FreightageAndPackingExpensesSGA
|
118
|
+
C1D 福利厚生費 jppfs_cor:WelfareExpensesSGA
|
119
|
+
C1E 地代家賃 jppfs_cor:RentsSGA
|
120
|
+
C1F 水道光熱費 jppfs_cor:UtilitiesExpensesSGA
|
121
|
+
C1G 消耗品費 jppfs_cor:SuppliesExpensesSGA
|
122
|
+
C1H 保険料 jppfs_cor:InsuranceExpensesSGA
|
123
|
+
C1I 租税公課 jppfs_cor:TaxesAndDuesSGA
|
124
|
+
C1J 賃借料 jppfs_cor:RentExpensesSGA
|
125
|
+
C1K 新聞図書費 jppfs_cor:BookExpensesSGA
|
126
|
+
C1L 貸倒損失 jppfs_cor:BadDebtsExpensesSGA
|
127
|
+
C1M 諸会費 jppfs_cor:MembershipFeeSGA
|
128
|
+
C1N 支払手数料 jppfs_cor:CommissionFeeSGA
|
129
|
+
C1O 外注費 jppfs_cor:SubcontructExpensesSGA
|
130
|
+
C1P 減価償却費 jppfs_cor:DepreciationSGA
|
131
|
+
C1Q 雑費 jppfs_cor:MiscellaneousExpensesSGA
|
132
|
+
C1R 貸倒引当金繰入 jppfs_cor:ProvisionOfAllowanceForDebtfulAccountsSGA
|
133
|
+
C1S 支払報酬
|
134
|
+
CA 営業利益 jppfs_cor:OperatingIncome
|
135
|
+
D0 営業外収益 jppfs_cor:NonOperatingIncomeAbstract
|
136
|
+
D11 受取利息 jppfs_cor:InterestIncomeNOI
|
137
|
+
D12 受取配当金 jppfs_cor:DividendsIncomeNOI
|
138
|
+
D13 有価証券売却益 jppfs_cor:GainOnSalesOfSecuritiesNOI
|
139
|
+
D14 有価証券利息 jppfs_cor:InterestsOnSecuritiesNOI
|
140
|
+
D15 為替差益 jppfs_cor:ForeignExchangeGainsNOI
|
141
|
+
D16 雑収入 jppfs_cor:MiscellaneousIncomeNOI
|
142
|
+
E0 営業外費用 jppfs_cor:NonOperatingExpensesAbstract
|
143
|
+
E11 支払利息 jppfs_cor:InterestExpensesNOE
|
144
|
+
E12 手形売却損 jppfs_cor:LossOnSalesOfNotesPayableNOE
|
145
|
+
E13 有価証券売却損 jppfs_cor:LossOnSalesOfSecuritiesNOE
|
146
|
+
E14 有価証券評価損 jppfs_cor:LossOnValuationOfSecuritiesNOE
|
147
|
+
E15 為替差損 jppfs_cor:ForeignExchangeLossesNOE
|
148
|
+
E16 雑損失 jppfs_cor:MiscellaneousLossNOE
|
149
|
+
EA 経常利益 jppfs_cor:OrdinaryIncome
|
150
|
+
F0 特別利益 jppfs_cor:ExtraordinaryIncomeAbstract
|
151
|
+
F11 固定資産売却益 jppfs_cor:GainOnSalesOfNoncurrentAssetsEI
|
152
|
+
F12 償却債権取立益 jppfs_cor:GainOnBadDebtsRecoveredEI
|
153
|
+
G0 特別損失 jppfs_cor:ExtraordinaryLossAbstract
|
154
|
+
G11 固定資産売却損 jppfs_cor:LossOnSalesOfNoncurrentAssetsEL
|
155
|
+
G12 固定資産除却損 jppfs_cor:LossOnRetirementOfNoncurrentAssetsEL
|
156
|
+
G13 災害損失 jppfs_cor:LossOnDisasterEL
|
157
|
+
GA 税引前純利益 jppfs_cor:IncomeBeforeIncomeTaxes
|
158
|
+
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.17
|
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
|
+
date: 2020-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lucarecord
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.17'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.17'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 12.3.3
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 12.3.3
|
55
69
|
description: 'Book keep
|
56
70
|
|
57
71
|
'
|
@@ -69,8 +83,14 @@ files:
|
|
69
83
|
- lib/luca_book/dict.rb
|
70
84
|
- lib/luca_book/import.rb
|
71
85
|
- lib/luca_book/journal.rb
|
86
|
+
- lib/luca_book/list.rb
|
72
87
|
- lib/luca_book/report.rb
|
88
|
+
- lib/luca_book/setup.rb
|
73
89
|
- lib/luca_book/state.rb
|
90
|
+
- lib/luca_book/templates/base-jp.xbrl.erb
|
91
|
+
- lib/luca_book/templates/dict-en.tsv
|
92
|
+
- lib/luca_book/templates/dict-jp.tsv
|
93
|
+
- lib/luca_book/util.rb
|
74
94
|
- lib/luca_book/version.rb
|
75
95
|
homepage: https://github.com/chumaltd/luca/tree/master/lucabook
|
76
96
|
licenses:
|