luca-jp 0.9.0 → 0.13.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 +39 -12
- data/lib/luca/jp/aoiro.rb +54 -29
- data/lib/luca/jp/chihouzei.rb +46 -22
- data/lib/luca/jp/common.rb +67 -19
- data/lib/luca/jp/sonshitsu.rb +1 -1
- data/lib/luca/jp/templates/beppyo4.xml.erb +3 -3
- data/lib/luca/jp/templates/beppyo51.xml.erb +7 -7
- data/lib/luca/jp/templates/beppyo52.xml.erb +12 -9
- data/lib/luca/jp/templates/el-no20.xml.erb +143 -0
- data/lib/luca/jp/templates/el-no6-43.xml.erb +0 -1
- data/lib/luca/jp/templates/el-no6.xml.erb +6 -6
- data/lib/luca/jp/templates/gaikyo.xml.erb +1 -1
- data/lib/luca/jp/util.rb +3 -3
- data/lib/luca/jp/version.rb +1 -1
- data/lib/luca/jp.rb +2 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd8ab55ad11aae7934b5032bdad95fb47786b08ccd5641346fb83dc7543eea48
|
4
|
+
data.tar.gz: e604cf213a42ace70a027f9911295751e290102d95bd5ab980ca088ca13a0b04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f213e34969923c0da16d0b5a9ffa0a00acca1fe1f10d66b4b12388b75606ec3f1f5ecb75be2f2241d02ab9d547e01bab0b4fbc3bddf8b0456c3eff77a68fcb4
|
7
|
+
data.tar.gz: 55ec28a0e227483ce9a6b28e0aa2caecb225228ae79191f7acac1b02cf0fe6b6c3df38f2e19035ce588badf3e5cf7967edbc87fe674985b0ec3fe5162abdc8fa
|
data/exe/luca-jp
CHANGED
@@ -6,29 +6,29 @@ require 'luca/jp'
|
|
6
6
|
class LucaCmd
|
7
7
|
def self.syouhizei(args, params)
|
8
8
|
if params[:export]
|
9
|
-
Luca::Jp::Syouhizei.range(*args).export_json
|
9
|
+
Luca::Jp::Syouhizei.range(*auto_range(args, params)).export_json
|
10
10
|
else
|
11
|
-
puts Luca::Jp::Syouhizei.range(*args).kani
|
11
|
+
puts Luca::Jp::Syouhizei.range(*auto_range(args, params)).kani
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.houjinzei(args, params)
|
16
16
|
if params[:export]
|
17
|
-
Luca::Jp::Aoiro.range(*args).export_json
|
17
|
+
Luca::Jp::Aoiro.range(*auto_range(args, params)).export_json
|
18
18
|
else
|
19
|
-
puts Luca::Jp::Aoiro.range(*args).kani
|
19
|
+
puts Luca::Jp::Aoiro.range(*auto_range(args, params)).kani
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.chihouzei(args, params)
|
24
24
|
if params[:export]
|
25
25
|
accounts = Luca::Jp::Util.eltax_config('reports').map do |report|
|
26
|
-
Luca::Jp::Chihouzei.range(*args).export_json(report)
|
26
|
+
Luca::Jp::Chihouzei.range(*auto_range(args, params)).export_json(report)
|
27
27
|
end
|
28
28
|
puts JSON.dump(accounts)
|
29
29
|
else
|
30
30
|
Luca::Jp::Util.eltax_config('reports').each do |report|
|
31
|
-
File.open("chihouzei-#{report['jichitai_code']}#{report['jimusho_code']}.xml", 'w') { |f| f.puts(Luca::Jp::Chihouzei.range(*args).kani(report))}
|
31
|
+
File.open("chihouzei-#{report['jichitai_code']}#{report['jimusho_code']}.xml", 'w') { |f| f.puts(Luca::Jp::Chihouzei.range(*auto_range(args, params)).kani(report))}
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -37,30 +37,48 @@ class LucaCmd
|
|
37
37
|
date = "#{args[0]}-#{args[1]}-1"
|
38
38
|
Luca::Jp::Urikake.new(date).report(params[:total])
|
39
39
|
end
|
40
|
+
|
41
|
+
def self.auto_range(args, params)
|
42
|
+
case args.length
|
43
|
+
when 4
|
44
|
+
args
|
45
|
+
when 2
|
46
|
+
date = Date.new(args[0].to_i, args[1].to_i)
|
47
|
+
r = LucaBook::Util.current_fy(date, to: date)
|
48
|
+
[r[0].year, r[0].month, r[1].year, r[1].month]
|
49
|
+
when 0
|
50
|
+
date = params[:lastyear] ? Date.today.prev_year : Date.today
|
51
|
+
r = LucaBook::Util.current_fy(date)
|
52
|
+
[r[0].year, r[0].month, r[1].year, r[1].month]
|
53
|
+
end
|
54
|
+
end
|
40
55
|
end
|
41
56
|
|
42
57
|
cmd = ARGV.shift
|
43
58
|
params = {}
|
44
59
|
|
45
60
|
case cmd
|
46
|
-
when /hou?jinzei/
|
61
|
+
when 'h', /hou?jinzei/
|
47
62
|
OptionParser.new do |opt|
|
48
|
-
opt.banner = 'Usage: luca-jp houjinzei [options] yyyy mm yyyy mm'
|
63
|
+
opt.banner = 'Usage: luca-jp h|houjinzei [options] [yyyy mm yyyy mm]'
|
49
64
|
opt.on('--export', 'export json') { |_v| params[:export] = true }
|
65
|
+
opt.on('--lastyear', 'report on last Financial year') { |_v| params[:lastyear] = true }
|
50
66
|
args = opt.parse!(ARGV)
|
51
67
|
LucaCmd.houjinzei(args, params)
|
52
68
|
end
|
53
|
-
when /s[yh]ou?hizei/
|
69
|
+
when 's', /s[yh]ou?hizei/
|
54
70
|
OptionParser.new do |opt|
|
55
|
-
opt.banner = 'Usage: luca-jp syouhizei [options] yyyy mm yyyy mm'
|
71
|
+
opt.banner = 'Usage: luca-jp s|syouhizei [options] [yyyy mm yyyy mm]'
|
56
72
|
opt.on('--export', 'export json') { |_v| params[:export] = true }
|
73
|
+
opt.on('--lastyear', 'report on last Financial year') { |_v| params[:lastyear] = true }
|
57
74
|
args = opt.parse!(ARGV)
|
58
75
|
LucaCmd.syouhizei(args, params)
|
59
76
|
end
|
60
|
-
when /chihou?zei/
|
77
|
+
when 'c', /chihou?zei/
|
61
78
|
OptionParser.new do |opt|
|
62
|
-
opt.banner = 'Usage: luca-jp chihouzei [options] yyyy mm yyyy mm'
|
79
|
+
opt.banner = 'Usage: luca-jp c|chihouzei [options] [yyyy mm yyyy mm]'
|
63
80
|
opt.on('--export', 'export json') { |_v| params[:export] = true }
|
81
|
+
opt.on('--lastyear', 'report on last Financial year') { |_v| params[:lastyear] = true }
|
64
82
|
args = opt.parse!(ARGV)
|
65
83
|
LucaCmd.chihouzei(args, params)
|
66
84
|
end
|
@@ -71,4 +89,13 @@ when /urikake/
|
|
71
89
|
args = opt.parse!(ARGV)
|
72
90
|
LucaCmd.urikake(args, params)
|
73
91
|
end
|
92
|
+
else
|
93
|
+
puts 'Proper subcommand needed.'
|
94
|
+
puts
|
95
|
+
puts 'Usage: luca-jp <subcommand>'
|
96
|
+
puts ' h[oujinzei]: 法人税の計算'
|
97
|
+
puts ' s[youhizei]: 消費税の計算'
|
98
|
+
puts ' c[hihouzei]: 地方税の計算'
|
99
|
+
puts ' urikake: 勘定科目内訳明細書の売掛金リスト(CSV)'
|
100
|
+
exit 1
|
74
101
|
end
|
data/lib/luca/jp/aoiro.rb
CHANGED
@@ -65,7 +65,6 @@ module Luca
|
|
65
65
|
@市民税期中増, @市民税期中減 = 未納市民税期中増減
|
66
66
|
@事業税期中増, @事業税期中減 = 未納事業税期中増減
|
67
67
|
@事業税中間納付 = prepaid_tax('1854') + prepaid_tax('1855') + prepaid_tax('1856') + prepaid_tax('1857') + prepaid_tax('1858')
|
68
|
-
@納税充当金期中増, @納税充当金期中減 = 納税充当金期中増減
|
69
68
|
@翌期還付法人税 = 中間還付税額(@確定法人税額 + @確定地方法人税額, @法人税中間納付 + @地方法人税中間納付)
|
70
69
|
@概況売上 = gaikyo('A0')
|
71
70
|
@form_sec = [
|
@@ -141,9 +140,9 @@ module Luca
|
|
141
140
|
|
142
141
|
@当期還付法人税 = refund_tax('1502')
|
143
142
|
@当期還付都道府県住民税 = refund_tax('1503')
|
144
|
-
@翌期還付都道府県住民税 =
|
143
|
+
@翌期還付都道府県住民税 = readable(@bs_data['1503'])
|
145
144
|
@当期還付市民税 = refund_tax('1505')
|
146
|
-
@翌期還付市民税 =
|
145
|
+
@翌期還付市民税 = readable(@bs_data['1505']) || 0
|
147
146
|
@事業税期首残高 = 期首未納事業税 > 0 ? 期首未納事業税 : (@当期還付事業税 * -1)
|
148
147
|
@仮払税金 = @翌期還付法人税 + @翌期還付都道府県住民税 + @翌期還付事業税 + @翌期還付市民税
|
149
148
|
|
@@ -169,7 +168,7 @@ module Luca
|
|
169
168
|
@当期還付消費税 = refund_tax('1501')
|
170
169
|
@消費税期首残高 = 期首未納消費税 > 0 ? 期首未納消費税 : (@当期還付消費税 * -1)
|
171
170
|
@翌期還付消費税 = 中間還付税額(@消費税期中増, @消費税中間納付額)
|
172
|
-
@その他事業税 = 租税公課
|
171
|
+
@その他事業税 = 租税公課 - @消費税期中増
|
173
172
|
render_erb(search_template('beppyo52.xml.erb'))
|
174
173
|
end
|
175
174
|
|
@@ -387,7 +386,7 @@ module Luca
|
|
387
386
|
return '' if (@start_balance['1502']||0) == 0 && @翌期還付法人税 == 0
|
388
387
|
|
389
388
|
%Q(<ICB00220>
|
390
|
-
#{render_attr('ICB00230', @start_balance['1502'] || 0)}
|
389
|
+
#{render_attr('ICB00230', readable(@start_balance['1502']) || 0)}
|
391
390
|
<ICB00240>
|
392
391
|
#{render_attr('ICB00250', @当期還付法人税)}
|
393
392
|
#{render_attr('ICB00260', @翌期還付法人税)}
|
@@ -400,7 +399,7 @@ module Luca
|
|
400
399
|
return '' if (@start_balance['1503']||0) == 0 && @翌期還付都道府県住民税 == 0
|
401
400
|
|
402
401
|
%Q(<ICB00280>
|
403
|
-
#{render_attr('ICB00290', @start_balance['1503'] || 0)}
|
402
|
+
#{render_attr('ICB00290', readable(@start_balance['1503']) || 0)}
|
404
403
|
<ICB00300>
|
405
404
|
#{render_attr('ICB00310', @当期還付都道府県住民税)}
|
406
405
|
#{render_attr('ICB00320', @翌期還付都道府県住民税)}
|
@@ -413,7 +412,7 @@ module Luca
|
|
413
412
|
return '' if (@start_balance['1505']||0) == 0 && @翌期還付市民税 == 0
|
414
413
|
|
415
414
|
%Q(<ICB00340>
|
416
|
-
#{render_attr('ICB00350', @start_balance['1505'] || 0)}
|
415
|
+
#{render_attr('ICB00350', readable(@start_balance['1505']) || 0)}
|
417
416
|
<ICB00360>
|
418
417
|
#{render_attr('ICB00370', @当期還付市民税)}
|
419
418
|
#{render_attr('ICB00380', @翌期還付市民税)}
|
@@ -434,11 +433,13 @@ module Luca
|
|
434
433
|
readable(@start_balance.dig('515')) || 0
|
435
434
|
end
|
436
435
|
|
437
|
-
def
|
436
|
+
def 納税充当金期中減
|
438
437
|
r = debit_amount('515', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
439
|
-
|
438
|
+
readable(r)
|
439
|
+
end
|
440
440
|
|
441
|
-
|
441
|
+
def 当期納税充当金
|
442
|
+
readable(@pl_data.dig('H0')) - [法人税損金納付額, 都道府県民税損金納付, 市民税損金納付, 事業税損金納付].compact.sum
|
442
443
|
end
|
443
444
|
|
444
445
|
def 期首未納法人税
|
@@ -463,37 +464,34 @@ module Luca
|
|
463
464
|
# 中間納付した金額のうち税額として確定した額
|
464
465
|
#
|
465
466
|
def 法人税損金納付額
|
466
|
-
|
467
|
+
@法人税中間納付 + @地方法人税中間納付 - 法人税仮払納付額
|
467
468
|
end
|
468
469
|
|
469
470
|
def 確定都道府県住民税
|
470
|
-
|
471
|
+
readable(@pl_data['H112']) || 0
|
471
472
|
end
|
472
473
|
|
473
474
|
def 期首未納都道府県民税
|
474
475
|
readable(@start_balance.dig('5153')) || 0
|
475
476
|
end
|
476
477
|
|
477
|
-
def 期末未納都道府県民税
|
478
|
-
納付税額(@税額.dig(:kenmin, :kintou), @都道府県民税均等割中間納付) + 納付税額(@税額.dig(:kenmin, :houjinzei), @都道府県民税法人税割中間納付)
|
479
|
-
end
|
480
|
-
|
481
478
|
def 未納都道府県民税期中増減
|
482
479
|
r = debit_amount('5153', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
|
483
480
|
[確定都道府県住民税, readable(r)]
|
484
481
|
end
|
485
482
|
|
486
483
|
def 都道府県民税仮払納付
|
487
|
-
[
|
488
|
-
中間還付税額(@税額.dig(:kenmin, :kintou), @都道府県民税均等割中間納付) + 中間還付税額(@税額.dig(:kenmin, :houjinzei), @都道府県民税法人税割中間納付)
|
484
|
+
readable(@bs_data['1503']) || 0
|
489
485
|
end
|
490
486
|
|
487
|
+
# 期末納付済金額のうち税額として確定したもの
|
488
|
+
#
|
491
489
|
def 都道府県民税損金納付
|
492
|
-
|
490
|
+
@都道府県民税均等割中間納付 + @都道府県民税法人税割中間納付 - 都道府県民税仮払納付
|
493
491
|
end
|
494
492
|
|
495
493
|
def 確定市民税
|
496
|
-
|
494
|
+
readable(@pl_data['H113']) || 0
|
497
495
|
end
|
498
496
|
|
499
497
|
def 期首未納市民税
|
@@ -501,7 +499,7 @@ module Luca
|
|
501
499
|
end
|
502
500
|
|
503
501
|
def 期末未納市民税
|
504
|
-
|
502
|
+
readable(@bs_data['5154']) || 0
|
505
503
|
end
|
506
504
|
|
507
505
|
def 未納市民税期中増減
|
@@ -510,15 +508,17 @@ module Luca
|
|
510
508
|
end
|
511
509
|
|
512
510
|
def 市民税仮払納付
|
513
|
-
|
511
|
+
readable(@bs_data['1505']) || 0
|
514
512
|
end
|
515
513
|
|
514
|
+
# 期末納付済金額のうち税額として確定したもの
|
515
|
+
#
|
516
516
|
def 市民税損金納付
|
517
|
-
|
517
|
+
@市民税均等割中間納付 + @市民税法人税割中間納付 - 市民税仮払納付
|
518
518
|
end
|
519
519
|
|
520
520
|
def 確定事業税
|
521
|
-
|
521
|
+
readable(@pl_data['H114']) || 0
|
522
522
|
end
|
523
523
|
|
524
524
|
def 事業税損金納付
|
@@ -526,19 +526,44 @@ module Luca
|
|
526
526
|
end
|
527
527
|
|
528
528
|
def 別表五一期首差引金額
|
529
|
-
|
529
|
+
[期首繰越損益, 期首納税充当金].compact.sum - [
|
530
|
+
期首未納法人税,
|
531
|
+
期首未納都道府県民税,
|
532
|
+
期首未納市民税,
|
533
|
+
@当期還付事業税
|
534
|
+
].compact.sum
|
530
535
|
end
|
531
536
|
|
532
537
|
def 別表五一期末差引金額
|
533
|
-
|
538
|
+
[期末繰越損益, 当期納税充当金].compact.sum - [
|
539
|
+
期末未納法人税,
|
540
|
+
確定都道府県住民税,
|
541
|
+
確定市民税,
|
542
|
+
@翌期還付事業税
|
543
|
+
].compact.sum
|
534
544
|
end
|
535
545
|
|
536
546
|
def 別表五一期中減差引金額
|
537
|
-
|
547
|
+
[期首繰越損益, 納税充当金期中減].compact.sum - [
|
548
|
+
@法人税期中減,
|
549
|
+
@都道府県民税期中減,
|
550
|
+
@市民税期中減,
|
551
|
+
@法人税中間納付,
|
552
|
+
@地方法人税中間納付,
|
553
|
+
@都道府県民税中間納付,
|
554
|
+
@市民税中間納付,
|
555
|
+
@当期還付事業税
|
556
|
+
].compact.sum
|
538
557
|
end
|
539
558
|
|
540
559
|
def 別表五一期中増差引金額
|
541
|
-
|
560
|
+
[期末繰越損益, 納付税額(確定事業税, @事業税中間納付)].compact.sum - [
|
561
|
+
@法人税中間納付,
|
562
|
+
@地方法人税中間納付,
|
563
|
+
@都道府県民税中間納付,
|
564
|
+
@市民税中間納付,
|
565
|
+
@翌期還付事業税
|
566
|
+
].compact.sum
|
542
567
|
end
|
543
568
|
|
544
569
|
def 期末未収税金(code)
|
@@ -582,7 +607,7 @@ module Luca
|
|
582
607
|
#{render_attr('MCB00190', deduction + record['amount'])}
|
583
608
|
#{render_attr('MCB00200', deduction)}
|
584
609
|
#{render_attr('MCB00210', record['amount'])}
|
585
|
-
</MCB00110)
|
610
|
+
</MCB00110>)
|
586
611
|
end
|
587
612
|
tags.compact.join("\n")
|
588
613
|
end
|
data/lib/luca/jp/chihouzei.rb
CHANGED
@@ -23,19 +23,28 @@ module Luca
|
|
23
23
|
set_bs(4)
|
24
24
|
@issue_date = Date.today
|
25
25
|
@software = 'LucaJp'
|
26
|
+
@jimusho_name = report_cfg['jimusho_name']
|
26
27
|
@report_category = report_cfg['type']
|
27
28
|
@employee = report_cfg['employee'] || 1
|
29
|
+
@office_count = report_cfg['office_count'] || 1
|
30
|
+
# 自治体ごとの税率カスタマイズ
|
31
|
+
@houjinzeiwari_rate = report_cfg['houjinzeiwari']
|
32
|
+
@shotoku399 = report_cfg['shotoku399']
|
33
|
+
@shotoku401 = report_cfg['shotoku401']
|
34
|
+
@shotoku801 = report_cfg['shotoku801']
|
28
35
|
|
29
36
|
@税額 = 税額計算
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
37
|
+
jichitai = @report_category == 'city' ? :shimin : :kenmin
|
38
|
+
@均等割 = report_cfg['kintouwari'] || @税額.dig(jichitai, :kintou)
|
39
|
+
@確定法人税割 = @税額.dig(jichitai, :houjinzei)
|
40
|
+
@地方特別法人事業税中間納付 = prepaid_tax('1854', @jimusho_name)
|
41
|
+
@所得割中間納付 = prepaid_tax('1855', @jimusho_name)
|
42
|
+
@法人税割中間納付 = prepaid_tax('1859', @jimusho_name)
|
43
|
+
@均等割中間納付 = prepaid_tax('185A', @jimusho_name)
|
36
44
|
@所得割 = @税額.dig(:kenmin, :shotoku)
|
37
45
|
if export
|
38
46
|
{
|
47
|
+
customer: @jimusho_name,
|
39
48
|
jigyouzei: {
|
40
49
|
shotoku: {
|
41
50
|
zeigaku: @所得割,
|
@@ -62,10 +71,10 @@ module Luca
|
|
62
71
|
@form_vers = proc_version
|
63
72
|
@jichitai_code = report_cfg['jichitai_code']
|
64
73
|
@jimusho_code = report_cfg['jimusho_code']
|
65
|
-
@jimusho_name = report_cfg['jimusho_name']
|
66
74
|
@kanri_bango = report_cfg['x_houjin_bango']
|
67
75
|
@app_version = report_cfg['app_version']
|
68
76
|
@address = report_cfg['address'] || it_part_config('nozeisha_adr')
|
77
|
+
@jigyosho_name = report_cfg['name'] || '本店'
|
69
78
|
@procedure_code = 'R0102100'
|
70
79
|
@procedure_name = '法人都道府県民税・事業税・特別法人事業税又は地方法人特別税 確定申告'
|
71
80
|
@form_sec = case @report_category
|
@@ -76,7 +85,7 @@ module Luca
|
|
76
85
|
["R0102AA#{@form_vers['R0102AA']}", "R0102AG120", 別表九フォーム]
|
77
86
|
.compact.map{ |c| form_attr(c) }.join('')
|
78
87
|
when 'city'
|
79
|
-
|
88
|
+
["R0504AA180"].compact.map{ |c| form_attr(c) }.join('')
|
80
89
|
end
|
81
90
|
@user_inf = render_erb(search_template('eltax-userinf.xml.erb'))
|
82
91
|
@form_data = case @report_category
|
@@ -85,7 +94,7 @@ module Luca
|
|
85
94
|
when '23ku'
|
86
95
|
[第六号, 別表四三, 別表九].compact.join("\n")
|
87
96
|
when 'city'
|
88
|
-
|
97
|
+
[第二十号].compact.join("\n")
|
89
98
|
end
|
90
99
|
render_erb(search_template('eltax.xml.erb'))
|
91
100
|
end
|
@@ -93,32 +102,36 @@ module Luca
|
|
93
102
|
|
94
103
|
def export_json(report_cfg)
|
95
104
|
records = kani(report_cfg, export: true)
|
105
|
+
label = @report_category == 'city' ? '市町村住民税' : '都道府県住民税'
|
96
106
|
{}.tap do |item|
|
97
107
|
item['date'] = @end_date
|
98
108
|
item['debit'] = []
|
99
109
|
item['credit'] = []
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
110
|
+
unless @report_category == 'city'
|
111
|
+
records[:jigyouzei].each do |k, dat|
|
112
|
+
if dat[:chukan] > 0
|
113
|
+
item['credit'] << { 'label' => karibarai_label(k), 'amount' => dat[:chukan] }
|
114
|
+
end
|
115
|
+
if dat[:chukan] > dat[:zeigaku]
|
116
|
+
item['debit'] << { 'label' => '未収地方事業税', 'amount' => dat[:chukan] - dat[:zeigaku] }
|
117
|
+
else
|
118
|
+
item['credit'] << { 'label' => '未払地方事業税', 'amount' => dat[:zeigaku] - dat[:chukan] }
|
119
|
+
end
|
120
|
+
item['debit'] << { 'label' => '地方事業税', 'amount' => dat[:zeigaku] } if dat[:zeigaku] > 0
|
108
121
|
end
|
109
|
-
item['debit'] << { 'label' => '法人税、住民税及び事業税', 'amount' => dat[:zeigaku] } if dat[:zeigaku] > 0
|
110
122
|
end
|
111
123
|
records[:juminzei].each do |k, dat|
|
112
124
|
if dat[:chukan] > 0
|
113
125
|
item['credit'] << { 'label' => karibarai_label(k), 'amount' => dat[:chukan] }
|
114
126
|
end
|
115
127
|
if dat[:chukan] > dat[:zeigaku]
|
116
|
-
item['debit'] << { 'label' =>
|
128
|
+
item['debit'] << { 'label' => "未収#{label}", 'amount' => dat[:chukan] - dat[:zeigaku] }
|
117
129
|
else
|
118
|
-
item['credit'] << { 'label' =>
|
130
|
+
item['credit'] << { 'label' => "未払#{label}", 'amount' => dat[:zeigaku] - dat[:chukan] }
|
119
131
|
end
|
120
|
-
item['debit'] << { 'label' =>
|
132
|
+
item['debit'] << { 'label' => label, 'amount' => dat[:zeigaku] } if dat[:zeigaku] > 0
|
121
133
|
end
|
134
|
+
item['x-customer'] = records[:customer] unless records[:customer].nil?
|
122
135
|
item['x-editor'] = 'LucaJp'
|
123
136
|
end
|
124
137
|
end
|
@@ -134,6 +147,11 @@ module Luca
|
|
134
147
|
render_erb(search_template('el-no6-43.xml.erb'))
|
135
148
|
end
|
136
149
|
|
150
|
+
def 第二十号
|
151
|
+
@資本金準備金 = readable(['911', '9131'].map { |cd| @bs_data.dig(cd) }.compact.sum)
|
152
|
+
render_erb(search_template('el-no20.xml.erb'))
|
153
|
+
end
|
154
|
+
|
137
155
|
def 別表九フォーム
|
138
156
|
return nil if @繰越損失管理.records.length == 0
|
139
157
|
|
@@ -149,7 +167,13 @@ module Luca
|
|
149
167
|
private
|
150
168
|
|
151
169
|
def 法人税割課税標準
|
152
|
-
(
|
170
|
+
case Luca::Jp::Util.eltax_config('reports')
|
171
|
+
.filter { |r| レポート種別.include?(r['type']) }.length
|
172
|
+
when 0, 1
|
173
|
+
(@税額.dig(:houjin, :kokuzei) / 1000).floor * 1000
|
174
|
+
else
|
175
|
+
従業員数による分割課税標準 @税額.dig(:houjin, :kokuzei)
|
176
|
+
end
|
153
177
|
end
|
154
178
|
|
155
179
|
def 事業税中間納付
|
data/lib/luca/jp/common.rb
CHANGED
@@ -19,9 +19,9 @@ module Luca
|
|
19
19
|
tax[:houjin][:chihou] = (地方法人税 / 100).floor * 100
|
20
20
|
|
21
21
|
tax[:kenmin][:houjinzei], tax[:shimin][:houjinzei] = 法人税割(法人税額)
|
22
|
-
tax[:kenmin][:kintou], tax[:shimin][:kintou] = 均等割
|
22
|
+
tax[:kenmin][:kintou], tax[:shimin][:kintou] = 均等割 if @report_category
|
23
23
|
tax[:kenmin][:shotoku] = 所得割400万以下(所得) + 所得割800万以下(所得) + 所得割800万超(所得)
|
24
|
-
tax[:kenmin][:tokubetsu] =
|
24
|
+
tax[:kenmin][:tokubetsu] = 特別法人事業税(tax[:kenmin][:shotoku])
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -139,14 +139,16 @@ module Luca
|
|
139
139
|
else
|
140
140
|
法人税割課税標準
|
141
141
|
end
|
142
|
-
|
142
|
+
県税率, 市税率 = 法人税割税率(課税標準)
|
143
143
|
[
|
144
|
-
(課税標準 *
|
145
|
-
(課税標準 *
|
144
|
+
(課税標準 * 県税率 / 100 / 100).floor * 100,
|
145
|
+
(課税標準 * 市税率 / 100 / 100).floor * 100
|
146
146
|
]
|
147
147
|
end
|
148
148
|
|
149
149
|
def 法人税割税率(法人税 = nil)
|
150
|
+
return [@houjinzeiwari_rate.to_f, @houjinzeiwari_rate.to_f] if @houjinzeiwari_rate
|
151
|
+
|
150
152
|
課税標準 = if 法人税
|
151
153
|
(法人税 / 1000).floor * 1000
|
152
154
|
else
|
@@ -169,14 +171,17 @@ module Luca
|
|
169
171
|
所得 ||= 所得金額
|
170
172
|
return 0 if 所得 < 0
|
171
173
|
|
172
|
-
if 所得 >= 4_000_000
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
174
|
+
total = if 所得 >= 4_000_000
|
175
|
+
4_000_000
|
176
|
+
else
|
177
|
+
(所得 / 1000).floor * 1000
|
178
|
+
end
|
179
|
+
事業税の分割課税標準(total)
|
177
180
|
end
|
178
181
|
|
179
182
|
def 所得割税率400万以下(所得 = nil)
|
183
|
+
return @shotyoku399.to_f if @shotoku399
|
184
|
+
|
180
185
|
所得 ||= 所得金額
|
181
186
|
if 期末資本金 > 100_000_000 || 所得 > 25_000_000
|
182
187
|
軽減税率不適用法人 ? 7.48 : 3.75
|
@@ -194,16 +199,19 @@ module Luca
|
|
194
199
|
所得 ||= 所得金額
|
195
200
|
return 0 if 所得 < 0
|
196
201
|
|
197
|
-
if 所得 <= 4_000_000
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
202
|
+
total = if 所得 <= 4_000_000
|
203
|
+
0
|
204
|
+
elsif 所得 >= 8_000_000
|
205
|
+
4_000_000
|
206
|
+
else
|
207
|
+
((所得 - 4_000_000) / 1000).floor * 1000
|
208
|
+
end
|
209
|
+
事業税の分割課税標準(total)
|
204
210
|
end
|
205
211
|
|
206
212
|
def 所得割税率800万以下(所得 = nil)
|
213
|
+
return @shotyoku401.to_f if @shotoku401
|
214
|
+
|
207
215
|
所得 ||= 所得金額
|
208
216
|
if 期末資本金 > 100_000_000 || 所得 > 25_000_000
|
209
217
|
軽減税率不適用法人 ? 7.48 : 5.665
|
@@ -221,14 +229,17 @@ module Luca
|
|
221
229
|
所得 ||= 所得金額
|
222
230
|
return 0 if 所得 < 0
|
223
231
|
|
224
|
-
if 所得 <= 8_000_000
|
232
|
+
total = if 所得 <= 8_000_000
|
225
233
|
0
|
226
234
|
else
|
227
235
|
((所得 - 8_000_000) / 1000).floor * 1000
|
228
236
|
end
|
237
|
+
事業税の分割課税標準(total)
|
229
238
|
end
|
230
239
|
|
231
240
|
def 所得割税率800万超(所得 = nil)
|
241
|
+
return @shotyoku801.to_f if @shotoku801
|
242
|
+
|
232
243
|
所得 ||= 所得金額
|
233
244
|
if 期末資本金 > 100_000_000 || 所得 > 25_000_000
|
234
245
|
7.48
|
@@ -238,7 +249,7 @@ module Luca
|
|
238
249
|
end
|
239
250
|
|
240
251
|
# 100円未満切り捨て
|
241
|
-
def
|
252
|
+
def 特別法人事業税(事業税)
|
242
253
|
((事業税 * 37 / 100) / 100).floor * 100
|
243
254
|
end
|
244
255
|
|
@@ -302,6 +313,43 @@ module Luca
|
|
302
313
|
def 期末資本金
|
303
314
|
readable(@bs_data.dig('911'))
|
304
315
|
end
|
316
|
+
|
317
|
+
# -----------------------------------------------------
|
318
|
+
# :section: 複数自治体間の分割計算
|
319
|
+
# -----------------------------------------------------
|
320
|
+
def 事業税の分割課税標準(課税標準)
|
321
|
+
case Luca::Jp::Util.eltax_config('reports')
|
322
|
+
.filter { |r| レポート種別.include?(r['type']) }.length
|
323
|
+
when 0, 1
|
324
|
+
課税標準
|
325
|
+
else
|
326
|
+
half = (課税標準 / 2 / 1000).floor * 1000
|
327
|
+
[
|
328
|
+
事業所数による分割課税標準(half),
|
329
|
+
従業員数による分割課税標準(half)
|
330
|
+
].sum
|
331
|
+
end
|
332
|
+
end
|
333
|
+
|
334
|
+
def 従業員数による分割課税標準(課税標準)
|
335
|
+
分割基準の総数 = Luca::Jp::Util.eltax_config('reports')
|
336
|
+
.filter { |r| レポート種別.include?(r['type']) }
|
337
|
+
.map { |r| (r['employee'] || 1).to_i }.sum
|
338
|
+
((課税標準.to_f / 分割基準の総数).floor(分割基準の総数.to_s.length) * @employee / 1000)
|
339
|
+
.floor * 1000
|
340
|
+
end
|
341
|
+
|
342
|
+
def 事業所数による分割課税標準(課税標準)
|
343
|
+
分割基準の総数 = Luca::Jp::Util.eltax_config('reports')
|
344
|
+
.filter { |r| レポート種別.include?(r['type']) }
|
345
|
+
.map { |r| (r['office_count'] || 1).to_i }.sum
|
346
|
+
((課税標準.to_f / 分割基準の総数).floor(分割基準の総数.to_s.length) * @office_count / 1000)
|
347
|
+
.floor * 1000
|
348
|
+
end
|
349
|
+
|
350
|
+
def レポート種別
|
351
|
+
@report_category == 'city' ? ['city', '23ku'] : ['prefecture', '23ku']
|
352
|
+
end
|
305
353
|
end
|
306
354
|
end
|
307
355
|
end
|
data/lib/luca/jp/sonshitsu.rb
CHANGED
@@ -37,7 +37,7 @@ module Luca
|
|
37
37
|
#
|
38
38
|
def self.load(this_year)
|
39
39
|
records = if File.exist?(record_file)
|
40
|
-
YAML.
|
40
|
+
YAML.safe_load(File.read(record_file), permitted_classes: [Date])
|
41
41
|
.filter { |record| record['start_date'] > this_year.prev_year(11) && record['end_date'] < this_year }
|
42
42
|
.sort { |a, b| a['start_date'] <=> b['start_date'] }
|
43
43
|
else
|
@@ -24,7 +24,7 @@
|
|
24
24
|
</ARC00040>
|
25
25
|
<ARC00100>
|
26
26
|
<% ['ARC00110', 'ARC00120'].each do |code| %>
|
27
|
-
<%= render_attr(code,
|
27
|
+
<%= render_attr(code, 当期納税充当金) %>
|
28
28
|
<% end %>
|
29
29
|
</ARC00100>
|
30
30
|
<%= 別表四還付事業税 %>
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<% end %>
|
39
39
|
<ARC00325>
|
40
40
|
<% ['ARC00330', 'ARC00340'].each do |code| %>
|
41
|
-
<%= render_attr(code, [@法人税等, @当期還付事業税, 法人税仮払納付額, 都道府県民税仮払納付, 市民税仮払納付].compact.sum) %>
|
41
|
+
<%= render_attr(code, [@法人税等, @当期還付事業税, @当期還付法人税, @当期還付都道府県住民税, 法人税仮払納付額, 都道府県民税仮払納付, 市民税仮払納付].compact.sum) %>
|
42
42
|
<% end %>
|
43
43
|
</ARC00325>
|
44
44
|
</ARC00000>
|
@@ -71,7 +71,7 @@
|
|
71
71
|
<% end %>
|
72
72
|
<ARD00280>
|
73
73
|
<% ['ARD00290', 'ARD00300'].each do |code| %>
|
74
|
-
<%= render_attr(code, [@納付事業税, @翌期還付事業税, 法人税仮払納付額, 都道府県民税仮払納付, 市民税仮払納付].compact.sum) %>
|
74
|
+
<%= render_attr(code, [@納付事業税, @翌期還付事業税, @当期還付法人税, @当期還付都道府県住民税, @当期還付市民税, 法人税仮払納付額, 都道府県民税仮払納付, 市民税仮払納付].compact.sum) %>
|
75
75
|
<% end %>
|
76
76
|
</ARD00280>
|
77
77
|
</ARD00000>
|
@@ -22,10 +22,10 @@
|
|
22
22
|
<ICB00460>
|
23
23
|
<%= render_attr('ICB00470', 期首納税充当金) %>
|
24
24
|
<ICB00480>
|
25
|
-
<%= render_attr('ICB00490',
|
26
|
-
<%= render_attr('ICB00500',
|
25
|
+
<%= render_attr('ICB00490', 納税充当金期中減) %>
|
26
|
+
<%= render_attr('ICB00500', 当期納税充当金) %>
|
27
27
|
</ICB00480>
|
28
|
-
<%= render_attr('ICB00510',
|
28
|
+
<%= render_attr('ICB00510', 当期納税充当金) %>
|
29
29
|
</ICB00460>
|
30
30
|
<ICB00520>
|
31
31
|
<ICB00530>
|
@@ -45,10 +45,10 @@
|
|
45
45
|
<%= render_attr('ICB00650', @都道府県民税期中減 + @都道府県民税中間納付) %>
|
46
46
|
<ICB00660>
|
47
47
|
<%= render_attr('ICB00670', @都道府県民税中間納付) %>
|
48
|
-
<%= render_attr('ICB00680',
|
48
|
+
<%= render_attr('ICB00680', 確定都道府県住民税) %>
|
49
49
|
</ICB00660>
|
50
50
|
</ICB00640>
|
51
|
-
<%= render_attr('ICB00700',
|
51
|
+
<%= render_attr('ICB00700', 確定都道府県住民税) %>
|
52
52
|
</ICB00620>
|
53
53
|
<ICB00710>
|
54
54
|
<%= render_attr('ICB00720', 期首未納市民税) %>
|
@@ -56,10 +56,10 @@
|
|
56
56
|
<%= render_attr('ICB00740', @市民税期中減 + @市民税中間納付) %>
|
57
57
|
<ICB00750>
|
58
58
|
<%= render_attr('ICB00760', @市民税中間納付) %>
|
59
|
-
<%= render_attr('ICB00770',
|
59
|
+
<%= render_attr('ICB00770', (確定市民税 - 市民税損金納付)) %>
|
60
60
|
</ICB00750>
|
61
61
|
</ICB00730>
|
62
|
-
<%= render_attr('ICB00790',
|
62
|
+
<%= render_attr('ICB00790', (確定市民税 - 市民税損金納付)) %>
|
63
63
|
</ICB00710>
|
64
64
|
</ICB00520>
|
65
65
|
<ICB00800>
|
@@ -46,6 +46,7 @@
|
|
46
46
|
</IEB00310>
|
47
47
|
</IEB00170>
|
48
48
|
<IEB00360>
|
49
|
+
<%= render_attr('IEB00370', @当期還付法人税 * -1) %>
|
49
50
|
<%= render_attr('IEB00380', 期首未納法人税) %>
|
50
51
|
<%= render_attr('IEB00390', @法人税期中増) %>
|
51
52
|
<IEB00400>
|
@@ -99,11 +100,12 @@
|
|
99
100
|
<%= render_attr('IEC00450', (確定都道府県住民税 - @都道府県民税中間納付)) %>
|
100
101
|
<IEC00460>
|
101
102
|
<%= render_attr('IEC00470', @翌期還付都道府県住民税 * -1) %>
|
102
|
-
<%= render_attr('IEC00480',
|
103
|
+
<%= render_attr('IEC00480', (確定都道府県住民税 - 都道府県民税損金納付)) %>
|
103
104
|
</IEC00460>
|
104
105
|
</IEC00440>
|
105
106
|
</IEC00170>
|
106
107
|
<IEC00490>
|
108
|
+
<%= render_attr('IEC00500', @当期還付都道府県住民税 * -1) %>
|
107
109
|
<%= render_attr('IEC00510', 期首未納都道府県民税) %>
|
108
110
|
<%= render_attr('IEC00520', @都道府県民税期中増) %>
|
109
111
|
<IEC00530>
|
@@ -120,7 +122,7 @@
|
|
120
122
|
</IEC00530>
|
121
123
|
<IEC00630>
|
122
124
|
<%= render_attr('IEC00640', @翌期還付都道府県住民税 * -1) %>
|
123
|
-
<%= render_attr('IEC00650',
|
125
|
+
<%= render_attr('IEC00650', (確定都道府県住民税 - 都道府県民税損金納付)) %>
|
124
126
|
</IEC00630>
|
125
127
|
</IEC00490>
|
126
128
|
</IEC00000>
|
@@ -157,11 +159,12 @@
|
|
157
159
|
<%= render_attr('IED00320', (確定市民税 - @市民税中間納付)) %>
|
158
160
|
<IED00330>
|
159
161
|
<%= render_attr('IED00340', @翌期還付市民税 * -1) %>
|
160
|
-
<%= render_attr('IED00350',
|
162
|
+
<%= render_attr('IED00350', (確定市民税 - 市民税損金納付)) %>
|
161
163
|
</IED00330>
|
162
164
|
</IED00310>
|
163
165
|
</IED00170>
|
164
166
|
<IED00360>
|
167
|
+
<%= render_attr('IED00370', @当期還付市民税 * -1) %>
|
165
168
|
<%= render_attr('IED00380', 期首未納市民税) %>
|
166
169
|
<%= render_attr('IED00390', @市民税期中増) %>
|
167
170
|
<IED00400>
|
@@ -178,7 +181,7 @@
|
|
178
181
|
</IED00400>
|
179
182
|
<IED00500>
|
180
183
|
<%= render_attr('IED00510', @翌期還付市民税 * -1) %>
|
181
|
-
<%= render_attr('IED00520',
|
184
|
+
<%= render_attr('IED00520', (確定市民税 - 市民税損金納付)) %>
|
182
185
|
</IED00500>
|
183
186
|
</IED00360>
|
184
187
|
</IED00000>
|
@@ -259,14 +262,14 @@
|
|
259
262
|
<IEG00000>
|
260
263
|
<%= render_attr('IEG00010', 期首納税充当金) %>
|
261
264
|
<IEG00020>
|
262
|
-
<%= render_attr('IEG00030',
|
263
|
-
<%= render_attr('IEG00070',
|
265
|
+
<%= render_attr('IEG00030', 当期納税充当金) %>
|
266
|
+
<%= render_attr('IEG00070', 当期納税充当金) %>
|
264
267
|
</IEG00020>
|
265
268
|
<IEG00080>
|
266
|
-
<%= render_attr('IEG00090',
|
269
|
+
<%= render_attr('IEG00090', 納税充当金期中減 - @事業税期中減) %>
|
267
270
|
<%= render_attr('IEG00100', @事業税期中減) %>
|
268
|
-
<%= render_attr('IEG00180',
|
271
|
+
<%= render_attr('IEG00180', 納税充当金期中減) %>
|
269
272
|
</IEG00080>
|
270
|
-
<%= render_attr('IEG00190',
|
273
|
+
<%= render_attr('IEG00190', 当期納税充当金) %>
|
271
274
|
</IEG00000>
|
272
275
|
</HOA522>
|
@@ -0,0 +1,143 @@
|
|
1
|
+
<R0504AA180 xmlns="http://eltax.jp/HOJIN_DOFUKEN" vr="180" page="" seiseiSoft="<%= @software %>" seiseiVr="1" seiseiDay="<%= Date.today.strftime('%Y%m%d') %>" seiseiNM="<%= it_part_config('nozeisha_nm') %>" koshinSoft="" koshinVr="" koshinDay="" koshinNM="" taari="">
|
2
|
+
<AAA00100 idref="SEIRI_NUM" />
|
3
|
+
<AAA00200 idref="JIMUSHO_NUM"></AAA00200>
|
4
|
+
<AAA00300 idref="HOJIN_NUM"></AAA00300>
|
5
|
+
<AAA00400 />
|
6
|
+
<AAA00500 idref="HOJIN_NUMBER"></AAA00500>
|
7
|
+
<AAA00700 idref="RPT_DATE">
|
8
|
+
<gen:era></gen:era>
|
9
|
+
<gen:yy></gen:yy>
|
10
|
+
<gen:mm></gen:mm>
|
11
|
+
<gen:dd></gen:dd>
|
12
|
+
</AAA00700>
|
13
|
+
<AAA00800>
|
14
|
+
<gen:era><%= gengou(@issue_date) %></gen:era>
|
15
|
+
<gen:yy><%= wareki(@issue_date) %></gen:yy>
|
16
|
+
<gen:mm><%= @issue_date.month %></gen:mm>
|
17
|
+
<gen:dd><%= @issue_date.day %></gen:dd>
|
18
|
+
</AAA00800>
|
19
|
+
<AAA00900 idref="ORG1_NAME"></AAA00900>
|
20
|
+
<AAA_HONTEN_ZIP idref="HONTEN_ZIP"></AAA_HONTEN_ZIP>
|
21
|
+
<AAA_HONTEN_ADDR idref="HONTEN_ADDR"></AAA_HONTEN_ADDR>
|
22
|
+
<AAA_HONTEN_TEL_NUM idref="HONTEN_TEL"></AAA_HONTEN_TEL_NUM>
|
23
|
+
<AAA_ZIP />
|
24
|
+
<AAA_ADDR />
|
25
|
+
<AAA_TEL_NUM />
|
26
|
+
<AAA_KANA idref="KANA"></AAA_KANA>
|
27
|
+
<AAA_NAME idref="NAME"></AAA_NAME>
|
28
|
+
<AAA_DAIHYO_KANA idref="DAIHYO_KANA"></AAA_DAIHYO_KANA>
|
29
|
+
<AAA_DAIHYO_NAME idref="DAIHYO_NAME"></AAA_DAIHYO_NAME>
|
30
|
+
<AAA01000>
|
31
|
+
<gen:era />
|
32
|
+
<gen:yy />
|
33
|
+
<gen:mm />
|
34
|
+
<gen:dd />
|
35
|
+
<gen:yyyymmdd />
|
36
|
+
</AAA01000>
|
37
|
+
<AAA01100 />
|
38
|
+
<AAA01200 />
|
39
|
+
<AAA_JIGYO_NAME idref="JIGYO_NAME"></AAA_JIGYO_NAME>
|
40
|
+
<AAA_SHIHON idref="SHIHON"></AAA_SHIHON>
|
41
|
+
<AAA_SHIHON2><%= 資本金等の額 %></AAA_SHIHON2>
|
42
|
+
<AAA_SHIHON3><%= @資本金準備金 %></AAA_SHIHON3>
|
43
|
+
<AAA_SHIHON4><%= 地方税資本金等の額 %></AAA_SHIHON4>
|
44
|
+
<AAA_KEIRI_KANA></AAA_KEIRI_KANA>
|
45
|
+
<AAA_KEIRI_NAME></AAA_KEIRI_NAME>
|
46
|
+
<AAA_JIGYO_SDATE idref="SDATE">
|
47
|
+
<gen:era></gen:era>
|
48
|
+
<gen:yy></gen:yy>
|
49
|
+
<gen:mm></gen:mm>
|
50
|
+
<gen:dd></gen:dd>
|
51
|
+
<gen:yyyymmdd></gen:yyyymmdd>
|
52
|
+
</AAA_JIGYO_SDATE>
|
53
|
+
<AAA_JIGYO_EDATE idref="EDATE">
|
54
|
+
<gen:era></gen:era>
|
55
|
+
<gen:yy></gen:yy>
|
56
|
+
<gen:mm></gen:mm>
|
57
|
+
<gen:dd></gen:dd>
|
58
|
+
<gen:yyyymmdd></gen:yyyymmdd>
|
59
|
+
</AAA_JIGYO_EDATE>
|
60
|
+
<AAA_RPT_KBN idref="RPT_NAME">確定</AAA_RPT_KBN>
|
61
|
+
<AAA01300 />
|
62
|
+
<AAB00100 />
|
63
|
+
<AAB00110><%= @税額.dig(:houjin, :kokuzei) %></AAB00110>
|
64
|
+
<AAB00200 />
|
65
|
+
<AAB00400 />
|
66
|
+
<AAB00500 />
|
67
|
+
<AAB00600><%= 法人税割課税標準 %></AAB00600>
|
68
|
+
<AAB00610><%= 法人税割税率[1] %></AAB00610>
|
69
|
+
<AAB00620><%= 法人税割[1] %></AAB00620>
|
70
|
+
<AAB00700 />
|
71
|
+
<AAB00710 />
|
72
|
+
<AAB00720 />
|
73
|
+
<AAB00730 />
|
74
|
+
<AAB00750 />
|
75
|
+
<AAB00800 />
|
76
|
+
<AAB00900 />
|
77
|
+
<AAB01000><%= 法人税割[1] %></AAB01000>
|
78
|
+
<AAB01100><%= @法人税割中間納付 %></AAB01100>
|
79
|
+
<AAB01200 />
|
80
|
+
<AAB01300><%= @確定法人税割 - @法人税割中間納付 %></AAB01300>
|
81
|
+
<AAB01400>12</AAB01400>
|
82
|
+
<AAB01410><%= @均等割 %></AAB01410>
|
83
|
+
<AAB01420><%= @均等割 %></AAB01420>
|
84
|
+
<AAB01500><%= @均等割中間納付 %></AAB01500>
|
85
|
+
<AAB01600><%= @均等割 - @均等割中間納付 %></AAB01600>
|
86
|
+
<AAB01700><%= 納付税額(@確定法人税割, @法人税割中間納付) + 納付税額(@均等割, @均等割中間納付) %></AAB01700>
|
87
|
+
<AAB01800 />
|
88
|
+
<AAB01900><%= 納付税額(@確定法人税割, @法人税割中間納付) + 納付税額(@均等割, @均等割中間納付) %></AAB01900>
|
89
|
+
<AAC00100>
|
90
|
+
<AAC00200><%= @jigyosho_name %></AAC00200>
|
91
|
+
<AAC00300><%= @address %></AAC00300>
|
92
|
+
<AAC00400><%= @employee %></AAC00400>
|
93
|
+
<AAC00500><%= @employee %></AAC00500>
|
94
|
+
</AAC00100>
|
95
|
+
<AAC00600><%# 全従業者数 %></AAC00600>
|
96
|
+
<AAC00700><%= @employee %></AAC00700>
|
97
|
+
<AAC00800><%= @employee %></AAC00800>
|
98
|
+
<AAD00100>
|
99
|
+
<AAD00200 />
|
100
|
+
<AAD00300 />
|
101
|
+
<AAD00400 />
|
102
|
+
<AAD00500 />
|
103
|
+
<AAD00600 />
|
104
|
+
</AAD00100>
|
105
|
+
<AAE00100>
|
106
|
+
<gen:era />
|
107
|
+
<gen:yy />
|
108
|
+
<gen:mm />
|
109
|
+
<gen:dd />
|
110
|
+
</AAE00100>
|
111
|
+
<AAE01000>
|
112
|
+
<gen:era />
|
113
|
+
<gen:yy />
|
114
|
+
<gen:mm />
|
115
|
+
<gen:dd />
|
116
|
+
</AAE01000>
|
117
|
+
<AAE01100>
|
118
|
+
<gen:era />
|
119
|
+
<gen:yy />
|
120
|
+
<gen:mm />
|
121
|
+
<gen:dd />
|
122
|
+
</AAE01100>
|
123
|
+
<AAE00200>1</AAE00200><%# 青色申告 %>
|
124
|
+
<AAE00300><%= @税額.dig(:houjin, :kokuzei) > 200000 ? 1 : 2 %></AAE00300>
|
125
|
+
<AAE00400>
|
126
|
+
<gen:era />
|
127
|
+
<gen:yy />
|
128
|
+
<gen:mm />
|
129
|
+
<gen:dd />
|
130
|
+
</AAE00400>
|
131
|
+
<AAE00500>
|
132
|
+
<gen:era />
|
133
|
+
<gen:yy />
|
134
|
+
<gen:mm />
|
135
|
+
<gen:dd />
|
136
|
+
</AAE00500>
|
137
|
+
<AAE00600>2</AAE00600>
|
138
|
+
<AAE00700><%= eltax_kouza %></AAE00700>
|
139
|
+
<AAE00800><%= 中間還付税額(@確定法人税割, @法人税割中間納付) %></AAE00800>
|
140
|
+
<AAE00900 />
|
141
|
+
<AAJ_DAIRI_NAME></AAJ_DAIRI_NAME>
|
142
|
+
<AAJ_DAIRI_TEL_NUM></AAJ_DAIRI_TEL_NUM>
|
143
|
+
</R0504AA180>
|
@@ -136,18 +136,18 @@
|
|
136
136
|
<AAE01500><%= @所得割 - 事業税中間納付 %></AAE01500>
|
137
137
|
<%= render_attr('AAK00100', @所得割) %>
|
138
138
|
<%= render_attr('AAK00200', 37) %>
|
139
|
-
<%= render_attr('AAK00300',
|
139
|
+
<%= render_attr('AAK00300', 特別法人事業税(@所得割)) %>
|
140
140
|
<AAK00400 />
|
141
141
|
<AAK00500 />
|
142
142
|
<AAK00600 />
|
143
|
-
<%= render_attr('AAK00700',
|
143
|
+
<%= render_attr('AAK00700', 特別法人事業税(@所得割)) %>
|
144
144
|
<AAK00800 />
|
145
|
-
<%= render_attr('AAK00850',
|
145
|
+
<%= render_attr('AAK00850', 特別法人事業税(@所得割)) %>
|
146
146
|
<%= render_attr('AAK00900', @地方特別法人事業税中間納付) %>
|
147
147
|
<AAK01000 />
|
148
|
-
<AAK01100><%=
|
148
|
+
<AAK01100><%= 特別法人事業税(@所得割) - @地方特別法人事業税中間納付 %></AAK01100>
|
149
149
|
<AAK01200 />
|
150
|
-
<AAK01300><%=
|
150
|
+
<AAK01300><%= 特別法人事業税(@所得割) - @地方特別法人事業税中間納付 %></AAK01300>
|
151
151
|
<%= render_attr('AAF00100', 当期所得金額) %>
|
152
152
|
<AAF00200 />
|
153
153
|
<AAF00300 />
|
@@ -157,7 +157,7 @@
|
|
157
157
|
<%= render_attr('AAF00700', @繰越損失管理.deduction) %>
|
158
158
|
<%= render_attr('AAG00100', 所得金額) %>
|
159
159
|
<AAH00100 />
|
160
|
-
<AAH00200><%= 中間還付税額(@確定法人税割, @法人税割中間納付) + 中間還付税額(@所得割, 事業税中間納付) + 中間還付税額(
|
160
|
+
<AAH00200><%= 中間還付税額(@確定法人税割, @法人税割中間納付) + 中間還付税額(@所得割, 事業税中間納付) + 中間還付税額(特別法人事業税(@所得割), @地方特別法人事業税中間納付) %></AAH00200>
|
161
161
|
<AAH00400><%= eltax_kouza %></AAH00400>
|
162
162
|
<AAI00100>
|
163
163
|
<gen:era />
|
@@ -104,7 +104,7 @@
|
|
104
104
|
<%= render_attr('IAF02100', '<kubun_CD>2</kubun_CD>') %>
|
105
105
|
<%= render_attr('IAF02200', '<kubun_CD>2</kubun_CD>') %>
|
106
106
|
<%= render_attr('IAF02300', '<kubun_CD>1</kubun_CD>') %>
|
107
|
-
<% elsif gaikyo_config('shisanhyou')
|
107
|
+
<% elsif gaikyo_config('shisanhyou')&.< 12 %>
|
108
108
|
<%= render_attr('IAF02100', '<kubun_CD>2</kubun_CD>') %>
|
109
109
|
<%= render_attr('IAF02200', '<kubun_CD>1</kubun_CD>') %>
|
110
110
|
<%= render_attr('IAF02250', gaikyo_config('shisanhyou')) %>
|
data/lib/luca/jp/util.rb
CHANGED
@@ -21,10 +21,10 @@ module Luca
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def prepaid_tax(code)
|
25
|
-
#LucaSupport::Code.readable(@bs_data.dig(code) || 0)
|
24
|
+
def prepaid_tax(code, customer = nil)
|
26
25
|
search_end = @end_date.prev_month # exclude year end adjustment
|
27
|
-
|
26
|
+
header = { customer: customer } unless customer.nil?
|
27
|
+
amount, _ = self.class.net(@start_date.year, @start_date.month, search_end.year, search_end.month, code: code, header: header)
|
28
28
|
LucaSupport::Code.readable(amount[code] || 0)
|
29
29
|
end
|
30
30
|
|
data/lib/luca/jp/version.rb
CHANGED
data/lib/luca/jp.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'date'
|
3
4
|
require 'luca/jp/version'
|
4
5
|
require 'luca_support/config'
|
5
6
|
|
@@ -18,7 +19,7 @@ module Luca
|
|
18
19
|
end
|
19
20
|
|
20
21
|
EX_CONF = begin
|
21
|
-
YAML.
|
22
|
+
YAML.safe_load(File.read(Pathname(LucaSupport::PJDIR) / 'config-lucajp.yml'), permitted_classes: [Date])
|
22
23
|
rescue Errno::ENOENT
|
23
24
|
nil
|
24
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luca-jp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
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: lucabook
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '0.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '0.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- lib/luca/jp/templates/beppyo7.xml.erb
|
99
99
|
- lib/luca/jp/templates/chidai-meisai.xml.erb
|
100
100
|
- lib/luca/jp/templates/consumption.xtx.erb
|
101
|
+
- lib/luca/jp/templates/el-no20.xml.erb
|
101
102
|
- lib/luca/jp/templates/el-no6-43.xml.erb
|
102
103
|
- lib/luca/jp/templates/el-no6-9.xml.erb
|
103
104
|
- lib/luca/jp/templates/el-no6.xml.erb
|