lucabook 0.2.22 → 0.2.23
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 +8 -2
- data/lib/luca_book.rb +1 -0
- data/lib/luca_book/dict.rb +1 -1
- data/lib/luca_book/journal.rb +39 -18
- data/lib/luca_book/list.rb +1 -1
- data/lib/luca_book/list_by_header.rb +120 -0
- data/lib/luca_book/setup.rb +2 -1
- data/lib/luca_book/state.rb +16 -11
- data/lib/luca_book/templates/config.yml +4 -0
- data/lib/luca_book/templates/dict-en.tsv +25 -30
- data/lib/luca_book/templates/dict-jp.tsv +34 -30
- data/lib/luca_book/version.rb +1 -1
- 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: 866a73f9e372f2ac755ed301c9e9b88bebb556b53a5ffd604391c45eda927653
|
4
|
+
data.tar.gz: 41b02c0e5c567dbfedf37fe4148d11270a0f8776c6fcc78f630354e281aad5d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f295b8ab521f4b95c81ec57c57579ebf87ae01c3f1acf2fbc564bf076731d1b1d089e0959660752529e190eecfa3e107ee184b6f91484f9bdc61977eda80886
|
7
|
+
data.tar.gz: '0820bc3b42bfd48b0cf8f2924774acc8887c6fda373ec71fcebab5152b46e292096b68f174ac643613fda4ef72dc62a79300b4fa82e306d144f2fe404a770213'
|
data/exe/luca-book
CHANGED
@@ -10,7 +10,8 @@ class LucaCmd
|
|
10
10
|
if params['config']
|
11
11
|
LucaBook::Import.new(args[0], params['config']).import_csv
|
12
12
|
elsif params['json']
|
13
|
-
|
13
|
+
str = args[0].nil? ? STDIN.read : File.read(args[0])
|
14
|
+
LucaBook::Import.import_json(str)
|
14
15
|
else
|
15
16
|
puts 'Usage: luca-book import -c import_config'
|
16
17
|
exit 1
|
@@ -20,7 +21,11 @@ class LucaCmd
|
|
20
21
|
def self.list(args, params)
|
21
22
|
args = gen_range(params[:n] || 1) if args.empty?
|
22
23
|
if params['code']
|
23
|
-
|
24
|
+
if params['headers']
|
25
|
+
render(LucaBook::ListByHeader.term(*args, code: params['code'], header: params['headers']).list_by_code, params)
|
26
|
+
else
|
27
|
+
render(LucaBook::List.term(*args, code: params['code']).list_by_code, params)
|
28
|
+
end
|
24
29
|
else
|
25
30
|
render(LucaBook::List.term(*args).list_journals, params)
|
26
31
|
end
|
@@ -94,6 +99,7 @@ when /journals?/, 'j'
|
|
94
99
|
OptionParser.new do |opt|
|
95
100
|
opt.banner = 'Usage: luca-book journals list [options] [YYYY M]'
|
96
101
|
opt.on('-c', '--code VAL', 'search with code') { |v| params['code'] = v }
|
102
|
+
opt.on('--customer', 'categorize by x-customer header') { |_v| params['headers'] = 'x-customer' }
|
97
103
|
opt.on('-n VAL', 'report count') { |v| params[:n] = v.to_i }
|
98
104
|
opt.on('--nu', 'show table in nushell') { |_v| params[:output] = 'nu' }
|
99
105
|
opt.on('-o', '--output VAL', 'output serialized data') { |v| params[:output] = v }
|
data/lib/luca_book.rb
CHANGED
@@ -9,6 +9,7 @@ module LucaBook
|
|
9
9
|
autoload :Import, 'luca_book/import'
|
10
10
|
autoload :Journal, 'luca_book/journal'
|
11
11
|
autoload :List, 'luca_book/list'
|
12
|
+
autoload :ListByHeader, 'luca_book/list_by_header'
|
12
13
|
autoload :Setup, 'luca_book/setup'
|
13
14
|
autoload :State, 'luca_book/state'
|
14
15
|
autoload :Util, 'luca_book/util'
|
data/lib/luca_book/dict.rb
CHANGED
@@ -85,7 +85,7 @@ module LucaBook
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def self.latest_balance
|
88
|
-
dict_dir = Pathname(LucaSupport::
|
88
|
+
dict_dir = Pathname(LucaSupport::PJDIR) / 'data' / 'balance'
|
89
89
|
# TODO: search latest balance dictionary
|
90
90
|
load_tsv_dict(dict_dir / 'start.tsv')
|
91
91
|
end
|
data/lib/luca_book/journal.rb
CHANGED
@@ -12,10 +12,36 @@ module LucaBook
|
|
12
12
|
|
13
13
|
# create journal from hash
|
14
14
|
#
|
15
|
-
def self.create(
|
15
|
+
def self.create(dat)
|
16
|
+
d = LucaSupport::Code.keys_stringify(dat)
|
16
17
|
validate(d)
|
18
|
+
raise 'NoDateKey' unless d.key?('date')
|
19
|
+
|
17
20
|
date = Date.parse(d['date'])
|
18
21
|
|
22
|
+
# TODO: need to sync filename & content. Limit code length for filename
|
23
|
+
# codes = (debit_code + credit_code).uniq
|
24
|
+
codes = nil
|
25
|
+
|
26
|
+
create_record(nil, date, codes) { |f| f.write journal2csv(d) }
|
27
|
+
end
|
28
|
+
|
29
|
+
# update journal with hash.
|
30
|
+
# If record not found with id, no record will be created.
|
31
|
+
#
|
32
|
+
def self.save(dat)
|
33
|
+
d = LucaSupport::Code.keys_stringify(dat)
|
34
|
+
raise 'record has no id.' if d['id'].nil?
|
35
|
+
|
36
|
+
validate(d)
|
37
|
+
parts = d['id'].split('/')
|
38
|
+
raise 'invalid ID' if parts.length != 2
|
39
|
+
|
40
|
+
codes = nil
|
41
|
+
open_records(@dirname, parts[0], parts[1], codes, 'w') { |f, _path| f.write journal2csv(d) }
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.journal2csv(d)
|
19
45
|
debit_amount = LucaSupport::Code.decimalize(serialize_on_key(d['debit'], 'value'))
|
20
46
|
credit_amount = LucaSupport::Code.decimalize(serialize_on_key(d['credit'], 'value'))
|
21
47
|
raise 'BalanceUnmatch' if debit_amount.inject(:+) != credit_amount.inject(:+)
|
@@ -23,16 +49,13 @@ module LucaBook
|
|
23
49
|
debit_code = serialize_on_key(d['debit'], 'code')
|
24
50
|
credit_code = serialize_on_key(d['credit'], 'code')
|
25
51
|
|
26
|
-
|
27
|
-
# codes = (debit_code + credit_code).uniq
|
28
|
-
codes = nil
|
29
|
-
create_record!(date, codes) do |f|
|
52
|
+
csv = CSV.generate('', col_sep: "\t", headers: false) do |f|
|
30
53
|
f << debit_code
|
31
54
|
f << LucaSupport::Code.readable(debit_amount)
|
32
55
|
f << credit_code
|
33
56
|
f << LucaSupport::Code.readable(credit_amount)
|
34
57
|
['x-customer', 'x-editor'].each do |x_header|
|
35
|
-
f << [x_header, d[x_header]] if d.dig(x_header)
|
58
|
+
f << [x_header, d['headers'][x_header]] if d.dig('headers', x_header)
|
36
59
|
end
|
37
60
|
f << []
|
38
61
|
f << [d.dig('note')]
|
@@ -46,15 +69,7 @@ module LucaBook
|
|
46
69
|
change_codes(obj[:id], codes)
|
47
70
|
end
|
48
71
|
|
49
|
-
# define new transaction ID & write data at once
|
50
|
-
def self.create_record!(date_obj, codes = nil)
|
51
|
-
create_record(nil, date_obj, codes) do |f|
|
52
|
-
f.write CSV.generate('', col_sep: "\t", headers: false) { |c| yield(c) }
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
72
|
def self.validate(obj)
|
57
|
-
raise 'NoDateKey' unless obj.key?('date')
|
58
73
|
raise 'NoDebitKey' unless obj.key?('debit')
|
59
74
|
raise 'NoCreditKey' unless obj.key?('credit')
|
60
75
|
debit_codes = serialize_on_key(obj['debit'], 'code').compact
|
@@ -93,10 +108,16 @@ module LucaBook
|
|
93
108
|
when 3
|
94
109
|
line.each_with_index { |amount, j| record[:credit][j][:amount] = BigDecimal(amount.to_s) }
|
95
110
|
else
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
111
|
+
case body
|
112
|
+
when false
|
113
|
+
if line.empty?
|
114
|
+
record[:note] ||= []
|
115
|
+
body = true
|
116
|
+
else
|
117
|
+
record[:headers] ||= {}
|
118
|
+
record[:headers][line[0]] = line[1]
|
119
|
+
end
|
120
|
+
when true
|
100
121
|
record[:note] << line.join(' ') if body
|
101
122
|
end
|
102
123
|
end
|
data/lib/luca_book/list.rb
CHANGED
@@ -0,0 +1,120 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'pathname'
|
4
|
+
require 'date'
|
5
|
+
require 'luca_support'
|
6
|
+
require 'luca_record'
|
7
|
+
require 'luca_record/dict'
|
8
|
+
require 'luca_book'
|
9
|
+
|
10
|
+
# Journal List on specified term
|
11
|
+
#
|
12
|
+
module LucaBook
|
13
|
+
class ListByHeader < LucaBook::Journal
|
14
|
+
@dirname = 'journals'
|
15
|
+
|
16
|
+
def initialize(data, start_date, code = nil, header_name = nil)
|
17
|
+
@data = data
|
18
|
+
@code = code
|
19
|
+
@header = header_name
|
20
|
+
@start = start_date
|
21
|
+
@dict = LucaRecord::Dict.load('base.tsv')
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.term(from_year, from_month, to_year = from_year, to_month = from_month, code: nil, header: nil, basedir: @dirname)
|
25
|
+
data = Journal.term(from_year, from_month, to_year, to_month, code).select do |dat|
|
26
|
+
if code.nil?
|
27
|
+
true
|
28
|
+
else
|
29
|
+
[:debit, :credit].map { |key| serialize_on_key(dat[key], :code) }.flatten.include?(code)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
new data, Date.new(from_year.to_i, from_month.to_i, 1), code, header
|
33
|
+
end
|
34
|
+
|
35
|
+
def list_by_code
|
36
|
+
calc_code
|
37
|
+
convert_label
|
38
|
+
@data = @data.each_with_object([]) do |(k, v), a|
|
39
|
+
journals = v.map do |dat|
|
40
|
+
date, txid = decode_id(dat[:id])
|
41
|
+
{}.tap do |res|
|
42
|
+
res['header'] = k
|
43
|
+
res['date'] = date
|
44
|
+
res['no'] = txid
|
45
|
+
res['id'] = dat[:id]
|
46
|
+
res['diff'] = dat[:diff]
|
47
|
+
res['balance'] = dat[:balance]
|
48
|
+
res['counter_code'] = dat[:counter_code].length == 1 ? dat[:counter_code].first : dat[:counter_code]
|
49
|
+
res['note'] = dat[:note]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
a << { 'code' => v.last[:code], 'header' => k, 'balance' => v.last[:balance], 'count' => v.count, 'jounals' => journals }
|
53
|
+
end
|
54
|
+
readable(@data)
|
55
|
+
end
|
56
|
+
|
57
|
+
def accumulate_code
|
58
|
+
@data.each_with_object({}) do |dat, sum|
|
59
|
+
idx = dat.dig(:headers, @header) || 'others'
|
60
|
+
sum[idx] ||= BigDecimal('0')
|
61
|
+
sum[idx] += Util.diff_by_code(dat[:debit], @code) - Util.diff_by_code(dat[:credit], @code)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
private
|
66
|
+
|
67
|
+
def set_balance
|
68
|
+
return BigDecimal('0') if @code.nil? || /^[A-H]/.match(@code)
|
69
|
+
|
70
|
+
balance_dict = Dict.latest_balance
|
71
|
+
start_balance = BigDecimal(balance_dict.dig(@code.to_s, :balance) || '0')
|
72
|
+
start = Dict.issue_date(balance_dict)&.next_month
|
73
|
+
last = @start.prev_month
|
74
|
+
if last.year >= start.year && last.month >= start.month
|
75
|
+
#TODO: start_balance to be implemented by header
|
76
|
+
self.class.term(start.year, start.month, last.year, last.month, code: @code).accumulate_code
|
77
|
+
else
|
78
|
+
#start_balance
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def calc_code
|
83
|
+
raise 'no account code specified' if @code.nil?
|
84
|
+
|
85
|
+
@balance = set_balance
|
86
|
+
balance = @balance
|
87
|
+
res = {}
|
88
|
+
@data.each do |dat|
|
89
|
+
idx = dat.dig(:headers, @header) || 'others'
|
90
|
+
balance[idx] ||= BigDecimal('0')
|
91
|
+
res[idx] ||= []
|
92
|
+
{}.tap do |h|
|
93
|
+
h[:id] = dat[:id]
|
94
|
+
h[:diff] = Util.diff_by_code(dat[:debit], @code) - Util.diff_by_code(dat[:credit], @code)
|
95
|
+
balance[idx] += h[:diff]
|
96
|
+
h[:balance] = balance[idx]
|
97
|
+
h[:code] = @code
|
98
|
+
counter = h[:diff] * Util.pn_debit(@code) > 0 ? :credit : :debit
|
99
|
+
h[:counter_code] = dat[counter].map { |d| d[:code] }
|
100
|
+
h[:note] = dat[:note]
|
101
|
+
res[idx] << h
|
102
|
+
end
|
103
|
+
end
|
104
|
+
@data = res
|
105
|
+
self
|
106
|
+
end
|
107
|
+
|
108
|
+
def convert_label
|
109
|
+
@data.each do |_k, v|
|
110
|
+
v.each do |dat|
|
111
|
+
raise 'no account code specified' if @code.nil?
|
112
|
+
|
113
|
+
dat[:code] = "#{dat[:code]} #{@dict.dig(dat[:code], :label)}"
|
114
|
+
dat[:counter_code] = dat[:counter_code].map { |counter| "#{counter} #{@dict.dig(counter, :label)}" }
|
115
|
+
end
|
116
|
+
end
|
117
|
+
self
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
data/lib/luca_book/setup.rb
CHANGED
@@ -6,7 +6,7 @@ require 'fileutils'
|
|
6
6
|
module LucaBook
|
7
7
|
class Setup
|
8
8
|
# create project skeleton under specified directory
|
9
|
-
def self.create_project(country = nil, dir = LucaSupport::
|
9
|
+
def self.create_project(country = nil, dir = LucaSupport::PJDIR)
|
10
10
|
FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
|
11
11
|
Dir.chdir(dir) do
|
12
12
|
%w[data/journals data/balance dict].each do |subdir|
|
@@ -18,6 +18,7 @@ module LucaBook
|
|
18
18
|
'dict-en.tsv'
|
19
19
|
end
|
20
20
|
FileUtils.cp("#{__dir__}/templates/#{dict}", 'dict/base.tsv') unless File.exist?('dict/base.tsv')
|
21
|
+
FileUtils.cp("#{__dir__}/templates/config.yml", 'config.yml') unless File.exist?('config.yml')
|
21
22
|
prepare_starttsv(dict) unless File.exist? 'data/balance/start.tsv'
|
22
23
|
end
|
23
24
|
end
|
data/lib/luca_book/state.rb
CHANGED
@@ -208,19 +208,22 @@ module LucaBook
|
|
208
208
|
|
209
209
|
report['9142'] = (report['9142'] || BigDecimal('0')) + res['HA']
|
210
210
|
res['9142'] = report['9142']
|
211
|
-
res['10'] = sum_matched(report, /^[
|
212
|
-
|
211
|
+
res['10'] = sum_matched(report, /^[12][0-9A-Z]{2,}/)
|
212
|
+
jp_4v = sum_matched(report, /^[4][V]{2,}/) # deferred assets for JP GAAP
|
213
|
+
res['30'] = sum_matched(report, /^[34][0-9A-Z]{2,}/) - jp_4v
|
214
|
+
res['4V'] = jp_4v if CONFIG['country'] == 'jp'
|
213
215
|
res['50'] = sum_matched(report, /^[56][0-9A-Z]{2,}/)
|
214
216
|
res['70'] = sum_matched(report, /^[78][0-9A-Z]{2,}/)
|
215
217
|
res['91'] = sum_matched(report, /^91[0-9A-Z]{1,}/)
|
216
218
|
res['8ZZ'] = res['50'] + res['70']
|
217
219
|
res['9ZZ'] = sum_matched(report, /^[9][0-9A-Z]{2,}/)
|
218
220
|
|
219
|
-
res['1'] = res['10'] + res['
|
221
|
+
res['1'] = res['10'] + res['30']
|
220
222
|
res['5'] = res['8ZZ'] + res['9ZZ']
|
221
223
|
res['_d'] = report['_d']
|
222
224
|
|
223
225
|
report.each do |k, v|
|
226
|
+
res[k] ||= sum_matched(report, /^#{k}[0-9A-Z]{1,}/) if k.length == 2
|
224
227
|
res[k] = v if k.length == 3
|
225
228
|
end
|
226
229
|
|
@@ -245,14 +248,16 @@ module LucaBook
|
|
245
248
|
|
246
249
|
def set_balance
|
247
250
|
pre_last = @start_date.prev_month
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
251
|
+
start_year = if @start_date.month > CONFIG['fy_start'].to_i
|
252
|
+
pre_last.year
|
253
|
+
else
|
254
|
+
pre_last.year - 1
|
255
|
+
end
|
256
|
+
pre = self.class.accumulate_term(start_year, CONFIG['fy_start'], pre_last.year, pre_last.month)
|
253
257
|
|
254
258
|
base = Dict.latest_balance.each_with_object({}) do |(k, v), h|
|
255
259
|
h[k] = BigDecimal(v[:balance].to_s) if v[:balance]
|
260
|
+
h[k] ||= BigDecimal('0') if k.length == 2
|
256
261
|
end
|
257
262
|
if pre
|
258
263
|
idx = (pre.keys + base.keys).uniq
|
@@ -346,11 +351,11 @@ module LucaBook
|
|
346
351
|
private
|
347
352
|
|
348
353
|
def legal_items
|
349
|
-
return [] unless
|
354
|
+
return [] unless CONFIG['country']
|
350
355
|
|
351
|
-
case
|
356
|
+
case CONFIG['country']
|
352
357
|
when 'jp'
|
353
|
-
['91', '911', '912', '913', '9131', '9132', '914', '9141', '9142', '915', '916', '92', '93']
|
358
|
+
['31', '32', '33', '91', '911', '912', '913', '9131', '9132', '914', '9141', '9142', '915', '916', '92', '93']
|
354
359
|
end
|
355
360
|
end
|
356
361
|
end
|
@@ -20,36 +20,31 @@ code label xbrl_id consumption_tax income_tax
|
|
20
20
|
183 立替金
|
21
21
|
184 仮払金
|
22
22
|
1D0 Deferred income tax
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
440 繰延資産
|
49
|
-
441 開業費
|
50
|
-
442 創立費
|
51
|
-
442 新株発行費
|
52
|
-
443 社債発行費
|
23
|
+
30 Fixed Assets
|
24
|
+
31 Tangible Assets
|
25
|
+
311 Buildings us-gaap:BuildingsAndImprovementsGross
|
26
|
+
312 Equipment
|
27
|
+
313 Machinery
|
28
|
+
314 Vehicles
|
29
|
+
315 Tools
|
30
|
+
316 Land
|
31
|
+
317 Construction in progress us-gaap:ConstructionInProgressGross
|
32
|
+
318 Ships
|
33
|
+
32 Intangible Assets
|
34
|
+
321 Software
|
35
|
+
322 Goodwill us-gaap:Goodwill
|
36
|
+
323 Patents
|
37
|
+
324 借地権
|
38
|
+
325 商標権
|
39
|
+
326 電話加入権
|
40
|
+
33 Investments
|
41
|
+
331 Investment securities
|
42
|
+
332 Associated companies
|
43
|
+
333 長期貸付金
|
44
|
+
334 破産更正債権
|
45
|
+
335 長期前払費用
|
46
|
+
336 敷金保証金
|
47
|
+
337 Deferred income tax
|
53
48
|
50 Current Liabilities
|
54
49
|
50XX UNSETTLED_IMPORT
|
55
50
|
510 Notes payable us-gaap:NotesPayable
|
@@ -15,6 +15,7 @@ code label xbrl_id consumption_tax income_tax
|
|
15
15
|
130 売掛金 jppfs_cor:AccountsReceivableTrade
|
16
16
|
140 短期貸付金 jppfs_cor:ShortTermLoansReceivable
|
17
17
|
150 未収入金 jppfs_cor:AccountsReceivableOther
|
18
|
+
1501 未収消費税等
|
18
19
|
160 棚卸資産 jppfs_cor:Inventories
|
19
20
|
161 商品 jppfs_cor:Merchandize
|
20
21
|
162 製品 jppfs_cor:FinishedGoods
|
@@ -25,36 +26,38 @@ code label xbrl_id consumption_tax income_tax
|
|
25
26
|
182 前払費用 jppfs_cor:AdvancePaymentsOther
|
26
27
|
183 立替金 jppfs_cor:AdvancesPaid
|
27
28
|
184 仮払金 jppfs_cor:SuspensePayments
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
29
|
+
1841 仮払消費税等
|
30
|
+
30 固定資産 jppfs_cor:NonCurrentAssetsAbstract
|
31
|
+
31 有形固定資産 jppfs_cor:PropertyPlantAndEquipmentAbstract
|
32
|
+
311 建物 jppfs_cor:Buildings
|
33
|
+
312 構築物 jppfs_cor:Structures
|
34
|
+
313 機械装置 jppfs_cor:MachineryAndEquipment
|
35
|
+
314 車両運搬具 jppfs_cor:Vehicles
|
36
|
+
315 工具器具備品 jppfs_cor:ToolsFurnitureAndFixtures
|
37
|
+
316 土地 jppfs_cor:Land
|
38
|
+
317 建設仮勘定 jppfs_cor:ConstructionInProgress
|
39
|
+
318 船舶 jppfs_cor:Vessels
|
40
|
+
32 無形固定資産 jppfs_cor:IntansibleAssetsAbstract
|
41
|
+
321 ソフトウェア jppfs_cor:Software
|
42
|
+
322 のれん jppfs_cor:Goodwill
|
43
|
+
323 特許権 jppfs_cor:PatentRight
|
44
|
+
324 借地権 jppfs_cor:LeaseholdRight
|
45
|
+
325 商標権 jppfs_cor:RightOfTrademark
|
46
|
+
326 電話加入権 jppfs_cor:TelephoneSubscriptionRight
|
47
|
+
33 投資その他の資産 jppfs_cor:InvestmentsAndOtherAssetsAbstract
|
48
|
+
331 投資有価証券 jppfs_cor:InvestmentSecurities
|
49
|
+
332 関係会社株式 jppfs_cor:StocksOfSubsidiariesAndAffiliates
|
50
|
+
333 長期貸付金 jppfs_cor:LongTermLoansReceivable
|
51
|
+
334 破産更正債権 jppfs_cor:ClaimsProvableInBankruptcyClaimsProvableInRehabilitationAndOther
|
52
|
+
335 長期前払費用 jppfs_cor:LongTermPrepaidExpenses
|
53
|
+
336 敷金保証金 jppfs_cor:LeaseAndGuaranteeDeposits
|
54
|
+
337 繰延税金資産 jppfs_cor:DiferredTaxAssets
|
55
|
+
4V 繰延資産 jppfs_cor:DeferredAssets
|
56
|
+
4V1 開業費 jppfs_cor:BusinessCommencementExpensesDA
|
57
|
+
4V2 創立費 jppfs_cor:DeferredOrganisationExpensesDA
|
58
|
+
4V3 新株発行費 jppfs_cor:StockIssuanceCostDA
|
59
|
+
4V4 社債発行費 jppfs_cor:BondIssuanceCostDA
|
60
|
+
4V5 開発費 jppfs_cor:DevelopmentExpensesDA
|
58
61
|
5 負債・純資産合計 jppfs_cor:LiabilitiesAndNetAssets
|
59
62
|
50 流動負債 jppfs_cor:CurrentLiabilitiesAbstract
|
60
63
|
50XX UNSETTLED_IMPORT
|
@@ -69,6 +72,7 @@ code label xbrl_id consumption_tax income_tax
|
|
69
72
|
518 前受金 jppfs_cor:AdvancesReceived
|
70
73
|
519 預り金 jppfs_cor:DepositsReceived
|
71
74
|
51A 仮受金 jppfs_cor:SuspenseReceipt
|
75
|
+
51A1 仮受消費税等 jppfs_cor:SuspenseReceiptOfConsumptionTaxes
|
72
76
|
70 固定負債 jppfs_cor:NoncurrentLiabilitiesAbstract
|
73
77
|
711 社債 jppfs_cor:BondsPayable
|
74
78
|
712 長期借入金 jppfs_cor:LongTermLoansPayable
|
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.23
|
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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lucarecord
|
@@ -85,9 +85,11 @@ files:
|
|
85
85
|
- lib/luca_book/import_jp.rb
|
86
86
|
- lib/luca_book/journal.rb
|
87
87
|
- lib/luca_book/list.rb
|
88
|
+
- lib/luca_book/list_by_header.rb
|
88
89
|
- lib/luca_book/setup.rb
|
89
90
|
- lib/luca_book/state.rb
|
90
91
|
- lib/luca_book/templates/base-jp.xbrl.erb
|
92
|
+
- lib/luca_book/templates/config.yml
|
91
93
|
- lib/luca_book/templates/dict-en.tsv
|
92
94
|
- lib/luca_book/templates/dict-jp.tsv
|
93
95
|
- lib/luca_book/util.rb
|