luca-jp 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/luca-jp +12 -0
- data/lib/luca/jp.rb +2 -0
- data/lib/luca/jp/aoiro.rb +210 -56
- data/lib/luca/jp/chihouzei.rb +28 -11
- data/lib/luca/jp/common.rb +22 -3
- data/lib/luca/jp/it_part.rb +1 -1
- data/lib/luca/jp/syouhizei.rb +2 -2
- data/lib/luca/jp/templates/beppyo2.xml.erb +31 -0
- data/lib/luca/jp/templates/beppyo4.xml.erb +32 -10
- data/lib/luca/jp/templates/beppyo51.xml.erb +14 -7
- data/lib/luca/jp/templates/beppyo52.xml.erb +50 -13
- data/lib/luca/jp/templates/chidai-meisai.xml.erb +15 -0
- data/lib/luca/jp/templates/el-no6-43.xml.erb +1 -1
- data/lib/luca/jp/templates/el-no6-9.xml.erb +2 -2
- data/lib/luca/jp/templates/el-no6.xml.erb +12 -20
- data/lib/luca/jp/templates/eltax-userinf.xml.erb +20 -0
- data/lib/luca/jp/templates/eltax.xml.erb +7 -7
- data/lib/luca/jp/templates/gaikyo.xml.erb +33 -0
- data/lib/luca/jp/templates/kaikake-meisai.xml.erb +16 -0
- data/lib/luca/jp/templates/kariire-meisai.xml.erb +13 -0
- data/lib/luca/jp/templates/shoken-meisai.xml.erb +21 -0
- data/lib/luca/jp/templates/tekiyougaku.xml.erb +2 -0
- data/lib/luca/jp/templates/yokin-meisai.xml.erb +7 -4
- data/lib/luca/jp/uchiwake.rb +195 -0
- data/lib/luca/jp/urikake.rb +47 -0
- data/lib/luca/jp/util.rb +30 -0
- data/lib/luca/jp/version.rb +1 -1
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d797219b1ac78940861db1131f44024ddfce43b52dbaaf8b9d48fc6ac456fdf5
|
4
|
+
data.tar.gz: 054d31fcf2f6bfdf6a37a4f58804518ca1264dc20c10fc6161e03e6db7369ce9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45620145366f9d2a519c438b1b11a69404f5f70a97be2529f4967a0a060297c99e490afc2e0b8fae0ac7bce95c99b6bba670adc01a63f157d55a174cb9c6faec
|
7
|
+
data.tar.gz: '08f51ad7ca1a249511b9e049a1dffd5246a64597c626bf04b9d0858360d81501da54b1a4f5a89b77df34131a9b03e8acee03e23e147066c293ae82c0b1f2d9fe'
|
data/exe/luca-jp
CHANGED
@@ -27,6 +27,11 @@ class LucaCmd
|
|
27
27
|
puts Luca::Jp::Chihouzei.range(*args).kani
|
28
28
|
end
|
29
29
|
end
|
30
|
+
|
31
|
+
def self.urikake(args, params)
|
32
|
+
date = "#{args[0]}-#{args[1]}-1"
|
33
|
+
Luca::Jp::Urikake.new(date).report(params[:total])
|
34
|
+
end
|
30
35
|
end
|
31
36
|
|
32
37
|
cmd = ARGV.shift
|
@@ -54,4 +59,11 @@ when /chihou?zei/
|
|
54
59
|
args = opt.parse!(ARGV)
|
55
60
|
LucaCmd.chihouzei(args, params)
|
56
61
|
end
|
62
|
+
when /urikake/
|
63
|
+
OptionParser.new do |opt|
|
64
|
+
opt.banner = 'Usage: luca-jp urikake [options] yyyy mm'
|
65
|
+
opt.on('--total VAL', '売掛金総額') { |v| params[:total] = v&.to_i }
|
66
|
+
args = opt.parse!(ARGV)
|
67
|
+
LucaCmd.urikake(args, params)
|
68
|
+
end
|
57
69
|
end
|
data/lib/luca/jp.rb
CHANGED
data/lib/luca/jp/aoiro.rb
CHANGED
@@ -16,6 +16,7 @@ module Luca
|
|
16
16
|
include Luca::Jp::Common
|
17
17
|
include Luca::Jp::ItPart
|
18
18
|
include Luca::Jp::Util
|
19
|
+
include Luca::Jp::Uchiwake
|
19
20
|
|
20
21
|
@dirname = 'journals'
|
21
22
|
@record_type = 'raw'
|
@@ -51,18 +52,34 @@ module Luca
|
|
51
52
|
@procedure_code = 'RHO0012'
|
52
53
|
@procedure_name = '内国法人の確定申告(青色)'
|
53
54
|
@version = '20.0.2'
|
54
|
-
|
55
|
-
|
55
|
+
@都道府県民税法人税割中間納付 = prepaid_tax('1859')
|
56
|
+
@都道府県民税均等割中間納付 = prepaid_tax('185A')
|
57
|
+
@都道府県民税中間納付 = @都道府県民税法人税割中間納付 + @都道府県民税均等割中間納付
|
58
|
+
@市民税法人税割中間納付 = prepaid_tax('185D')
|
59
|
+
@市民税均等割中間納付 = prepaid_tax('185E')
|
60
|
+
@市民税中間納付 = @市民税法人税割中間納付 + @市民税均等割中間納付
|
56
61
|
@法人税期中増, @法人税期中減 = 未納法人税期中増減
|
57
62
|
@都道府県民税期中増, @都道府県民税期中減 = 未納都道府県民税期中増減
|
58
63
|
@市民税期中増, @市民税期中減 = 未納市民税期中増減
|
59
64
|
@事業税期中増, @事業税期中減 = 未納事業税期中増減
|
65
|
+
@事業税中間納付 = prepaid_tax('1854') + prepaid_tax('1855') + prepaid_tax('1856') + prepaid_tax('1857') + prepaid_tax('1858')
|
60
66
|
@納税充当金期中増, @納税充当金期中減 = 納税充当金期中増減
|
67
|
+
@翌期還付法人税 = 中間還付税額(@確定法人税額 + @確定地方法人税額, @法人税中間納付 + @地方法人税中間納付)
|
61
68
|
@概況売上 = gaikyo('A0')
|
62
|
-
@form_sec = [
|
63
|
-
|
69
|
+
@form_sec = [
|
70
|
+
'HOA112', 'HOA116', 'HOA201', 'HOA420', 'HOA511', 'HOA522', 別表七フォーム,
|
71
|
+
'HOE200', 適用額明細フォーム,
|
72
|
+
'HOI010', 有価証券内訳フォーム, 買掛金内訳フォーム, 'HOI100', 借入金内訳フォーム, 'HOI141', 地代家賃内訳フォーム,
|
73
|
+
'HOK010'
|
74
|
+
].compact.map{ |c| form_rdf(c) }.join('')
|
75
|
+
#@extra_form_sec = ['HOI040']
|
64
76
|
@it = it_part
|
65
|
-
@form_data = [
|
77
|
+
@form_data = [
|
78
|
+
別表一, 別表一次葉, 別表二, 別表四簡易, 別表五一, 別表五二, 別表七, 別表十五,
|
79
|
+
適用額明細,
|
80
|
+
預貯金内訳, 有価証券内訳, 買掛金内訳, 仮受金内訳, 借入金内訳, 役員報酬内訳, 地代家賃内訳,
|
81
|
+
概況説明
|
82
|
+
].compact.join("\n")
|
66
83
|
render_erb(search_template('aoiro.xtx.erb'))
|
67
84
|
end
|
68
85
|
end
|
@@ -82,7 +99,7 @@ module Luca
|
|
82
99
|
else
|
83
100
|
item['credit'] << { 'label' => '未払法人税', 'amount' => dat[:kokuzei][:zeigaku] - dat[:kokuzei][:chukan] }
|
84
101
|
end
|
85
|
-
item['debit'] << { 'label' => '法人税、住民税及び事業税', 'amount' => dat[:kokuzei][:zeigaku] }
|
102
|
+
item['debit'] << { 'label' => '法人税、住民税及び事業税', 'amount' => dat[:kokuzei][:zeigaku] } if dat[:kokuzei][:zeigaku] > 0
|
86
103
|
if dat[:chihou][:chukan] > 0
|
87
104
|
item['credit'] << { 'label' => '仮払法人税(地方)', 'amount' => dat[:chihou][:chukan] }
|
88
105
|
end
|
@@ -91,7 +108,7 @@ module Luca
|
|
91
108
|
else
|
92
109
|
item['credit'] << { 'label' => '未払法人税', 'amount' => dat[:chihou][:zeigaku] - dat[:chihou][:chukan] }
|
93
110
|
end
|
94
|
-
item['debit'] << { 'label' => '法人税、住民税及び事業税', 'amount' => dat[:chihou][:zeigaku] }
|
111
|
+
item['debit'] << { 'label' => '法人税、住民税及び事業税', 'amount' => dat[:chihou][:zeigaku] } if dat[:chihou][:zeigaku] > 0
|
95
112
|
item['x-editor'] = 'LucaJp'
|
96
113
|
res << item
|
97
114
|
puts JSON.dump(res)
|
@@ -115,8 +132,17 @@ module Luca
|
|
115
132
|
@当期純損益 = readable(@pl_data.dig('HA'))
|
116
133
|
@法人税等 = readable(@pl_data.dig('H0'))
|
117
134
|
_, @納付事業税 = 未納事業税期中増減
|
118
|
-
|
119
|
-
|
135
|
+
@別表四調整所得 = @当期純損益 + @法人税等 - @納付事業税
|
136
|
+
|
137
|
+
@当期還付法人税 = refund_tax('1502')
|
138
|
+
@当期還付都道府県住民税 = refund_tax('1503')
|
139
|
+
@翌期還付都道府県住民税 = 中間還付税額(@税額.dig(:kenmin, :kintou), @都道府県民税均等割中間納付) + 中間還付税額(@税額.dig(:kenmin, :houjinzei), @都道府県民税法人税割中間納付)
|
140
|
+
@当期還付市民税 = refund_tax('1505')
|
141
|
+
@翌期還付市民税 = 中間還付税額(@税額.dig(:shimin, :kintou), @市民税均等割中間納付) + 中間還付税額(@税額.dig(:shimin, :houjinzei), @市民税法人税割中間納付)
|
142
|
+
@当期還付事業税 = 還付事業税
|
143
|
+
@事業税期首残高 = 期首未納事業税 > 0 ? 期首未納事業税 : (@当期還付事業税 * -1)
|
144
|
+
@翌期還付事業税 = 中間還付税額(確定事業税, @事業税中間納付)
|
145
|
+
@仮払税金 = @翌期還付法人税 + @翌期還付都道府県住民税 + @翌期還付事業税 + @翌期還付市民税
|
120
146
|
|
121
147
|
render_erb(search_template('beppyo4.xml.erb'))
|
122
148
|
end
|
@@ -126,6 +152,10 @@ module Luca
|
|
126
152
|
end
|
127
153
|
|
128
154
|
def 別表五二
|
155
|
+
@消費税中間納付額 = 消費税中間納付額 + 地方消費税中間納付額
|
156
|
+
@当期還付消費税 = refund_tax('1501')
|
157
|
+
@消費税期首残高 = 期首未納消費税 > 0 ? 期首未納消費税 : (@当期還付消費税 * -1)
|
158
|
+
@翌期還付消費税 = 中間還付税額(@消費税期中増, @消費税中間納付額)
|
129
159
|
@その他事業税 = 租税公課
|
130
160
|
render_erb(search_template('beppyo52.xml.erb'))
|
131
161
|
end
|
@@ -149,29 +179,15 @@ module Luca
|
|
149
179
|
render_erb(search_template('beppyo15.xml.erb'))
|
150
180
|
end
|
151
181
|
|
152
|
-
def
|
153
|
-
|
154
|
-
next unless /^110[0-9A-Z]/.match(k)
|
155
|
-
next unless readable(v || 0) > 0
|
182
|
+
def 適用額明細フォーム
|
183
|
+
return nil if @確定法人税額 == 0
|
156
184
|
|
157
|
-
|
158
|
-
end
|
159
|
-
render_erb(search_template('yokin-meisai.xml.erb'))
|
160
|
-
end
|
161
|
-
|
162
|
-
def 仮受金内訳
|
163
|
-
@源泉給与 = readable(@bs_data.dig('5191') || 0)
|
164
|
-
@源泉報酬 = readable(@bs_data.dig('5193') || 0)
|
165
|
-
render_erb(search_template('kariuke-meisai.xml.erb'))
|
166
|
-
end
|
167
|
-
|
168
|
-
def 役員報酬内訳
|
169
|
-
@役員報酬 = readable(@pl_data.dig('C11') || 0)
|
170
|
-
@給料 = readable(@pl_data.dig('C12') || 0)
|
171
|
-
render_erb(search_template('yakuin-meisai.xml.erb'))
|
185
|
+
'HOE990'
|
172
186
|
end
|
173
187
|
|
174
188
|
def 適用額明細
|
189
|
+
return nil if @確定法人税額 == 0
|
190
|
+
|
175
191
|
render_erb(search_template('tekiyougaku.xml.erb'))
|
176
192
|
end
|
177
193
|
|
@@ -210,6 +226,10 @@ module Luca
|
|
210
226
|
render_erb(search_template('gaikyo.xml.erb'))
|
211
227
|
end
|
212
228
|
|
229
|
+
def self.dict
|
230
|
+
@@dict
|
231
|
+
end
|
232
|
+
|
213
233
|
private
|
214
234
|
|
215
235
|
def 期首未納事業税
|
@@ -228,10 +248,122 @@ module Luca
|
|
228
248
|
readable(LucaBook::State.gross(@start_date.year, @start_date.month, @end_date.year, @end_date.month, code: 'C1I')[:debit]['C1I']) || 0
|
229
249
|
end
|
230
250
|
|
251
|
+
def 別表二株主リスト
|
252
|
+
return '' if beppyo2_config('owners').nil?
|
253
|
+
|
254
|
+
tags = beppyo2_config('owners')[1..-1]&.map.with_index(2) do |owner, i|
|
255
|
+
%Q(<VAE00170>
|
256
|
+
<VAE00180>
|
257
|
+
<VAE00190>#{i}</VAE00190>
|
258
|
+
<VAE00200>#{i}</VAE00200>
|
259
|
+
</VAE00180>
|
260
|
+
<VAE00210>
|
261
|
+
#{render_attr('VAE00220', owner['address'])}
|
262
|
+
#{render_attr('VAE00230', owner['name'])}
|
263
|
+
</VAE00210>
|
264
|
+
#{render_attr('VAE00235', owner['relation'] || '<kubun_CD>90</kubun_CD>')}
|
265
|
+
<VAE00250>
|
266
|
+
<VAE00290>
|
267
|
+
#{render_attr('VAE00300', owner['shares'])}
|
268
|
+
<VAE00310>
|
269
|
+
#{render_attr('VAE00330', owner['votes'])}
|
270
|
+
</VAE00310>
|
271
|
+
</VAE00290>
|
272
|
+
</VAE00250>
|
273
|
+
</VAE00170>)
|
274
|
+
end
|
275
|
+
tags.compact.join("\n")
|
276
|
+
end
|
277
|
+
|
278
|
+
def 別表二上位株数
|
279
|
+
return nil if beppyo2_config('owners').nil?
|
280
|
+
|
281
|
+
beppyo2_config('owners')[0..2].map{ |owner| owner['shares']&.to_i || 0 }.sum
|
282
|
+
end
|
283
|
+
|
284
|
+
def 別表二上位株割合
|
285
|
+
return nil if beppyo2_config('total_shares').nil?
|
286
|
+
return nil if beppyo2_config('owners').nil?
|
287
|
+
|
288
|
+
(別表二上位株数 * 100.0 / beppyo2_config('total_shares')).round(1).to_s
|
289
|
+
end
|
290
|
+
|
291
|
+
def 別表二上位議決権数
|
292
|
+
return nil if beppyo2_config('owners').nil?
|
293
|
+
|
294
|
+
beppyo2_config('owners')[0..2].map{ |owner| owner['votes']&.to_i || 0 }.sum
|
295
|
+
end
|
296
|
+
|
297
|
+
def 別表二上位議決権割合
|
298
|
+
return nil if beppyo2_config('total_votes').nil?
|
299
|
+
return nil if beppyo2_config('owners').nil?
|
300
|
+
|
301
|
+
(別表二上位議決権数 * 100.0 / beppyo2_config('total_votes')).round(1).to_s
|
302
|
+
end
|
303
|
+
|
304
|
+
def 別表四還付法人税等金額
|
305
|
+
refund_tax()
|
306
|
+
end
|
307
|
+
|
231
308
|
def 別表四還付事業税
|
232
|
-
return nil if
|
309
|
+
return nil if @当期還付事業税 == 0
|
233
310
|
|
234
|
-
"<ARC00220><ARC00230>仮払事業税消却(未収計上した還付事業税)</ARC00230>#{render_attr('ARC00240',
|
311
|
+
"<ARC00220><ARC00230>仮払事業税消却(未収計上した還付事業税)</ARC00230>#{render_attr('ARC00240', @当期還付事業税)}#{render_attr('ARC00250', @当期還付事業税)}</ARC00220>\n"
|
312
|
+
end
|
313
|
+
|
314
|
+
def 別表五一仮払税金
|
315
|
+
未収仮払税金 = [@start_balance['1502'], @start_balance['1503'], @start_balance['1504'], @start_balance['1505']].compact.sum
|
316
|
+
還付税金 = [@当期還付法人税, @当期還付都道府県住民税, @当期還付事業税, @当期還付市民税].compact.sum
|
317
|
+
return '' if 未収仮払税金 == 0 && 還付税金 == 0 && @仮払税金 == 0
|
318
|
+
|
319
|
+
%Q(<ICB00140>
|
320
|
+
#{render_attr('ICB00150', '仮払税金')}
|
321
|
+
#{render_attr('ICB00160', readable(未収仮払税金) * -1)}
|
322
|
+
<ICB00170>
|
323
|
+
#{render_attr('ICB00190', readable(還付税金) * -1)}
|
324
|
+
#{render_attr('ICB00200', @仮払税金 * -1)}
|
325
|
+
</ICB00170>
|
326
|
+
#{render_attr('ICB00210', @仮払税金 * -1)}
|
327
|
+
</ICB00140>)
|
328
|
+
end
|
329
|
+
|
330
|
+
def 別表五一還付法人税
|
331
|
+
return '' if (@start_balance['1502']||0) == 0 && @翌期還付法人税 == 0
|
332
|
+
|
333
|
+
%Q(<ICB00220>
|
334
|
+
#{render_attr('ICB00230', @start_balance['1502'] || 0)}
|
335
|
+
<ICB00240>
|
336
|
+
#{render_attr('ICB00250', @当期還付法人税)}
|
337
|
+
#{render_attr('ICB00260', @翌期還付法人税)}
|
338
|
+
</ICB00240>
|
339
|
+
#{render_attr('ICB00270', @翌期還付法人税)}
|
340
|
+
</ICB00220>)
|
341
|
+
end
|
342
|
+
|
343
|
+
def 別表五一還付都道府県住民税
|
344
|
+
return '' if (@start_balance['1503']||0) == 0 && @翌期還付都道府県住民税 == 0
|
345
|
+
|
346
|
+
%Q(<ICB00280>
|
347
|
+
#{render_attr('ICB00290', @start_balance['1503'] || 0)}
|
348
|
+
<ICB00300>
|
349
|
+
#{render_attr('ICB00310', @当期還付都道府県住民税)}
|
350
|
+
#{render_attr('ICB00320', @翌期還付都道府県住民税)}
|
351
|
+
</ICB00300>
|
352
|
+
#{render_attr('ICB00330', @翌期還付都道府県住民税)}
|
353
|
+
</ICB00280>)
|
354
|
+
end
|
355
|
+
|
356
|
+
def 別表五一還付市民税
|
357
|
+
return '' if (@start_balance['1505']||0) == 0 && @翌期還付市民税 == 0
|
358
|
+
|
359
|
+
%Q(<ICB00340>
|
360
|
+
#{render_attr('ICB00350', @start_balance['1505'] || 0)}
|
361
|
+
<ICB00360>
|
362
|
+
#{render_attr('ICB00370', @当期還付市民税)}
|
363
|
+
#{render_attr('ICB00380', @翌期還付市民税)}
|
364
|
+
</ICB00360>
|
365
|
+
#{render_attr('ICB00390', @翌期還付市民税)}
|
366
|
+
</ICB00340>)
|
235
367
|
end
|
236
368
|
|
237
369
|
def 期首繰越損益
|
@@ -246,16 +378,11 @@ module Luca
|
|
246
378
|
readable(@start_balance.dig('515')) || 0
|
247
379
|
end
|
248
380
|
|
249
|
-
def 期末納税充当金
|
250
|
-
readable(@bs_data.dig('515')) || 0
|
251
|
-
end
|
252
|
-
|
253
381
|
def 納税充当金期中増減
|
254
|
-
r =
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
]
|
382
|
+
r = debit_amount('515', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
383
|
+
納付 = 納付税額(@確定法人税額 + @確定地方法人税額, @法人税中間納付 + @地方法人税中間納付) + 期末未納都道府県民税 + 期末未納市民税 + 納付税額(確定事業税, @事業税中間納付)
|
384
|
+
|
385
|
+
[納付, readable(r)]
|
259
386
|
end
|
260
387
|
|
261
388
|
def 期首未納法人税
|
@@ -263,12 +390,12 @@ module Luca
|
|
263
390
|
end
|
264
391
|
|
265
392
|
def 期末未納法人税
|
266
|
-
|
393
|
+
納付税額(@確定法人税額 + @確定地方法人税額, @法人税中間納付 + @地方法人税中間納付)
|
267
394
|
end
|
268
395
|
|
269
396
|
def 未納法人税期中増減
|
270
|
-
r =
|
271
|
-
[
|
397
|
+
r = debit_amount('5151', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
398
|
+
[(@確定法人税額 + @確定地方法人税額), readable(r)]
|
272
399
|
end
|
273
400
|
|
274
401
|
# 中間納付した金額のうち税額とならず、還付されるべき額
|
@@ -292,20 +419,21 @@ module Luca
|
|
292
419
|
end
|
293
420
|
|
294
421
|
def 期末未納都道府県民税
|
295
|
-
|
422
|
+
納付税額(@税額.dig(:kenmin, :kintou), @都道府県民税均等割中間納付) + 納付税額(@税額.dig(:kenmin, :houjinzei), @都道府県民税法人税割中間納付)
|
296
423
|
end
|
297
424
|
|
298
425
|
def 未納都道府県民税期中増減
|
299
|
-
r =
|
300
|
-
[
|
426
|
+
r = debit_amount('5153', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
427
|
+
[確定都道府県住民税, readable(r)]
|
301
428
|
end
|
302
429
|
|
303
430
|
def 都道府県民税仮払納付
|
304
431
|
[(@都道府県民税中間納付 - 確定都道府県住民税), 0].max
|
432
|
+
中間還付税額(@税額.dig(:kenmin, :kintou), @都道府県民税均等割中間納付) + 中間還付税額(@税額.dig(:kenmin, :houjinzei), @都道府県民税法人税割中間納付)
|
305
433
|
end
|
306
434
|
|
307
435
|
def 都道府県民税損金納付
|
308
|
-
[
|
436
|
+
[@都道府県民税均等割中間納付, @税額.dig(:kenmin, :kintou)].min + [@都道府県民税法人税割中間納付, @税額.dig(:kenmin, :houjinzei)].min
|
309
437
|
end
|
310
438
|
|
311
439
|
def 確定市民税
|
@@ -317,20 +445,28 @@ module Luca
|
|
317
445
|
end
|
318
446
|
|
319
447
|
def 期末未納市民税
|
320
|
-
|
448
|
+
納付税額(@税額.dig(:shimin, :kintou), @市民税均等割中間納付) + 納付税額(@税額.dig(:shimin, :houjinzei), @市民税法人税割中間納付)
|
321
449
|
end
|
322
450
|
|
323
451
|
def 未納市民税期中増減
|
324
|
-
r =
|
325
|
-
[
|
452
|
+
r = debit_amount('5154', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
453
|
+
[確定市民税, readable(r)]
|
326
454
|
end
|
327
455
|
|
328
456
|
def 市民税仮払納付
|
329
|
-
|
457
|
+
中間還付税額(@税額.dig(:shimin, :kintou), @市民税均等割中間納付) + 中間還付税額(@税額.dig(:shimin, :houjinzei), @市民税法人税割中間納付)
|
330
458
|
end
|
331
459
|
|
332
460
|
def 市民税損金納付
|
333
|
-
[
|
461
|
+
[@市民税均等割中間納付, @税額.dig(:shimin, :kintou)].min + [@市民税法人税割中間納付, @税額.dig(:shimin, :houjinzei)].min
|
462
|
+
end
|
463
|
+
|
464
|
+
def 確定事業税
|
465
|
+
@税額.dig(:kenmin, :shotoku) + @税額.dig(:kenmin, :tokubetsu)
|
466
|
+
end
|
467
|
+
|
468
|
+
def 事業税損金納付
|
469
|
+
[@事業税中間納付, 確定事業税].min
|
334
470
|
end
|
335
471
|
|
336
472
|
def 別表五一期首差引金額
|
@@ -338,15 +474,19 @@ module Luca
|
|
338
474
|
end
|
339
475
|
|
340
476
|
def 別表五一期末差引金額
|
341
|
-
期末繰越損益 +
|
477
|
+
期末繰越損益 + @納税充当金期中増 - 期末未納法人税 - 期末未納都道府県民税 - 期末未納市民税 - @翌期還付事業税
|
342
478
|
end
|
343
479
|
|
344
480
|
def 別表五一期中減差引金額
|
345
|
-
期首繰越損益 + @納税充当金期中減 - @法人税期中減 - @都道府県民税期中減 - @市民税期中減
|
481
|
+
期首繰越損益 + @納税充当金期中減 - @法人税期中減 - @都道府県民税期中減 - @市民税期中減 - @翌期還付法人税 - @翌期還付都道府県住民税 - @翌期還付市民税
|
346
482
|
end
|
347
483
|
|
348
484
|
def 別表五一期中増差引金額
|
349
|
-
期末繰越損益 +
|
485
|
+
期末繰越損益 + 納付税額(確定事業税, @事業税中間納付) - @法人税中間納付 - @地方法人税中間納付 - @都道府県民税中間納付 - @市民税中間納付 - @翌期還付事業税
|
486
|
+
end
|
487
|
+
|
488
|
+
def 期末未収税金(code)
|
489
|
+
readable((@bs_data[code] || 0) * -1)
|
350
490
|
end
|
351
491
|
|
352
492
|
def 別表七各期青色損失
|
@@ -397,8 +537,22 @@ module Luca
|
|
397
537
|
end
|
398
538
|
|
399
539
|
def 未納消費税期中増減
|
400
|
-
|
401
|
-
|
540
|
+
increase = debit_amount('C1I1', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
541
|
+
r = debit_amount('516', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
542
|
+
[readable(increase), readable(r)]
|
543
|
+
end
|
544
|
+
|
545
|
+
def 概況源泉徴収種類
|
546
|
+
tags = []
|
547
|
+
if credit_count('5191', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
548
|
+
tags << render_attr('IAF03100', '<kubun_CD>1</kubun_CD>')
|
549
|
+
end
|
550
|
+
if credit_count('5193', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
551
|
+
tags << render_attr('IAF03200', '<kubun_CD>1</kubun_CD>')
|
552
|
+
elsif credit_count('5194', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
553
|
+
tags << render_attr('IAF03200', '<kubun_CD>1</kubun_CD>')
|
554
|
+
end
|
555
|
+
tags.compact.join("\n")
|
402
556
|
end
|
403
557
|
|
404
558
|
def 概況月(idx)
|