lucabook 0.2.28 → 0.2.32
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 +19 -1
- data/lib/luca_book/dict.rb +25 -0
- data/lib/luca_book/import.rb +3 -1
- data/lib/luca_book/list.rb +116 -1
- data/lib/luca_book/list_by_header.rb +3 -11
- data/lib/luca_book/state.rb +7 -2
- data/lib/luca_book/templates/dict-jp-edinet.tsv +30 -3
- data/lib/luca_book/templates/dict-jp.tsv +3 -2
- data/lib/luca_book/templates/journals.html.erb +23 -0
- data/lib/luca_book/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 909f1f8b40a8f1ae8eda824b1d6ae4224e3bb13134a38be105c03fcbe7cd8368
|
4
|
+
data.tar.gz: 3e749783a1883ab31c3755a10e8f0e5133386194b933692b6305ecabbfa12e41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e3edf5fa76a523cb175a4e0120a212135c1807ee5670fca7a816eac02074990e165ea047a9969aab956eef606a8fbe6fa30e03c3de43508dbea86ef105a112d
|
7
|
+
data.tar.gz: 8ac22d5b5b3d0cd6a92d0ec7573e3847a72a7cf9e57b23415942702e4affd7756c530dd1417a883759f279bc424f2bee44b1b1564e6258eb99b047e6157841d0
|
data/exe/luca-book
CHANGED
@@ -26,6 +26,8 @@ class LucaCmd
|
|
26
26
|
else
|
27
27
|
render(LucaBook::List.term(*args, code: params['code'], recursive: params[:recursive]).list_by_code(params[:recursive]), params)
|
28
28
|
end
|
29
|
+
elsif params['render']
|
30
|
+
puts LucaBook::List.term(*args).render_html(params['render'])
|
29
31
|
else
|
30
32
|
render(LucaBook::List.term(*args).list_journals, params)
|
31
33
|
end
|
@@ -108,6 +110,11 @@ class LucaCmd
|
|
108
110
|
def self.update_balance(args, params)
|
109
111
|
LucaBook::Dict.generate_balance(*args)
|
110
112
|
end
|
113
|
+
|
114
|
+
def self.export_balance(args, params)
|
115
|
+
date = Date.new(args[0].to_i, args[1].to_i, args[2].to_i)
|
116
|
+
LucaBook::Dict.export_balance(date)
|
117
|
+
end
|
111
118
|
end
|
112
119
|
end
|
113
120
|
|
@@ -141,6 +148,8 @@ when /journals?/, 'j'
|
|
141
148
|
opt.on('-n VAL', 'report count') { |v| params[:n] = v.to_i }
|
142
149
|
opt.on('--nu', 'show table in nushell') { |_v| params[:output] = 'nu' }
|
143
150
|
opt.on('-o', '--output VAL', 'output serialized data') { |v| params[:output] = v }
|
151
|
+
opt.on('--html', 'output journals html') { |_v| params['render'] = :html }
|
152
|
+
opt.on('--pdf', 'output journals PDF') { |_v| params['render'] = :pdf }
|
144
153
|
opt.on_tail('List records. If you specify code and/or month, search on each criteria.')
|
145
154
|
args = opt.parse!(ARGV)
|
146
155
|
LucaCmd::Journal.list(args, params)
|
@@ -224,9 +233,11 @@ when /reports?/, 'r'
|
|
224
233
|
else
|
225
234
|
puts 'Proper subcommand needed.'
|
226
235
|
puts
|
227
|
-
puts 'Usage: luca-book (r|report[s]) (bs|pl) [options] YYYY M'
|
236
|
+
puts 'Usage: luca-book (r|report[s]) (bs|pl|mail|xbrl) [options] YYYY M'
|
228
237
|
puts ' bs: show balance sheet'
|
229
238
|
puts ' pl: show statement of income'
|
239
|
+
puts ' mail: send BS/PL via email'
|
240
|
+
puts ' xbrl: render XBRL report'
|
230
241
|
exit 1
|
231
242
|
end
|
232
243
|
when /balance/
|
@@ -238,6 +249,12 @@ when /balance/
|
|
238
249
|
args = opt.parse!(ARGV)
|
239
250
|
LucaCmd::Dict.update_balance(args, params)
|
240
251
|
end
|
252
|
+
when 'export'
|
253
|
+
OptionParser.new do |opt|
|
254
|
+
opt.banner = 'Usage: luca-book balance export YYYY M d'
|
255
|
+
args = opt.parse!(ARGV)
|
256
|
+
LucaCmd::Dict.export_balance(args, params)
|
257
|
+
end
|
241
258
|
end
|
242
259
|
else
|
243
260
|
puts 'Proper subcommand needed.'
|
@@ -245,5 +262,6 @@ else
|
|
245
262
|
puts 'Usage: luca-book (j[ournals]|r[eports]) subcommand'
|
246
263
|
puts ' journals: operate journal records'
|
247
264
|
puts ' reports: show reports'
|
265
|
+
puts ' balance update: generate accumulated balance'
|
248
266
|
exit 1
|
249
267
|
end
|
data/lib/luca_book/dict.rb
CHANGED
@@ -139,6 +139,31 @@ module LucaBook
|
|
139
139
|
File.open(filepath, 'w') { |f| f.write csv }
|
140
140
|
end
|
141
141
|
|
142
|
+
# TODO: support date in the middle of month.
|
143
|
+
def self.export_balance(date)
|
144
|
+
start_date, end_date = Util.current_fy(date, to: date)
|
145
|
+
labels = load('base.tsv')
|
146
|
+
bs = load_balance(start_date, end_date)
|
147
|
+
dat = [].tap do |res|
|
148
|
+
item = {}
|
149
|
+
item['date'] = date.to_s
|
150
|
+
item['debit'] = []
|
151
|
+
item['credit'] = []
|
152
|
+
bs.each do |code, balance|
|
153
|
+
next if balance.zero?
|
154
|
+
|
155
|
+
if /^[1-4]/.match(code)
|
156
|
+
item['debit'] << { 'label' => labels.dig(code, :label), 'amount' => LucaSupport::Code.readable(balance) }
|
157
|
+
elsif /^[5-9]/.match(code)
|
158
|
+
item['credit'] << { 'label' => labels.dig(code, :label), 'amount' => LucaSupport::Code.readable(balance) }
|
159
|
+
end
|
160
|
+
end
|
161
|
+
item['x-editor'] = 'LucaBook'
|
162
|
+
res << item
|
163
|
+
end
|
164
|
+
puts JSON.dump(dat)
|
165
|
+
end
|
166
|
+
|
142
167
|
def self.load_balance(start_date, end_date)
|
143
168
|
base = latest_balance(start_date).each_with_object({}) do |(k, v), h|
|
144
169
|
h[k] = BigDecimal(v[:balance].to_s) if v[:balance]
|
data/lib/luca_book/import.rb
CHANGED
@@ -81,7 +81,7 @@ module LucaBook
|
|
81
81
|
else
|
82
82
|
amount = BigDecimal(row[@config[:credit_amount]])
|
83
83
|
end
|
84
|
-
default_label = debit ? @config
|
84
|
+
default_label = debit ? @config[:default_debit] : @config[:default_credit]
|
85
85
|
code, options = search_code(row[@config[:label]], default_label, amount)
|
86
86
|
counter_code = @code_map.dig(@config[:counter_label])
|
87
87
|
if options
|
@@ -94,10 +94,12 @@ module LucaBook
|
|
94
94
|
d['date'] = parse_date(row)
|
95
95
|
if debit
|
96
96
|
d['debit'] = data
|
97
|
+
d['debit'][0]['code'] ||= DEBIT_DEFAULT
|
97
98
|
d['credit'] = data_c
|
98
99
|
else
|
99
100
|
d['debit'] = data_c
|
100
101
|
d['credit'] = data
|
102
|
+
d['credit'][0]['code'] ||= CREDIT_DEFAULT
|
101
103
|
end
|
102
104
|
d['note'] = Array(@config[:note]).map{ |col| row[col] }.join(' ')
|
103
105
|
d['headers'] = { 'x-editor' => "LucaBook::Import/#{@dict_name}" }
|
data/lib/luca_book/list.rb
CHANGED
@@ -101,10 +101,121 @@ module LucaBook #:nodoc:
|
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
104
|
+
def render_html(file_type = :html)
|
105
|
+
start_balance = set_balance(true)
|
106
|
+
@journals = group_by_code.map do |account|
|
107
|
+
balance = start_balance[account[:code]] || BigDecimal('0')
|
108
|
+
table = []
|
109
|
+
table << %Q(<h2 class="title">#{@@dict.dig(account[:code], :label)}</h2>)
|
110
|
+
|
111
|
+
account[:vouchers].map { |voucher| filter_by_code(voucher, account[:code]) }.flatten
|
112
|
+
.unshift({ balance: readable(balance) })
|
113
|
+
.map { |row|
|
114
|
+
balance += Util.pn_debit(account[:code]) * ((row.dig(:amount, :debit) || 0) - (row.dig(:amount, :credit) || 0))
|
115
|
+
row[:balance] = readable(balance)
|
116
|
+
row
|
117
|
+
}
|
118
|
+
.map { |row| render_line(row) }
|
119
|
+
.each_slice(28) do |rows|
|
120
|
+
table << table_header
|
121
|
+
table << rows.join("\n")
|
122
|
+
table << table_footer
|
123
|
+
table << %Q(<hr class='pgbr' />)
|
124
|
+
end
|
125
|
+
table[0..-2].join("\n")
|
126
|
+
end
|
127
|
+
|
128
|
+
case file_type
|
129
|
+
when :html
|
130
|
+
render_erb(search_template('journals.html.erb'))
|
131
|
+
when :pdf
|
132
|
+
erb2pdf(search_template('journals.html.erb'))
|
133
|
+
else
|
134
|
+
raise 'This filetype is not supported.'
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
def table_header
|
139
|
+
%Q(<table>
|
140
|
+
<thead>
|
141
|
+
<th>Date<br />No</th>
|
142
|
+
<th>Counter account</th>
|
143
|
+
<th>Sub account<br />Note</th>
|
144
|
+
<th>Debit</th>
|
145
|
+
<th>Credit</th>
|
146
|
+
<th>Balance</th>
|
147
|
+
</thead>
|
148
|
+
<tbody>)
|
149
|
+
end
|
150
|
+
|
151
|
+
def table_footer
|
152
|
+
%Q(</tbody>
|
153
|
+
</table>)
|
154
|
+
end
|
155
|
+
|
156
|
+
def filter_by_code(voucher, code)
|
157
|
+
[:debit, :credit].each_with_object([]) do |balance, lines|
|
158
|
+
voucher[balance].each do |record|
|
159
|
+
next unless /^#{code}/.match(record[:code])
|
160
|
+
|
161
|
+
counter_balance = (balance == :debit) ? :credit : :debit
|
162
|
+
view = { code: record[:code], amount: {} }
|
163
|
+
view[:date], view[:txid] = decode_id(voucher[:id])
|
164
|
+
view[:label] = @@dict.dig(record[:code], :label) if record[:code].length >= 4
|
165
|
+
view[:label] = voucher.dig(:headers, 'x-customer') if view[:label].nil?
|
166
|
+
view[:amount][balance] = readable(record[:amount])
|
167
|
+
view[:counter_code] = voucher.dig(counter_balance, 0, :code)
|
168
|
+
view[:counter_label] = @@dict.dig(view[:counter_code], :label) || ''
|
169
|
+
view[:counter_label] += ' sundry a/c' if voucher[counter_balance].length > 1
|
170
|
+
view[:note] = voucher[:note]
|
171
|
+
lines << view
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
def render_line(view)
|
177
|
+
%Q(<tr>
|
178
|
+
<td class="date">#{view[:date]}<br /><div>#{view[:txid]}</div></td>
|
179
|
+
<td class="counter">#{view[:counter_label]}</td>
|
180
|
+
<td class="note">#{view[:label]}<br /><div class="note">#{view[:note]}</div></td>
|
181
|
+
<td class="debit amount">#{view.dig(:amount, :debit)}</td>
|
182
|
+
<td class="credit amount">#{view.dig(:amount, :credit)}</td>
|
183
|
+
<td class="balance">#{view[:balance]}</td>
|
184
|
+
</tr>)
|
185
|
+
end
|
186
|
+
|
187
|
+
def group_by_code(level = 3)
|
188
|
+
list_accounts.map do |code|
|
189
|
+
vouchers = @data.filter do |voucher|
|
190
|
+
codes = [:debit, :credit].map do |balance|
|
191
|
+
voucher[balance].map { |record| record[:code][0, level] }
|
192
|
+
end
|
193
|
+
codes.flatten.include?(code)
|
194
|
+
end
|
195
|
+
{ code: code, vouchers: vouchers }
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
def list_accounts(level = 3)
|
200
|
+
return nil if level < 3
|
201
|
+
|
202
|
+
list = @data.each_with_object([]) do |voucher, codes|
|
203
|
+
[:debit, :credit].each do |balance|
|
204
|
+
voucher[balance].each do |record|
|
205
|
+
next if record[:code].length < level
|
206
|
+
|
207
|
+
codes << record[:code][0, level]
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
list.uniq.sort
|
212
|
+
end
|
213
|
+
|
104
214
|
private
|
105
215
|
|
106
216
|
def set_balance(recursive = false)
|
107
|
-
return
|
217
|
+
return LucaBook::State.start_balance(@start.year, @start.month, recursive: recursive) if @code.nil?
|
218
|
+
return BigDecimal('0') if /^[A-H]/.match(@code)
|
108
219
|
|
109
220
|
LucaBook::State.start_balance(@start.year, @start.month, recursive: recursive)[@code] || BigDecimal('0')
|
110
221
|
end
|
@@ -145,5 +256,9 @@ module LucaBook #:nodoc:
|
|
145
256
|
end
|
146
257
|
end
|
147
258
|
end
|
259
|
+
|
260
|
+
def lib_path
|
261
|
+
__dir__
|
262
|
+
end
|
148
263
|
end
|
149
264
|
end
|
@@ -49,7 +49,7 @@ module LucaBook #:nodoc:
|
|
49
49
|
res['note'] = dat[:note]
|
50
50
|
end
|
51
51
|
end
|
52
|
-
a << { 'code' => v.last[:code], 'header' => k, 'balance' => v.last[:balance], 'count' => v.count, '
|
52
|
+
a << { 'code' => v.last[:code], 'header' => k, 'balance' => v.last[:balance], 'count' => v.count, 'journals' => journals }
|
53
53
|
end
|
54
54
|
readable(@data)
|
55
55
|
end
|
@@ -67,16 +67,8 @@ module LucaBook #:nodoc:
|
|
67
67
|
def set_balance
|
68
68
|
return BigDecimal('0') if @code.nil? || /^[A-H]/.match(@code)
|
69
69
|
|
70
|
-
|
71
|
-
start_balance
|
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
|
70
|
+
#TODO: start_balance to be implemented by header
|
71
|
+
LucaBook::State.start_balance(@start.year, @start.month)
|
80
72
|
end
|
81
73
|
|
82
74
|
def calc_code
|
data/lib/luca_book/state.rb
CHANGED
@@ -146,7 +146,7 @@ module LucaBook
|
|
146
146
|
res['debit_label'] = base[:debit][i] ? @@dict.dig(base[:debit][i].keys[0], :label) : ''
|
147
147
|
#res['debit_balance'] = base[:debit][i] ? (@start_balance.dig(base[:debit][i].keys[0]) || 0) + base[:debit][i].values[0] : ''
|
148
148
|
res['debit_balance'] = base[:debit][i] ? base[:debit][i].values[0] : ''
|
149
|
-
res['credit_label'] = base[:credit][i] ?
|
149
|
+
res['credit_label'] = base[:credit][i] ? @@dict.dig(base[:credit][i].keys[0], :label) : ''
|
150
150
|
#res['credit_balance'] = base[:credit][i] ? (@start_balance.dig(base[:credit][i].keys[0]) || 0) + base[:credit][i].values[0] : ''
|
151
151
|
res['credit_balance'] = base[:credit][i] ? base[:credit][i].values[0] : ''
|
152
152
|
a << res
|
@@ -232,6 +232,7 @@ module LucaBook
|
|
232
232
|
recursive ? total_subaccount(total) : total
|
233
233
|
end
|
234
234
|
|
235
|
+
# TODO: currency setting other than JPY
|
235
236
|
def render_xbrl(filename = nil)
|
236
237
|
set_bs(3, legal: true)
|
237
238
|
set_pl(3)
|
@@ -260,7 +261,11 @@ module LucaBook
|
|
260
261
|
return nil if tag.nil?
|
261
262
|
return nil if readable(amount).zero? && prior_amount.nil?
|
262
263
|
|
263
|
-
prior = prior_amount.nil?
|
264
|
+
prior = if prior_amount.nil?
|
265
|
+
/^[9]/.match(code) ? "<#{tag} decimals=\"0\" unitRef=\"JPY\" contextRef=\"Prior1YearNonConsolidatedInstant\">0</#{tag}>\n" : ''
|
266
|
+
else
|
267
|
+
"<#{tag} decimals=\"0\" unitRef=\"JPY\" contextRef=\"Prior1YearNonConsolidatedInstant\">#{readable(prior_amount)}</#{tag}>\n"
|
268
|
+
end
|
264
269
|
current = "<#{tag} decimals=\"0\" unitRef=\"JPY\" contextRef=\"#{context}\">#{readable(amount)}</#{tag}>"
|
265
270
|
|
266
271
|
prior + current
|
@@ -16,6 +16,10 @@ code label xbrl_id consumption_tax income_tax
|
|
16
16
|
140 短期貸付金 jppfs_cor:ShortTermLoansReceivable
|
17
17
|
150 未収入金 jppfs_cor:AccountsReceivableOther
|
18
18
|
1501 未収消費税等
|
19
|
+
1502 未収法人税
|
20
|
+
1503 未収都道府県住民税
|
21
|
+
1504 未収地方事業税
|
22
|
+
1505 未収市民税
|
19
23
|
160 棚卸資産 jppfs_cor:Inventories
|
20
24
|
161 商品 jppfs_cor:Merchandize
|
21
25
|
162 製品 jppfs_cor:FinishedGoods
|
@@ -27,6 +31,18 @@ code label xbrl_id consumption_tax income_tax
|
|
27
31
|
183 立替金 jppfs_cor:AdvancesPaid
|
28
32
|
184 仮払金 jppfs_cor:SuspensePayments
|
29
33
|
1841 仮払消費税等
|
34
|
+
185 仮払税金
|
35
|
+
1851 仮払法人税
|
36
|
+
1852 仮払法人税(地方)
|
37
|
+
1854 仮払地方税特別法人事業税
|
38
|
+
1855 仮払地方税所得割
|
39
|
+
1856 仮払地方税収入割
|
40
|
+
1857 仮払地方税資本割
|
41
|
+
1858 仮払地方税付加価値割
|
42
|
+
1859 仮払地方税法人税割
|
43
|
+
185A 仮払地方税均等割
|
44
|
+
185B 仮払消費税
|
45
|
+
185C 仮払地方消費税
|
30
46
|
30 固定資産 jppfs_cor:NonCurrentAssetsAbstract
|
31
47
|
31 有形固定資産 jppfs_cor:PropertyPlantAndEquipmentAbstract
|
32
48
|
311 建物 jppfs_cor:Buildings
|
@@ -67,10 +83,18 @@ code label xbrl_id consumption_tax income_tax
|
|
67
83
|
513 コマーシャルペーパー jppfs_cor:CommercialPapersLiabilities
|
68
84
|
514 未払金 jppfs_cor:AccountsPayableOther
|
69
85
|
515 未払法人税等 jppfs_cor:IncomeTaxesPayable
|
86
|
+
5151 未払法人税
|
87
|
+
5152 未払地方事業税
|
88
|
+
5153 未払都道府県民税
|
89
|
+
5154 未払市民税
|
70
90
|
516 未払消費税等 jppfs_cor:AccruedConsumptionTaxes
|
71
91
|
517 未払費用 jppfs_cor:AccruedExpenses
|
72
92
|
518 前受金 jppfs_cor:AdvancesReceived
|
73
93
|
519 預り金 jppfs_cor:DepositsReceived
|
94
|
+
5191 所得税源泉給与
|
95
|
+
5192 住民税
|
96
|
+
5193 所得税源泉士業
|
97
|
+
5194 所得税源泉報酬
|
74
98
|
51A 仮受金 jppfs_cor:SuspenseReceipt
|
75
99
|
51A1 仮受消費税等 jppfs_cor:SuspenseReceiptOfConsumptionTaxes
|
76
100
|
70 固定負債 jppfs_cor:NoncurrentLiabilitiesAbstract
|
@@ -82,14 +106,15 @@ code label xbrl_id consumption_tax income_tax
|
|
82
106
|
91 株主資本 jppfs_cor:ShareholdersAbstract
|
83
107
|
911 資本金 jppfs_cor:CapitalStock
|
84
108
|
912 新株式申込証拠金 jppfs_cor:DepositForSubscriptionsToShares
|
85
|
-
913 資本剰余金 jppfs_cor:
|
109
|
+
913 資本剰余金 jppfs_cor:CapitalSurplus
|
86
110
|
9131 資本準備金 jppfs_cor:LegalCapitalSurplus
|
87
111
|
9132 その他資本剰余金 jppfs_cor:OtherCapitalSurplus
|
88
112
|
914 利益剰余金 jppfs_cor:RetainedEarnings
|
89
113
|
9141 利益準備金 jppfs_cor:LegalRetainedEarnings
|
90
114
|
9142 その他利益剰余金 jppfs_cor:OtherRetainedEarningsAbstract
|
91
|
-
915
|
92
|
-
916
|
115
|
+
915 利益準備金
|
116
|
+
916 自己株式 jppfs_cor:TreasuryStock
|
117
|
+
917 自己株式申込証拠金 jppfs_cor:DepositForSubscriptionsToTreasuryStock
|
93
118
|
92 評価換算差額等 jppfs_cor:ValuationAndTranslationAdjustments
|
94
119
|
921 有価証券評価差額金 jppfs_cor:ValuationDifferenceOnAvailableForSaleSecurities
|
95
120
|
922 為替換算調整勘定 jppfs_cor:ForeignCurrencyTranslationAdjustment
|
@@ -124,6 +149,8 @@ C1F 水道光熱費 jppfs_cor:UtilitiesExpensesSGA
|
|
124
149
|
C1G 消耗品費 jppfs_cor:SuppliesExpensesSGA
|
125
150
|
C1H 保険料 jppfs_cor:InsuranceExpensesSGA
|
126
151
|
C1I 租税公課 jppfs_cor:TaxesAndDuesSGA
|
152
|
+
C1I1 消費税
|
153
|
+
C1I2 事業税
|
127
154
|
C1J 賃借料 jppfs_cor:RentExpensesSGA
|
128
155
|
C1K 新聞図書費 jppfs_cor:BookExpensesSGA
|
129
156
|
C1L 貸倒損失 jppfs_cor:BadDebtsExpensesSGA
|
@@ -17,8 +17,9 @@ code label xbrl_id consumption_tax income_tax
|
|
17
17
|
150 未収入金 jpfr-t-cte:AccruedIncome
|
18
18
|
1501 未収消費税等 jpfr-etax-t-cte:SuspenseAccountPaymentConsumptionTaxes
|
19
19
|
1502 未収法人税
|
20
|
-
1503
|
20
|
+
1503 未収都道府県住民税
|
21
21
|
1504 未収地方事業税
|
22
|
+
1505 未収市民税
|
22
23
|
160 棚卸資産
|
23
24
|
161 商品 jpfr-t-cte:Merchandise
|
24
25
|
162 製品 jpfr-t-cte:FinishedGoods
|
@@ -105,7 +106,7 @@ code label xbrl_id consumption_tax income_tax
|
|
105
106
|
91 株主資本 jpfr-t-cte:ShareholdersEquity
|
106
107
|
911 資本金 jpfr-t-cte:CapitalStock
|
107
108
|
912 新株式申込証拠金 jpfr-t-cte:DepositForSubscriptionsToShares
|
108
|
-
913 資本剰余金 jpfr-t-cte:
|
109
|
+
913 資本剰余金 jpfr-t-cte:CapitalSurplus
|
109
110
|
9131 資本準備金 jpfr-t-cte:LegalCapitalSurplus
|
110
111
|
9132 その他資本剰余金 jpfr-t-cte:OtherCapitalSurplus
|
111
112
|
914 繰越利益剰余金 jpfr-t-cte:RetainedEarningsBroughtForward
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta charset="utf-8">
|
4
|
+
<style>
|
5
|
+
body { size: A4; padding-top: 2em; padding-bottom: 2em }
|
6
|
+
.pgbr { page-break-after: always; visibility: hidden }
|
7
|
+
.title { margin-bottom: 1.5rem; text-align: center }
|
8
|
+
div.note { font-size: .8em }
|
9
|
+
table { border-collapse: collapse; max-width: 92%; margin: 1em auto }
|
10
|
+
th, td { border-bottom: solid 1px #555; }
|
11
|
+
td div { break-before: avoid-page; break-after: avoid-page; break-inside: avoid-page }
|
12
|
+
td { padding-top: .3em; padding-bottom: .3em; break-inside: avoid-page }
|
13
|
+
td.date { min-width: 7em; text-align: right; padding-right: 1em }
|
14
|
+
td.counter { min-width: 8.5em; padding-right: .5em }
|
15
|
+
td.note { min-width: 12em }
|
16
|
+
td.amount { text-align: right; min-width: 7em }
|
17
|
+
td.balance { text-align: right; min-width: 10em; padding-right: 1em }
|
18
|
+
</style>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<%= @journals.join("<hr class='pgbr' />\n") %>
|
22
|
+
</body>
|
23
|
+
</html>
|
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.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuma Takahiro
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lucarecord
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
version: 12.3.3
|
69
69
|
description: 'Book keep
|
70
70
|
|
71
|
-
'
|
71
|
+
'
|
72
72
|
email:
|
73
73
|
- co.chuma@gmail.com
|
74
74
|
executables:
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- lib/luca_book/templates/dict-en.tsv
|
96
96
|
- lib/luca_book/templates/dict-jp-edinet.tsv
|
97
97
|
- lib/luca_book/templates/dict-jp.tsv
|
98
|
+
- lib/luca_book/templates/journals.html.erb
|
98
99
|
- lib/luca_book/templates/monthly-report.html.erb
|
99
100
|
- lib/luca_book/test.rb
|
100
101
|
- lib/luca_book/util.rb
|
@@ -105,7 +106,7 @@ licenses:
|
|
105
106
|
metadata:
|
106
107
|
homepage_uri: https://github.com/chumaltd/luca/tree/master/lucabook
|
107
108
|
source_code_uri: https://github.com/chumaltd/luca/tree/master/lucabook
|
108
|
-
post_install_message:
|
109
|
+
post_install_message:
|
109
110
|
rdoc_options: []
|
110
111
|
require_paths:
|
111
112
|
- lib
|
@@ -120,8 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
121
|
- !ruby/object:Gem::Version
|
121
122
|
version: '0'
|
122
123
|
requirements: []
|
123
|
-
rubygems_version: 3.2.
|
124
|
-
signing_key:
|
124
|
+
rubygems_version: 3.2.5
|
125
|
+
signing_key:
|
125
126
|
specification_version: 4
|
126
127
|
summary: Book keep
|
127
128
|
test_files: []
|