lucabook 0.2.32 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/luca-book +55 -13
- data/lib/luca_book/accumulator.rb +29 -5
- data/lib/luca_book/code.rb +22 -0
- data/lib/luca_book/import.rb +6 -0
- data/lib/luca_book/journal.rb +31 -0
- data/lib/luca_book/setup.rb +6 -0
- data/lib/luca_book/state.rb +65 -8
- data/lib/luca_book/templates/dict-jp-edinet.tsv +7 -3
- data/lib/luca_book/templates/dict-jp.tsv +7 -3
- data/lib/luca_book/templates/dictex-jp.tsv +88 -0
- data/lib/luca_book/test.rb +1 -1
- data/lib/luca_book/version.rb +1 -1
- data/lib/luca_book.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39278cdf39756e6e6a1a5c0a8eef40c1c262040675e5359d520edc4ba49ab483
|
4
|
+
data.tar.gz: 5b50f82fa507ab782533d5ba99e83e39009f9d8b0054492891f48838afecf44f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4124b5e84e92f6482023843225091b89c96035d7f4fac4212818ddbebd74b320a7d0a15fcffd8421c88638722710452874fe87e034be5ea3729e2690b7b584ec
|
7
|
+
data.tar.gz: 52cc24f8b86ed042b6ee4ac9d936bb17a2a28ffee09fd70ffe96d0568afb0d0a23273cb88e0d97fce003e482a3c1c4a5ff259aabf0b14791d7f495369eadf237
|
data/exe/luca-book
CHANGED
@@ -56,27 +56,64 @@ class LucaCmd
|
|
56
56
|
def self.xbrl(args, params)
|
57
57
|
level = params[:level] || 3
|
58
58
|
legal = params[:legal] || false
|
59
|
-
|
60
|
-
|
59
|
+
range = case args.length
|
60
|
+
when 4
|
61
|
+
args
|
62
|
+
when 2
|
63
|
+
date = Date.new(args[0].to_i, args[1].to_i)
|
64
|
+
r = LucaBook::Util.current_fy(date, to: date)
|
65
|
+
[r[0].year, r[0].month, r[1].year, r[1].month]
|
66
|
+
when 0
|
67
|
+
if params[:n]
|
68
|
+
gen_range(params[:n])
|
69
|
+
else
|
70
|
+
date = params[:lastyear] ? Date.today.prev_year : Date.today
|
71
|
+
r = LucaBook::Util.current_fy(date)
|
72
|
+
[r[0].year, r[0].month, r[1].year, r[1].month]
|
73
|
+
end
|
74
|
+
end
|
75
|
+
LucaBook::State.range(*range).render_xbrl(params[:output])
|
61
76
|
end
|
62
77
|
|
63
78
|
def self.balancesheet(args, params)
|
64
79
|
level = params[:level] || 3
|
65
80
|
legal = params[:legal] || false
|
66
|
-
args
|
67
|
-
render(LucaBook::State.range(*args).bs(level, legal: legal), params)
|
81
|
+
render(LucaBook::State.range(*parse_range_args(args, params)).bs(level, legal: legal), params)
|
68
82
|
end
|
69
83
|
|
70
84
|
def self.profitloss(args, params)
|
71
85
|
level = params[:level] || 2
|
72
|
-
args
|
73
|
-
render(LucaBook::State.range(*args).pl(level), params)
|
86
|
+
render(LucaBook::State.range(*parse_range_args(args, params)).pl(level), params)
|
74
87
|
end
|
75
88
|
|
76
89
|
def self.report_mail(args, params)
|
77
90
|
level = params[:level] || 3
|
78
|
-
args
|
79
|
-
|
91
|
+
render(LucaBook::State.range(*parse_range_args(args, params)).report_mail(level), params)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def self.parse_range_args(args, params)
|
96
|
+
case args.length
|
97
|
+
when 4
|
98
|
+
args
|
99
|
+
when 2
|
100
|
+
if params[:financialyear]
|
101
|
+
date = Date.new(args[0].to_i, args[1].to_i)
|
102
|
+
r = LucaBook::Util.current_fy(date, to: date)
|
103
|
+
[r[0].year, r[0].month, r[1].year, r[1].month]
|
104
|
+
else
|
105
|
+
args
|
106
|
+
end
|
107
|
+
when 0
|
108
|
+
if params[:n]
|
109
|
+
gen_range(params[:n])
|
110
|
+
elsif params[:financialyear]
|
111
|
+
date = Date.today
|
112
|
+
r = LucaBook::Util.current_fy(date)
|
113
|
+
[r[0].year, r[0].month, date.year, date.month]
|
114
|
+
else
|
115
|
+
[Date.today.year, Date.today.month]
|
116
|
+
end
|
80
117
|
end
|
81
118
|
end
|
82
119
|
|
@@ -197,15 +234,18 @@ when /reports?/, 'r'
|
|
197
234
|
case subcmd
|
198
235
|
when 'xbrl'
|
199
236
|
OptionParser.new do |opt|
|
200
|
-
opt.banner = 'Usage: luca-book
|
201
|
-
opt.on('-
|
237
|
+
opt.banner = 'Usage: luca-book r[eports] xbrl [options] [YYYY M]'
|
238
|
+
opt.on('-n VAL', 'report count') { |v| params[:n] = v.to_i }
|
239
|
+
opt.on('-o VAL', '--output VAL', 'specify file name') { |v| params[:output] = v }
|
240
|
+
opt.on('--lastyear', 'report last Financial Year') { |_v| params[:lastyear] = true }
|
202
241
|
args = opt.parse!(ARGV)
|
203
242
|
LucaCmd::Report.xbrl(args, params)
|
204
243
|
end
|
205
244
|
when 'bs'
|
206
245
|
OptionParser.new do |opt|
|
207
|
-
opt.banner = 'Usage: luca-book
|
246
|
+
opt.banner = 'Usage: luca-book r[eports] bs [options] [YYYY M]'
|
208
247
|
opt.on('-l', '--level VAL', 'account level') { |v| params[:level] = v.to_i }
|
248
|
+
opt.on('--fy', 'adjust start date to Financial Year') { |_v| params[:financialyear] = true }
|
209
249
|
opt.on('--legal', 'show legal mandatory account') { |_v| params[:legal] = true }
|
210
250
|
opt.on('--nu', 'show table in nushell') { |_v| params[:output] = 'nu' }
|
211
251
|
opt.on('-o', '--output VAL', 'output serialized data') { |v| params[:output] = v }
|
@@ -214,8 +254,9 @@ when /reports?/, 'r'
|
|
214
254
|
end
|
215
255
|
when 'pl'
|
216
256
|
OptionParser.new do |opt|
|
217
|
-
opt.banner = 'Usage: luca-book
|
257
|
+
opt.banner = 'Usage: luca-book r[eports] pl [options] [YYYY M YYYY M]'
|
218
258
|
opt.on('-l', '--level VAL', 'account level') { |v| params[:level] = v.to_i }
|
259
|
+
opt.on('--fy', 'adjust start date to Financial Year') { |_v| params[:financialyear] = true }
|
219
260
|
opt.on('-n VAL', 'report count') { |v| params[:n] = v.to_i }
|
220
261
|
opt.on('--nu', 'show table in nushell') { |_v| params[:output] = 'nu' }
|
221
262
|
opt.on('-o', '--output VAL', 'output serialized data') { |v| params[:output] = v }
|
@@ -224,8 +265,9 @@ when /reports?/, 'r'
|
|
224
265
|
end
|
225
266
|
when 'mail'
|
226
267
|
OptionParser.new do |opt|
|
227
|
-
opt.banner = 'Usage: luca-book
|
268
|
+
opt.banner = 'Usage: luca-book r[eports] mail [options] [YYYY M YYYY M]'
|
228
269
|
opt.on('-l', '--level VAL', 'account level') { |v| params[:level] = v.to_i }
|
270
|
+
opt.on('--fy', 'adjust start date to Financial Year') { |_v| params[:financialyear] = true }
|
229
271
|
opt.on('-n VAL', 'report count') { |v| params[:n] = v.to_i }
|
230
272
|
args = opt.parse!(ARGV)
|
231
273
|
LucaCmd::Report.report_mail(args, params)
|
@@ -5,7 +5,7 @@ require 'luca_support/config'
|
|
5
5
|
|
6
6
|
module LucaBook
|
7
7
|
module Accumulator
|
8
|
-
def self.included(klass)
|
8
|
+
def self.included(klass) #:nodoc:
|
9
9
|
klass.extend ClassMethods
|
10
10
|
end
|
11
11
|
|
@@ -74,17 +74,41 @@ module LucaBook
|
|
74
74
|
|
75
75
|
# for assert purpose
|
76
76
|
#
|
77
|
-
|
77
|
+
# header: { customer: 'some-customer' }
|
78
|
+
#
|
79
|
+
def gross(start_year, start_month, end_year = nil, end_month = nil, code: nil, date_range: nil, rows: 4, recursive: false, header: nil)
|
78
80
|
if ! date_range.nil?
|
79
81
|
raise if date_range.class != Range
|
80
82
|
# TODO: date based range search
|
81
83
|
end
|
84
|
+
scan_headers = header&.map { |k, v|
|
85
|
+
[:customer, :editor].include?(k) ? [ "x-#{k.to_s}", v ] : nil
|
86
|
+
}&.compact&.to_h
|
82
87
|
|
83
88
|
end_year ||= start_year
|
84
89
|
end_month ||= start_month
|
85
90
|
sum = { debit: {}, credit: {}, debit_count: {}, credit_count: {} }
|
86
91
|
idx_memo = []
|
87
|
-
|
92
|
+
|
93
|
+
enm = if scan_headers.nil? || scan_headers.empty?
|
94
|
+
term(start_year, start_month, end_year, end_month, code, 'journals')
|
95
|
+
else
|
96
|
+
Enumerator.new do |y|
|
97
|
+
term(start_year, start_month, end_year, end_month, code, 'journals') do |f, path|
|
98
|
+
4.times { f.gets } # skip to headers
|
99
|
+
CSV.new(f, headers: false, col_sep: "\t", encoding: 'UTF-8')
|
100
|
+
.each do |line|
|
101
|
+
break if line.empty?
|
102
|
+
|
103
|
+
if scan_headers.keys.include? line[0]
|
104
|
+
f.rewind
|
105
|
+
y << [f, path]
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
enm.each do |f, _path|
|
88
112
|
CSV.new(f, headers: false, col_sep: "\t", encoding: 'UTF-8')
|
89
113
|
.each_with_index do |row, i|
|
90
114
|
break if i >= rows
|
@@ -142,8 +166,8 @@ module LucaBook
|
|
142
166
|
|
143
167
|
# netting vouchers in specified term
|
144
168
|
#
|
145
|
-
def net(start_year, start_month, end_year = nil, end_month = nil, code: nil, date_range: nil, recursive: false)
|
146
|
-
g = gross(start_year, start_month, end_year, end_month, code: code, date_range: date_range, recursive: recursive)
|
169
|
+
def net(start_year, start_month, end_year = nil, end_month = nil, code: nil, date_range: nil, recursive: false, header: nil)
|
170
|
+
g = gross(start_year, start_month, end_year, end_month, code: code, date_range: date_range, recursive: recursive, header: header)
|
147
171
|
idx = (g[:debit].keys + g[:credit].keys).uniq.sort
|
148
172
|
count = {}
|
149
173
|
diff = {}.tap do |sum|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module LucaBook # :nodoc:
|
4
|
+
module Code
|
5
|
+
module_function
|
6
|
+
|
7
|
+
def currency_code(country)
|
8
|
+
{
|
9
|
+
'de' => 'EUR',
|
10
|
+
'ee' => 'EUR',
|
11
|
+
'fr' => 'EUR',
|
12
|
+
'gb' => 'GBP',
|
13
|
+
'in' => 'INR',
|
14
|
+
'it' => 'EUR',
|
15
|
+
'nl' => 'EUR',
|
16
|
+
'jp' => 'JPY',
|
17
|
+
'uk' => 'GBP',
|
18
|
+
'us' => 'USD'
|
19
|
+
}[country]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/luca_book/import.rb
CHANGED
@@ -54,6 +54,12 @@ module LucaBook
|
|
54
54
|
d['debit'].each { |h| h['code'] = code_map.dig(h['label']) || DEBIT_DEFAULT }
|
55
55
|
d['credit'].each { |h| h['code'] = code_map.dig(h['label']) || CREDIT_DEFAULT }
|
56
56
|
|
57
|
+
LucaBook::Journal::ACCEPTED_HEADERS.each do |header|
|
58
|
+
next if d[header].nil?
|
59
|
+
d['headers'] ||= {}
|
60
|
+
d['headers'][header] = d[header]
|
61
|
+
d.delete header
|
62
|
+
end
|
57
63
|
LucaBook::Journal.create(d)
|
58
64
|
end
|
59
65
|
end
|
data/lib/luca_book/journal.rb
CHANGED
@@ -162,5 +162,36 @@ module LucaBook #:nodoc:
|
|
162
162
|
record[:note] = record[:note]&.join('\n')
|
163
163
|
end
|
164
164
|
end
|
165
|
+
|
166
|
+
# Load data based on account code.
|
167
|
+
#
|
168
|
+
def self.filter_by_code(start_year, start_month, end_year, end_month, code, recursive = true, basedir = @dirname)
|
169
|
+
return enum_for(:filter_by_code, start_year, start_month, end_year, end_month, code, basedir) unless block_given?
|
170
|
+
|
171
|
+
re = recursive ? "^#{code}" : "^#{code}$"
|
172
|
+
LucaSupport::Code.encode_term(start_year, start_month, end_year, end_month).each do |subdir|
|
173
|
+
open_records(basedir, subdir, nil, nil) do |f, path|
|
174
|
+
CSV.new(f, headers: false, col_sep: "\t", encoding: 'UTF-8')
|
175
|
+
.each.with_index(0) do |line, i|
|
176
|
+
case i
|
177
|
+
when 0
|
178
|
+
if line.find { |cd| /#{re}/.match(cd) }
|
179
|
+
f.rewind
|
180
|
+
yield load_data(f, path), path
|
181
|
+
break
|
182
|
+
end
|
183
|
+
when 2
|
184
|
+
if line.find { |cd| /#{re}/.match(cd) }
|
185
|
+
f.rewind
|
186
|
+
yield load_data(f, path), path
|
187
|
+
end
|
188
|
+
when 3
|
189
|
+
break
|
190
|
+
else # skip
|
191
|
+
end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
165
196
|
end
|
166
197
|
end
|
data/lib/luca_book/setup.rb
CHANGED
@@ -19,6 +19,12 @@ module LucaBook
|
|
19
19
|
end
|
20
20
|
FileUtils.cp("#{__dir__}/templates/#{dict}", 'dict/base.tsv') unless File.exist?('dict/base.tsv')
|
21
21
|
FileUtils.cp("#{__dir__}/templates/config.yml", 'config.yml') unless File.exist?('config.yml')
|
22
|
+
exdict = if File.exist?("#{__dir__}/templates/dictex-#{country}.tsv")
|
23
|
+
"dict-#{country}.tsv"
|
24
|
+
else
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
FileUtils.cp("#{__dir__}/templates/#{exdict}", 'dict/ext.tsv') unless (File.exist?('dict/ext.tsv') || exdict.nil?)
|
22
28
|
prepare_starttsv(dict) unless File.exist? 'data/balance/start.tsv'
|
23
29
|
end
|
24
30
|
end
|
data/lib/luca_book/state.rb
CHANGED
@@ -232,7 +232,6 @@ module LucaBook
|
|
232
232
|
recursive ? total_subaccount(total) : total
|
233
233
|
end
|
234
234
|
|
235
|
-
# TODO: currency setting other than JPY
|
236
235
|
def render_xbrl(filename = nil)
|
237
236
|
set_bs(3, legal: true)
|
238
237
|
set_pl(3)
|
@@ -246,12 +245,14 @@ module LucaBook
|
|
246
245
|
prior_bs = @start_balance.filter { |k, _v| /^[9]/.match(k) }
|
247
246
|
@xbrl_entries = @bs_data.map{ |k, v| xbrl_line(k, v, prior_bs[k]) }.compact.join("\n")
|
248
247
|
@xbrl_entries += @pl_data.map{ |k, v| xbrl_line(k, v) }.compact.join("\n")
|
249
|
-
@
|
248
|
+
@xbrl_entries += equity_change.join("\n")
|
249
|
+
@filename = filename || "statement-#{@issue_date}"
|
250
250
|
|
251
251
|
File.open("#{@filename}.xbrl", 'w') { |f| f.write render_erb(search_template("base-#{country_suffix}.xbrl.erb")) }
|
252
252
|
File.open("#{@filename}.xsd", 'w') { |f| f.write render_erb(search_template("base-#{country_suffix}.xsd.erb")) }
|
253
253
|
end
|
254
254
|
|
255
|
+
# TODO: proper decimals attr for each currency
|
255
256
|
def xbrl_line(code, amount, prior_amount = nil)
|
256
257
|
return nil if /^_/.match(code)
|
257
258
|
|
@@ -262,11 +263,11 @@ module LucaBook
|
|
262
263
|
return nil if readable(amount).zero? && prior_amount.nil?
|
263
264
|
|
264
265
|
prior = if prior_amount.nil?
|
265
|
-
/^[9]/.match(code) ? "<#{tag} decimals=\"0\" unitRef=\"
|
266
|
+
/^[9]/.match(code) ? "<#{tag} decimals=\"0\" unitRef=\"#{Code.currency_code(CONFIG['country'])}\" contextRef=\"Prior1YearNonConsolidatedInstant\">0</#{tag}>\n" : ''
|
266
267
|
else
|
267
|
-
"<#{tag} decimals=\"0\" unitRef=\"
|
268
|
+
"<#{tag} decimals=\"0\" unitRef=\"#{Code.currency_code(CONFIG['country'])}\" contextRef=\"Prior1YearNonConsolidatedInstant\">#{readable(prior_amount)}</#{tag}>\n"
|
268
269
|
end
|
269
|
-
current = "<#{tag} decimals=\"0\" unitRef=\"
|
270
|
+
current = "<#{tag} decimals=\"0\" unitRef=\"#{Code.currency_code(CONFIG['country'])}\" contextRef=\"#{context}\">#{readable(amount)}</#{tag}>"
|
270
271
|
|
271
272
|
prior + current
|
272
273
|
end
|
@@ -285,9 +286,12 @@ module LucaBook
|
|
285
286
|
private
|
286
287
|
|
287
288
|
def set_bs(level = 3, legal: false)
|
288
|
-
@
|
289
|
-
|
290
|
-
|
289
|
+
unless @monthly.first['_setup']
|
290
|
+
@start_balance.each do |k, v|
|
291
|
+
next if /^_/.match(k)
|
292
|
+
@monthly.first[k] = (v || 0) + (@monthly.first[k] || 0)
|
293
|
+
end
|
294
|
+
@monthly.first['_setup'] = 'done'
|
291
295
|
end
|
292
296
|
list = @monthly.map { |data| data.select { |k, _v| k.length <= level } }
|
293
297
|
list.map! { |data| code_sum(data).merge(data) } if legal
|
@@ -322,6 +326,59 @@ module LucaBook
|
|
322
326
|
end
|
323
327
|
end
|
324
328
|
|
329
|
+
def equity_change
|
330
|
+
begin
|
331
|
+
ex_dict = LucaRecord::Dict.new('ext.tsv')
|
332
|
+
rescue
|
333
|
+
return nil
|
334
|
+
end
|
335
|
+
|
336
|
+
changes = []
|
337
|
+
LucaBook::Journal.filter_by_code(@start_date.year, @start_date.month, @end_date.year, @end_date.month, '9').each do |dat|
|
338
|
+
debit_str = 'ASET' if dat[:debit].find { |e| /^[124]/.match(e[:code]) }
|
339
|
+
debit_str ||= '33' if dat[:debit].find { |e| /^[33]/.match(e[:code]) }
|
340
|
+
debit_str ||= 'ASET' if dat[:debit].find { |e| /^[3]/.match(e[:code]) }
|
341
|
+
credit_str = 'DEBT' if dat[:credit].find { |e| /^[57]/.match(e[:code]) }
|
342
|
+
credit_str ||= 'ASET' if dat[:credit].find { |e| /^[12]/.match(e[:code]) }
|
343
|
+
dat[:credit].each do |entry|
|
344
|
+
case entry[:code]
|
345
|
+
when /^(91[0-9a-zA-Z]+)/
|
346
|
+
code = $1
|
347
|
+
debit_str ||= dat[:debit].find { |e| /^[9]/.match(e[:code]) }.dig(:code)
|
348
|
+
debit_str = '914' if /^914[0-9a-zA-Z]+/.match(debit_str)
|
349
|
+
tag = ex_dict.dig("#{debit_str}:c#{code}#{credit_str}")&.dig(:xbrl_id)
|
350
|
+
changes << [tag, readable(entry[:amount])] if tag
|
351
|
+
end
|
352
|
+
end
|
353
|
+
dat[:debit].each do |entry|
|
354
|
+
case entry[:code]
|
355
|
+
when /^(916[0-9a-zA-Z]*)/
|
356
|
+
tag = ex_dict.dig("d#{$1}:_")&.dig(:xbrl_id)
|
357
|
+
changes << [tag, readable(entry[:amount] * -1)] if tag
|
358
|
+
when /^(91[0-57-9a-zA-Z]+)/
|
359
|
+
code = $1
|
360
|
+
credit_str ||= dat[:credit].find { |e| /^[9]/.match(e[:code]) }.dig(:code)
|
361
|
+
credit_str = '914' if /^914[0-9a-zA-Z]+/.match(credit_str)
|
362
|
+
tag = ex_dict.dig("#{debit_str}:c#{code}#{credit_str}")&.dig(:xbrl_id)
|
363
|
+
changes << [tag, readable(entry[:amount])] if tag
|
364
|
+
end
|
365
|
+
end
|
366
|
+
end
|
367
|
+
set_bs(4) # require level 4 accounts
|
368
|
+
@bs_data.each do |code, amount|
|
369
|
+
next if /^[^9]/.match(code)
|
370
|
+
|
371
|
+
diff = amount - (@start_balance[code]||0)
|
372
|
+
next if diff == 0
|
373
|
+
|
374
|
+
tag = ex_dict.dig("#{code}:#{code}")&.dig(:xbrl_id)
|
375
|
+
changes << [tag, readable(diff)] if tag
|
376
|
+
end
|
377
|
+
currency = %Q(unitRef="#{Code.currency_code(CONFIG['country'])}")
|
378
|
+
context = 'contextRef="CurrentYearNonConsolidatedDuration"'
|
379
|
+
changes.map { |tag, amount| %Q(<#{tag} decimals="0" #{currency} #{context}>#{amount}</#{tag}>) }
|
380
|
+
end
|
381
|
+
|
325
382
|
def lib_path
|
326
383
|
__dir__
|
327
384
|
end
|
@@ -19,7 +19,7 @@ code label xbrl_id consumption_tax income_tax
|
|
19
19
|
1502 未収法人税
|
20
20
|
1503 未収都道府県住民税
|
21
21
|
1504 未収地方事業税
|
22
|
-
1505
|
22
|
+
1505 未収市町村住民税
|
23
23
|
160 棚卸資産 jppfs_cor:Inventories
|
24
24
|
161 商品 jppfs_cor:Merchandize
|
25
25
|
162 製品 jppfs_cor:FinishedGoods
|
@@ -85,8 +85,8 @@ code label xbrl_id consumption_tax income_tax
|
|
85
85
|
515 未払法人税等 jppfs_cor:IncomeTaxesPayable
|
86
86
|
5151 未払法人税
|
87
87
|
5152 未払地方事業税
|
88
|
-
5153
|
89
|
-
5154
|
88
|
+
5153 未払都道府県住民税
|
89
|
+
5154 未払市町村住民税
|
90
90
|
516 未払消費税等 jppfs_cor:AccruedConsumptionTaxes
|
91
91
|
517 未払費用 jppfs_cor:AccruedExpenses
|
92
92
|
518 前受金 jppfs_cor:AdvancesReceived
|
@@ -191,4 +191,8 @@ G13 災害損失 jppfs_cor:LossOnDisasterEL
|
|
191
191
|
GA 税引前利益 jppfs_cor:IncomeBeforeIncomeTaxes
|
192
192
|
H0 法人税等 jppfs_cor:IncomeTaxes
|
193
193
|
H11 法人税、住民税及び事業税 jppfs_cor:IncomeTaxesCurrent
|
194
|
+
H111 法人税
|
195
|
+
H112 都道府県住民税
|
196
|
+
H113 市町村住民税
|
197
|
+
H114 地方事業税
|
194
198
|
HA 当期利益 jppfs_cor:ProfitLoss
|
@@ -19,7 +19,7 @@ code label xbrl_id consumption_tax income_tax
|
|
19
19
|
1502 未収法人税
|
20
20
|
1503 未収都道府県住民税
|
21
21
|
1504 未収地方事業税
|
22
|
-
1505
|
22
|
+
1505 未収市町村住民税
|
23
23
|
160 棚卸資産
|
24
24
|
161 商品 jpfr-t-cte:Merchandise
|
25
25
|
162 製品 jpfr-t-cte:FinishedGoods
|
@@ -85,8 +85,8 @@ code label xbrl_id consumption_tax income_tax
|
|
85
85
|
515 未払法人税等 jpfr-t-cte:IncomeTaxesPayable
|
86
86
|
5151 未払法人税
|
87
87
|
5152 未払地方事業税
|
88
|
-
5153
|
89
|
-
5154
|
88
|
+
5153 未払都道府県住民税
|
89
|
+
5154 未払市町村住民税
|
90
90
|
516 未払消費税等 jpfr-t-cte:AccruedConsumptionTaxes
|
91
91
|
517 未払費用 jpfr-t-cte:AccruedExpenses
|
92
92
|
518 前受金 jpfr-t-cte:AdvancesReceived
|
@@ -191,4 +191,8 @@ G13 災害損失 jpfr-t-cte:LossOnDisasterEL
|
|
191
191
|
GA 税引前利益 jpfr-t-cte:IncomeBeforeIncomeTaxes
|
192
192
|
H0 法人税等 jpfr-t-cte:IncomeTaxes
|
193
193
|
H11 法人税、住民税及び事業税 jpfr-t-cte:IncomeTaxesCurrent
|
194
|
+
H111 法人税
|
195
|
+
H112 都道府県住民税
|
196
|
+
H113 市町村住民税
|
197
|
+
H114 地方事業税
|
194
198
|
HA 当期利益 jpfr-t-cte:NetIncome
|
@@ -0,0 +1,88 @@
|
|
1
|
+
code label xbrl_id
|
2
|
+
ASET:c911 新株の発行、資本金 jpfr-t-cte:IssuanceOfNewSharesCAP
|
3
|
+
912:c911 新株の発行、資本金 jpfr-t-cte:IssuanceOfNewSharesCAP
|
4
|
+
93:c911 新株の発行(新株予約権の行使)、資本金 jpfr-t-cte:IssuanceOfNewSharesExerciseOfSubscriptionRightsToSharesCAP
|
5
|
+
ASET:c911DEBT 合併による増加、資本金 jpfr-t-cte:IncreaseByMergerCAP
|
6
|
+
ASET:c911DEBT:split 会社分割による増加、資本金 jpfr-t-cte:IncreaseByCorporateDivisionCAP
|
7
|
+
33:c911 株式交換による増加、資本金 jpfr-t-cte:IncreaseByShareTransfersCAP
|
8
|
+
33:c911:transfer 株式移転による増加、資本金 jpfr-t-cte:IncreaseByShareExchangesCAP
|
9
|
+
d911ASET:DEBT 分割型の会社分割による減少、資本金 jpfr-t-cte:DecreaseByCorporateDivisionSplitOffTypeCAP
|
10
|
+
d911:9131 資本金から準備金への振替、資本金 jpfr-t-cte:TransferToLegalCapitalSurplusFromCapitalStockCAP
|
11
|
+
d911:9132 資本金から剰余金への振替、資本金 jpfr-t-cte:TransferToOtherCapitalSurplusFromCapitalStockCAP
|
12
|
+
9131:c911 準備金から資本金への振替、資本金 jpfr-t-cte:TransferToCapitalStockFromLegalCapitalSurplusCAP
|
13
|
+
d911:914 減資、資本金 jpfr-t-cte:CapitalReductionCAP
|
14
|
+
911:911 当期変動額合計、資本金 jpfr-t-cte:TotalChangesOfItemsDuringThePeriodCAP
|
15
|
+
ASET:c9131 新株の発行、資本準備金 jpfr-t-cte:IssuanceOfNewSharesLCS
|
16
|
+
912:c9131 新株の発行、資本準備金 jpfr-t-cte:IssuanceOfNewSharesLCS
|
17
|
+
93:c9131 新株の発行(新株予約権の行使)、資本準備金 jpfr-t-cte:IssuanceOfNewSharesExerciseOfSubscriptionRightsToSharesLCS
|
18
|
+
ASET:c9131DEBT 合併による増加、資本準備金 jpfr-t-cte:IncreaseByMergerLCS
|
19
|
+
ASET:c9131DEBT:split 会社分割による増加、資本準備金 jpfr-t-cte:IncreaseByCorporateDivisionLCS
|
20
|
+
33:c9131 株式交換による増加、資本準備金 jpfr-t-cte:IncreaseByShareExchangesLCS
|
21
|
+
33:c9131:transfer 株式移転による増加、資本準備金 jpfr-t-cte:IncreaseByShareTransfersLCS
|
22
|
+
d9131ASET:DEBT 分割型の会社分割による減少、資本準備金 jpfr-t-cte:DecreaseByCorporateDivisionSplitOffTypeLCS
|
23
|
+
911:c9131 資本金から準備金への振替、資本準備金 jpfr-t-cte:TransferToLegalCapitalSurplusFromCapitalStockLCS
|
24
|
+
d9131:911 準備金から資本金への振替、資本準備金 jpfr-t-cte:TransferToCapitalStockFromLegalCapitalSurplusLCS
|
25
|
+
d9131:9132 準備金から剰余金への振替、資本準備金 jpfr-t-cte:TransferToOtherCapitalSurplusFromLegalCapitalSurplusLCS
|
26
|
+
d9131:_914 欠損填補、資本準備金 jpfr-t-cte:DeficitDispositionLCS
|
27
|
+
d9131:914 資本準備金の取崩、資本準備金 jpfr-t-cte:ReversalOfLegalCapitalSurplusLCS
|
28
|
+
9131:9131 当期変動額合計、資本準備金 jpfr-t-cte:TotalChangesOfItemsDuringThePeriodLCS
|
29
|
+
d9132:ASET 剰余金(その他資本剰余金)の配当、その他資本剰余金 jpfr-t-cte:DividendsFromSurplusOtherCapitalSurplusOCS
|
30
|
+
d9132:DEBT 剰余金(その他資本剰余金)の配当、その他資本剰余金 jpfr-t-cte:DividendsFromSurplusOtherCapitalSurplusOCS
|
31
|
+
d9132:916 自己株式の処分、その他資本剰余金 jpfr-t-cte:DisposalOfTreasuryStockOCS
|
32
|
+
ASET:c9132DEBT 合併による増加、その他資本剰余金 jpfr-t-cte:IncreaseByMergerOCS
|
33
|
+
ASET:c9132DEBT:split 会社分割による増加、その他資本剰余金 jpfr-t-cte:IncreaseByCorporateDivisionOCS
|
34
|
+
33:c9132 株式交換による増加、その他資本剰余金 jpfr-t-cte:IncreaseByShareExchangesOCS
|
35
|
+
33:c9132:transfer 株式移転による増加、その他資本剰余金 jpfr-t-cte:IncreaseByShareTransfersOCS
|
36
|
+
d9132ASET:DEBT 分割型の会社分割による減少、その他資本剰余金 jpfr-t-cte:DecreaseByCorporateDivisionSplitOffTypeOCS
|
37
|
+
911:c9132 資本金から剰余金への振替、その他資本剰余金 jpfr-t-cte:TransferToOtherCapitalSurplusFromCapitalStockOCS
|
38
|
+
9131:c9132 準備金から剰余金への振替、その他資本剰余金 jpfr-t-cte:TransferToCapitalSurplusFromRetainedEarningsOCS
|
39
|
+
914:c9132 利益剰余金から資本剰余金への振替、その他資本剰余金 jpfr-t-cte:TransferToOtherCapitalSurplusFromLegalCapitalSurplusOCS
|
40
|
+
d9132:916 自己株式の消却、その他資本剰余金 jpfr-t-cte:RetirementOfTreasuryStockOCS
|
41
|
+
d9132:_914 欠損填補、その他資本剰余金 jpfr-t-cte:DeficitDispositionOCS
|
42
|
+
d9132:914 資本準備金の取崩、その他資本剰余金 jpfr-t-cte:ReversalOfLegalCapitalSurplusOCS
|
43
|
+
d9132:914 減資、その他資本剰余金 jpfr-t-cte:CapitalReductionOCS
|
44
|
+
9132:9132 当期変動額合計、その他資本剰余金 jpfr-t-cte:TotalChangesOfItemsDuringThePeriodOCS
|
45
|
+
915:ASET 剰余金の配当、利益準備金 jpfr-t-cte:DividendsFromSurplusLRE
|
46
|
+
ASET:c915DEBT 合併による増加、利益準備金 jpfr-t-cte:IncreaseByMergerLRE
|
47
|
+
ASET:c915DEBT:split 会社分割による増加、利益準備金 jpfr-t-cte:IncreaseByCorporateDivisionLRE
|
48
|
+
33:c915 株式交換による増加、利益準備金 jpfr-t-cte:IncreaseByShareExchangesLRE
|
49
|
+
33:c915:transfer 株式移転による増加、利益準備金 jpfr-t-cte:IncreaseByShareTransfersLRE
|
50
|
+
d915ASET:DEBT 分割型の会社分割による減少、利益準備金 jpfr-t-cte:DecreaseByCorporateDivisionSplitOffTypeLRE
|
51
|
+
914:c915 利益準備金の積立、利益準備金 jpfr-t-cte:ProvisionOfLegalRetainedEarningsLRE
|
52
|
+
d915:914 利益準備金の取崩、利益準備金 jpfr-t-cte:ReversalOfLegalRetainedEarningsLRE
|
53
|
+
915:915 当期変動額合計、利益準備金 jpfr-t-cte:TotalChangesOfItemsDuringThePeriodLRE
|
54
|
+
d9141:ASET 剰余金の配当、その他利益剰余金 jpfr-t-cte:DividendsFromSurplusORE
|
55
|
+
d9141:DEBT 剰余金の配当、その他利益剰余金 jpfr-t-cte:DividendsFromSurplusORE
|
56
|
+
ASET:c9141DEBT 合併による増加、その他利益剰余金 jpfr-t-cte:IncreaseByMergerORE
|
57
|
+
ASET:c9141DEBT:split 会社分割による増加、その他利益剰余金 jpfr-t-cte:IncreaseByCorporateDivisionORE
|
58
|
+
33:c9141 株式交換による増加、その他利益剰余金 jpfr-t-cte:IncreaseByShareExchangesORE
|
59
|
+
33:c9141:transfer 株式移転による増加、その他利益剰余金 jpfr-t-cte:IncreaseByShareTransfersORE
|
60
|
+
d9141ASET:DEBT 分割型の会社分割による減少、その他利益剰余金 jpfr-t-cte:DecreaseByCorporateDivisionSplitOffTypeORE
|
61
|
+
d9141:916 自己株式の処分、その他利益剰余金 jpfr-t-cte:DisposalOfTreasuryStockORE
|
62
|
+
d9141:916 自己株式の消却、その他利益剰余金 jpfr-t-cte:RetirementOfTreasuryStockORE
|
63
|
+
d9141:_DEBT 利益処分、その他利益剰余金 jpfr-t-cte:ProfitAppropriationORE
|
64
|
+
d9141:915 利益準備金の積立、その他利益剰余金 jpfr-t-cte:ProvisionOfLegalRetainedEarningsORE
|
65
|
+
915:c9141 利益準備金の取崩、その他利益剰余金 jpfr-t-cte:ReversalOfLegalRetainedEarningsORE
|
66
|
+
911:c9141 減資、その他利益剰余金 jpfr-t-cte:CapitalReductionORE
|
67
|
+
d9141:9132 利益剰余金から資本剰余金への振替、その他利益剰余金 jpfr-t-cte:TransferToCapitalSurplusFromRetainedEarningsORE
|
68
|
+
9141:9141 当期変動額合計、その他利益剰余金 jpfr-t-cte:TotalChangesOfItemsDuringThePeriodORE
|
69
|
+
d9142:ASET 剰余金の配当、繰越利益剰余金 jpfr-t-cte:DividendsFromSurplusREBF
|
70
|
+
ASET:c9142DEBT 合併による増加、繰越利益剰余金 jpfr-t-cte:IncreaseByMergerREBF
|
71
|
+
ASET:c9142DEBT:split 会社分割による増加、繰越利益剰余金 jpfr-t-cte:IncreaseByCorporateDivisionREBF
|
72
|
+
33:c9142 株式交換による増加、繰越利益剰余金 jpfr-t-cte:IncreaseByShareExchangesREBF
|
73
|
+
33:c9142:transfer 株式移転による増加、繰越利益剰余金 jpfr-t-cte:IncreaseByShareTransfersREBF
|
74
|
+
d9142ASET:DEBT 分割型の会社分割による減少、繰越利益剰余金 jpfr-t-cte:DecreaseByCorporateDivisionSplitOffTypeREBF
|
75
|
+
d9142:916 自己株式の処分、繰越利益剰余金 jpfr-t-cte:DisposalOfTreasuryStockREBF
|
76
|
+
d9142:916 自己株式の消却、繰越利益剰余金 jpfr-t-cte:RetirementOfTreasuryStockREBF
|
77
|
+
d9142:_DEBT 利益処分、繰越利益剰余金 jpfr-t-cte:ProfitAppropriationREBF
|
78
|
+
d9142:915 利益準備金の積立、繰越利益剰余金 jpfr-t-cte:ProvisionOfLegalRetainedEarningsREBF
|
79
|
+
915:c9142 利益準備金の取崩、繰越利益剰余金 jpfr-t-cte:ReversalOfLegalRetainedEarningsREBF
|
80
|
+
_913:c9142 欠損填補、繰越利益剰余金 jpfr-t-cte:DeficitDispositionREBF
|
81
|
+
911:c9142 減資、繰越利益剰余金 jpfr-t-cte:CapitalReductionREBF
|
82
|
+
d9142:9132 利益剰余金から資本剰余金への振替、繰越利益剰余金 jpfr-t-cte:TransferToCapitalSurplusFromRetainedEarningsREBF
|
83
|
+
9142:9142 当期変動額合計、繰越利益剰余金 jpfr-t-cte:TotalChangesOfItemsDuringThePeriodREBF
|
84
|
+
d916:_ 自己株式の取得、自己株式 jpfr-t-cte:PurchaseOfTreasuryStockTS
|
85
|
+
_:c916 自己株式の処分、自己株式 jpfr-t-cte:DisposalOfTreasuryStockTS
|
86
|
+
_:c916 自己株式の消却、自己株式 jpfr-t-cte:RetirementOfTreasuryStockTS
|
87
|
+
_916:916 持分法適用会社に対する持分変動に伴う自己株式の増減、自己株式 jpfr-t-cte:ChangeInEquityInAffiliatesAccountedForByEquityMethodTreasuryStockTS
|
88
|
+
916:916 当期変動額合計、自己株式 jpfr-t-cte:TotalChangesOfItemsDuringThePeriodTS
|
data/lib/luca_book/test.rb
CHANGED
data/lib/luca_book/version.rb
CHANGED
data/lib/luca_book.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.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuma Takahiro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lucarecord
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- exe/luca-book
|
81
81
|
- lib/luca_book.rb
|
82
82
|
- lib/luca_book/accumulator.rb
|
83
|
+
- lib/luca_book/code.rb
|
83
84
|
- lib/luca_book/console.rb
|
84
85
|
- lib/luca_book/dict.rb
|
85
86
|
- lib/luca_book/import.rb
|
@@ -95,6 +96,7 @@ files:
|
|
95
96
|
- lib/luca_book/templates/dict-en.tsv
|
96
97
|
- lib/luca_book/templates/dict-jp-edinet.tsv
|
97
98
|
- lib/luca_book/templates/dict-jp.tsv
|
99
|
+
- lib/luca_book/templates/dictex-jp.tsv
|
98
100
|
- lib/luca_book/templates/journals.html.erb
|
99
101
|
- lib/luca_book/templates/monthly-report.html.erb
|
100
102
|
- lib/luca_book/test.rb
|