luca-jp 0.1.5 → 0.2.1
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 +239 -65
- data/lib/luca/jp/chihouzei.rb +23 -6
- data/lib/luca/jp/common.rb +16 -3
- data/lib/luca/jp/it_part.rb +1 -1
- data/lib/luca/jp/syouhizei.rb +2 -2
- data/lib/luca/jp/templates/beppyo1.xml.erb +2 -0
- data/lib/luca/jp/templates/beppyo2.xml.erb +32 -0
- data/lib/luca/jp/templates/beppyo4.xml.erb +15 -11
- data/lib/luca/jp/templates/beppyo51.xml.erb +14 -7
- data/lib/luca/jp/templates/beppyo52.xml.erb +50 -19
- 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 +65 -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 +25 -0
- data/lib/luca/jp/version.rb +1 -1
- metadata +9 -2
@@ -0,0 +1,15 @@
|
|
1
|
+
<HOI150 page="1" VR="3.0" id="HOI150" sakuseiNM="<%= @company %>" softNM="<%= @software %> <%= @company %>" sakuseiDay="<%= @issue_date %>">
|
2
|
+
<HOB00000>
|
3
|
+
<% @地代家賃.values.each do |rent| %>
|
4
|
+
<HOB10000>
|
5
|
+
<%= render_attr('HOB11000', rent[:rent_type]) %>
|
6
|
+
<%= render_attr('HOB12000', rent[:rent_purpose]) %>
|
7
|
+
<%= render_attr('HOB13000', rent[:rent_address]) %>
|
8
|
+
<%= render_attr('HOB14000', rent[:name]) %>
|
9
|
+
<%= render_attr('HOB15000', rent[:address]) %>
|
10
|
+
<%= render_attr('HOB17000', rent[:amount]) %>
|
11
|
+
<%= render_attr('HOB18000', rent[:note]) %>
|
12
|
+
</HOB10000>
|
13
|
+
<% end %>
|
14
|
+
</HOB00000>
|
15
|
+
</HOI150>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<R0102AG120 xmlns="http://eltax.jp/HOJIN_DOFUKEN" vr="120" page="" seiseiSoft="<%= @software %>" seiseiVr="" seiseiDay="" seiseiNM="" koshinSoft="" koshinVr="" koshinDay="" koshinNM="" taari="">
|
1
|
+
<R0102AG120 xmlns="http://eltax.jp/HOJIN_DOFUKEN" vr="120" page="" seiseiSoft="<%= @software %>" seiseiVr="1" seiseiDay="<%= Date.today.strftime('%Y%m%d') %>" seiseiNM="<%= it_part_config('nozeisha_nm') %>" koshinSoft="" koshinVr="" koshinDay="" koshinNM="" taari="">
|
2
2
|
<AGA_JIGYO_SDATE idref="SDATE">
|
3
3
|
<gen:era></gen:era><gen:yy></gen:yy><gen:mm></gen:mm><gen:dd></gen:dd>
|
4
4
|
<gen:yyyymmdd></gen:yyyymmdd>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<R0102AM190 xmlns="http://eltax.jp/HOJIN_DOFUKEN" vr="190" page="" seiseiSoft="<%= @software %>" seiseiVr="" seiseiDay="" seiseiNM="" koshinSoft="" koshinVr="" koshinDay="" koshinNM="" taari="">
|
1
|
+
<R0102AM190 xmlns="http://eltax.jp/HOJIN_DOFUKEN" vr="190" page="" seiseiSoft="<%= @software %>" seiseiVr="1" seiseiDay="<%= Date.today.strftime('%Y%m%d') %>" seiseiNM="<%= it_part_config('nozeisha_nm') %>" koshinSoft="" koshinVr="" koshinDay="" koshinNM="" taari="">
|
2
2
|
<AMA_JIGYO_SDATE idref="SDATE">
|
3
3
|
<gen:era></gen:era><gen:yy></gen:yy><gen:mm></gen:mm><gen:dd></gen:dd>
|
4
4
|
<gen:yyyymmdd></gen:yyyymmdd>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
<%= render_attr('AMB00430', 期首繰越損失) %>
|
30
30
|
<%= render_attr('AMB00440', 当期控除計) %>
|
31
31
|
<%= render_attr('AMB00450', 翌期繰越損失) %>
|
32
|
-
<AMB00325
|
32
|
+
<AMB00325>1</AMB00325>
|
33
33
|
<%= render_attr('AMB00330', 当期繰越損失) %>
|
34
34
|
<AMB00360 />
|
35
35
|
<AMB00365 />
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<R0102AA190 xmlns="http://eltax.jp/HOJIN_DOFUKEN" vr="190" page="" seiseiSoft="<%= @software %>" seiseiVr="" seiseiDay="" seiseiNM="" koshinSoft="" koshinVr="" koshinDay="" koshinNM="" taari="">
|
1
|
+
<R0102AA190 xmlns="http://eltax.jp/HOJIN_DOFUKEN" vr="190" page="" seiseiSoft="<%= @software %>" seiseiVr="1" seiseiDay="<%= Date.today.strftime('%Y%m%d') %>" seiseiNM="<%= it_part_config('nozeisha_nm') %>" koshinSoft="" koshinVr="" koshinDay="" koshinNM="" taari="">
|
2
2
|
<AAA00100 idref="SEIRI_NUM" />
|
3
3
|
<AAA00200 idref="JIMUSHO_NUM"></AAA00200>
|
4
4
|
<AAA00300 idref="HOJIN_NUM"></AAA00300>
|
@@ -41,9 +41,9 @@
|
|
41
41
|
<AAA_SHIHON idref="SHIHON"></AAA_SHIHON>
|
42
42
|
<AAA_SHIHON3></AAA_SHIHON3>
|
43
43
|
<AAA_SHIHON4></AAA_SHIHON4>
|
44
|
-
<AAA_SHIHON2
|
45
|
-
<AAA_SHIHON5
|
46
|
-
<AAA_SHIHON6
|
44
|
+
<AAA_SHIHON2><%= @資本金準備金 %></AAA_SHIHON2>
|
45
|
+
<AAA_SHIHON5><%= @資本金準備金 %></AAA_SHIHON5>
|
46
|
+
<AAA_SHIHON6><%= @資本金準備金 %></AAA_SHIHON6>
|
47
47
|
<AAA_JIGYO_SDATE idref="SDATE">
|
48
48
|
<gen:era></gen:era>
|
49
49
|
<gen:yy></gen:yy>
|
@@ -68,7 +68,7 @@
|
|
68
68
|
<AAB00600><%= 法人税割課税標準 %></AAB00600>
|
69
69
|
<AAB00700 />
|
70
70
|
<AAB00800 />
|
71
|
-
<AAB00810><%= 法人税割 %></AAB00810>
|
71
|
+
<AAB00810><%= 法人税割[0] %></AAB00810>
|
72
72
|
<AAB00820 />
|
73
73
|
<AAB00850 />
|
74
74
|
<AAB00900 />
|
@@ -155,16 +155,8 @@
|
|
155
155
|
<%= render_attr('AAF00700', @繰越損失管理.deduction) %>
|
156
156
|
<%= render_attr('AAG00100', 所得金額) %>
|
157
157
|
<AAH00100 />
|
158
|
-
<AAH00200
|
159
|
-
<AAH00400>
|
160
|
-
<gen:kubun_CD />
|
161
|
-
<gen:kinyukikan_NM></gen:kinyukikan_NM>
|
162
|
-
<gen:shiten_NM></gen:shiten_NM>
|
163
|
-
<gen:kinyukikan_CD />
|
164
|
-
<gen:shiten_CD />
|
165
|
-
<gen:yokin>1</gen:yokin>
|
166
|
-
<gen:koza></gen:koza>
|
167
|
-
</AAH00400>
|
158
|
+
<AAH00200><%= 中間還付税額(@確定法人税割, @法人税割中間納付) + 中間還付税額(@所得割, 事業税中間納付) + 中間還付税額(地方法人特別税(@所得割), @地方特別法人事業税中間納付) %></AAH00200>
|
159
|
+
<AAH00400><%= eltax_kouza %></AAH00400>
|
168
160
|
<AAI00100>
|
169
161
|
<gen:era />
|
170
162
|
<gen:yy />
|
@@ -183,8 +175,8 @@
|
|
183
175
|
<gen:mm />
|
184
176
|
<gen:dd />
|
185
177
|
</AAI01000>
|
186
|
-
<AAI00600
|
187
|
-
<AAI00500
|
178
|
+
<AAI00600>2</AAI00600>
|
179
|
+
<AAI00500>2</AAI00500>
|
188
180
|
<AAI00200>
|
189
181
|
<gen:era />
|
190
182
|
<gen:yy />
|
@@ -197,9 +189,9 @@
|
|
197
189
|
<gen:mm />
|
198
190
|
<gen:dd />
|
199
191
|
</AAI00300>
|
200
|
-
<AAI00400
|
201
|
-
<AAI00450
|
202
|
-
<AAI00700
|
192
|
+
<AAI00400>1</AAI00400>
|
193
|
+
<AAI00450><%= @税額.dig(:houjin, :kokuzei) %></AAI00450>
|
194
|
+
<AAI00700><%= @税額.dig(:houjin, :kokuzei) > 200000 ? 1 : 2 %></AAI00700>
|
203
195
|
<AAI00800 />
|
204
196
|
<AAJ_DAIRI_NAME></AAJ_DAIRI_NAME>
|
205
197
|
<AAJ_DAIRI_TEL_NUM></AAJ_DAIRI_TEL_NUM>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<USER_INF id="USER_INF">
|
2
|
+
<USER_ID id="USER_ID"><%= it_part_config('eltax_id') %></USER_ID>
|
3
|
+
<KANA id="KANA"><%= it_part_config('nozeisha_nm_kn') %></KANA>
|
4
|
+
<NAME id="NAME"><%= it_part_config('nozeisha_nm') %></NAME>
|
5
|
+
<HONTEN id="HONTEN">
|
6
|
+
<HONTEN_ADDR id="HONTEN_ADDR"><%= it_part_config('nozeisha_adr') %></HONTEN_ADDR>
|
7
|
+
<HONTEN_ZIP id="HONTEN_ZIP"><%= it_part_config('nozeisha_zip').gsub('-', '') %></HONTEN_ZIP>
|
8
|
+
<HONTEN_TEL id="HONTEN_TEL"><%= it_part_config('nozeisha_tel').gsub('-', '') %></HONTEN_TEL>
|
9
|
+
</HONTEN>
|
10
|
+
<DAIHYO id="DAIHYO">
|
11
|
+
<DAIHYOKAKU_CD id="DAIHYOKAKU_CD">01</DAIHYOKAKU_CD>
|
12
|
+
<DAIHYO_KANA id="DAIHYO_KANA"><%= it_part_config('daihyo_nm_kn') %></DAIHYO_KANA>
|
13
|
+
<DAIHYO_NAME id="DAIHYO_NAME"><%= it_part_config('daihyo_nm') %></DAIHYO_NAME>
|
14
|
+
<DAIHYO_ADDR id="DAIHYO_ADDR"><%= it_part_config('daihyo_adr') %></DAIHYO_ADDR>
|
15
|
+
<DAIHYO_ZIP id="DAIHYO_ZIP"><%= it_part_config('daihyo_zip').gsub('-', '') %></DAIHYO_ZIP>
|
16
|
+
<DAIHYO_TEL id="DAIHYO_TEL"></DAIHYO_TEL>
|
17
|
+
</DAIHYO>
|
18
|
+
<T_RCPT_NUM id="T_RCPT_NUM"><%= eltax_config('receipt_num') %></T_RCPT_NUM>
|
19
|
+
<HOJIN_NUMBER id="HOJIN_NUMBER"><%= it_part_config('nozeisha_bango') %></HOJIN_NUMBER>
|
20
|
+
</USER_INF>
|
@@ -21,14 +21,14 @@
|
|
21
21
|
<gen:yy><%= wareki(@start_date) %></gen:yy>
|
22
22
|
<gen:mm><%= @start_date.month %></gen:mm>
|
23
23
|
<gen:dd><%= @start_date.day %></gen:dd>
|
24
|
-
<gen:yyyymmdd
|
24
|
+
<gen:yyyymmdd><%= @start_date.strftime('%Y%m%d') %></gen:yyyymmdd>
|
25
25
|
</SDATE>
|
26
26
|
<EDATE id="EDATE">
|
27
27
|
<gen:era><%= gengou(@end_date) %></gen:era>
|
28
28
|
<gen:yy><%= wareki(@end_date) %></gen:yy>
|
29
29
|
<gen:mm><%= @end_date.month %></gen:mm>
|
30
30
|
<gen:dd><%= @end_date.day %></gen:dd>
|
31
|
-
<gen:yyyymmdd
|
31
|
+
<gen:yyyymmdd><%= @end_date.strftime('%Y%m%d') %></gen:yyyymmdd >
|
32
32
|
</EDATE>
|
33
33
|
<RPT_DATE id="RPT_DATE">
|
34
34
|
<gen:era><%= gengou(@issue_date) %></gen:era>
|
@@ -74,15 +74,15 @@
|
|
74
74
|
<KAZEI_TEL id="KAZEI_TEL" />
|
75
75
|
<HOGEN_NUM id="HOGEN_NUM" />
|
76
76
|
<KANRI_NUM id="KANRI_NUM" />
|
77
|
-
<KAZEI_NUM id="KAZEI_NUM"
|
77
|
+
<KAZEI_NUM id="KAZEI_NUM"><%= eltax_config('x_houjin_bango') %></KAZEI_NUM>
|
78
78
|
<HOJO_NUM id="HOJO_NUM" />
|
79
79
|
<STF_NUM id="STF_NUM" />
|
80
80
|
</ORG_INF>
|
81
|
-
<STIME id="STIME"
|
81
|
+
<STIME id="STIME"><%= @app_version %></STIME>
|
82
82
|
<HOJIN_DOFUKEN id="HOJIN_DOFUKEN">
|
83
83
|
<FORM_INF id="FORM_INF">
|
84
|
-
<JIGYO_NAME id="JIGYO_NAME"
|
85
|
-
<SHIHON id="SHIHON"
|
84
|
+
<JIGYO_NAME id="JIGYO_NAME"><%= it_part_config('jigyo_naiyo') %></JIGYO_NAME>
|
85
|
+
<SHIHON id="SHIHON"><%= it_part_config('shihon_kin') %></SHIHON>
|
86
86
|
<HOJIN_NUM id="HOJIN_NUM"></HOJIN_NUM>
|
87
87
|
<JIMUSHO_NUM id="JIMUSHO_NUM"><%= @jimusho_code %></JIMUSHO_NUM>
|
88
88
|
<SEIRI_NUM id="SEIRI_NUM" />
|
@@ -104,7 +104,7 @@
|
|
104
104
|
<SYSTEM_INF id="SYSTEM_INF">
|
105
105
|
<SYSTEM_DATA id="SYSTEM_DATA"></SYSTEM_DATA>
|
106
106
|
<NOUZEI_UPDATE id="NOUZEI_UPDATE">
|
107
|
-
<SDATE
|
107
|
+
<SDATE><%= DateTime.now.strftime('%Y%m%d%H%M%S') %></SDATE>
|
108
108
|
<UDATE></UDATE>
|
109
109
|
<SIGN_DATE></SIGN_DATE>
|
110
110
|
<SEND_DATE></SEND_DATE>
|
@@ -10,8 +10,46 @@
|
|
10
10
|
<IAA02200 IDREF="JIGYO_NENDO_TO"/>
|
11
11
|
</IAA02000>
|
12
12
|
<IAA02300 IDREF="NOZEISHA_BANGO"/>
|
13
|
+
<IAA02400><kubun_CD><%= gaikyo_config('homepage') ? 1 : 2 %></kubun_CD></IAA02400>
|
14
|
+
<%= render_attr('IAA02500', gaikyo_config('homepage')) %>
|
13
15
|
</IAA00000>
|
16
|
+
<%= render_attr('IAS00000', it_part_config('jigyo_naiyo')) %>
|
17
|
+
<IAC00000>
|
18
|
+
<IAC01000>
|
19
|
+
<%= render_attr('IAC01100', gaikyo_config('shiten_kokunai')) %>
|
20
|
+
<%= render_attr('IAC01300', gaikyo_config('shiten_kaigai')) %>
|
21
|
+
</IAC01000>
|
22
|
+
<IAC02000>
|
23
|
+
<%= render_attr('IAC02050', gaikyo_config('kogaisha_kokunai')) %>
|
24
|
+
<%= render_attr('IAC02100', gaikyo_config('kogaisha_kaigai')) %>
|
25
|
+
</IAC02000>
|
26
|
+
</IAC00000>
|
27
|
+
<IAD00000>
|
28
|
+
<IAD01000>
|
29
|
+
<%= render_attr('IAD01100', gaikyo_config('yakuin')) %>
|
30
|
+
</IAD01000>
|
31
|
+
</IAD00000>
|
32
|
+
<IAE00000>
|
33
|
+
<%= render_attr('IAE01000', gaikyo_config('software_kaikei') ? '<kubun_CD>1</kubun_CD>' : nil) %>
|
34
|
+
<IAE03000>
|
35
|
+
<%= render_attr('IAE03600', gaikyo_config('software_kaikei') ? '<kubun_CD>1</kubun_CD>' : nil) %>
|
36
|
+
</IAE03000>
|
37
|
+
<%= render_attr('IAE04300', gaikyo_config('software_kaikei') ? '<kubun_CD>1</kubun_CD>' : nil) %>
|
38
|
+
<%= render_attr('IAE04500', gaikyo_config('software_kaikei')) %>
|
39
|
+
<%= render_attr('IAE04600', gaikyo_config('software_mail')) %>
|
40
|
+
</IAE00000>
|
14
41
|
<IAF00000>
|
42
|
+
<IAF01000>
|
43
|
+
<IAF01100>
|
44
|
+
<%= render_attr('IAF01110', gaikyo_config('genkin_kanrisha')) %>
|
45
|
+
</IAF01100>
|
46
|
+
<IAF01200>
|
47
|
+
<%= render_attr('IAF01210', gaikyo_config('tsucho_kanrisha')) %>
|
48
|
+
</IAF01200>
|
49
|
+
</IAF01000>
|
50
|
+
<IAF03000>
|
51
|
+
<%= 概況源泉徴収種類 %>
|
52
|
+
</IAF03000>
|
15
53
|
<IAF04000>
|
16
54
|
<%= render_attr('IAF04200', 消費税課税売上高) %>
|
17
55
|
</IAF04000>
|
@@ -58,6 +96,33 @@
|
|
58
96
|
</IAI03000>
|
59
97
|
</HOK010-1>
|
60
98
|
<HOK010-2>
|
99
|
+
<IAJ00000>
|
100
|
+
<IAJ03000>
|
101
|
+
<%= render_attr('IAJ03100', gaikyo_config('genkin_share')) %>
|
102
|
+
<%= render_attr('IAJ03200', gaikyo_config('kake_share')) %>
|
103
|
+
</IAJ03000>
|
104
|
+
</IAJ00000>
|
105
|
+
<IAL00000>
|
106
|
+
<IAL01000>
|
107
|
+
<%= render_attr('IAL01100', gaikyo_config('shimekiri_uriage')||gaikyo_config('shimekiri')) %>
|
108
|
+
<%= render_attr('IAL01200', gaikyo_config('kessai_uriage')||gaikyo_config('kessai')) %>
|
109
|
+
</IAL01000>
|
110
|
+
<IAL02000>
|
111
|
+
<%= render_attr('IAL02100', gaikyo_config('shimekiri_shiire')||gaikyo_config('shimekiri')) %>
|
112
|
+
<%= render_attr('IAL02200', gaikyo_config('kessai_shiire')||gaikyo_config('kessai')) %>
|
113
|
+
</IAL02000>
|
114
|
+
<IAL03000>
|
115
|
+
<%= render_attr('IAL03100', gaikyo_config('shimekiri_gaichu')||gaikyo_config('shimekiri')) %>
|
116
|
+
<%= render_attr('IAL03200', gaikyo_config('kessai_gaichu')||gaikyo_config('kessai')) %>
|
117
|
+
</IAL03000>
|
118
|
+
<IAL04000>
|
119
|
+
<%= render_attr('IAL04100', gaikyo_config('shimekiri_kyuryou')||gaikyo_config('shimekiri')) %>
|
120
|
+
<%= render_attr('IAL04200', gaikyo_config('kessai_kyuryou')||gaikyo_config('kessai')) %>
|
121
|
+
</IAL04000>
|
122
|
+
</IAL00000>
|
123
|
+
<IAM00000>
|
124
|
+
<%= render_attr('IAM01000', '総勘定元帳') %>
|
125
|
+
</IAM00000>
|
61
126
|
<IAP00000>
|
62
127
|
<% 12.times do |i| %>
|
63
128
|
<IAP20000>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<HOI090 page="1" VR="4.0" id="HOI090" sakuseiNM="<%= @company %>" softNM="<%= @software %> <%= @company %>" sakuseiDay="<%= @issue_date %>">
|
2
|
+
<% @買掛金.values.each do |payable| %>
|
3
|
+
<HIB00000>
|
4
|
+
<%= render_attr('HIB00100', payable[:payable_type]) %>
|
5
|
+
<HIB00200>
|
6
|
+
<%= render_attr('HIB00210', payable[:name]) %>
|
7
|
+
<%= render_attr('HIB00220', payable[:address]) %>
|
8
|
+
</HIB00200>
|
9
|
+
<%= render_attr('HIB00300', payable[:amount]) %>
|
10
|
+
<%= render_attr('HIB00400', payable[:note]) %>
|
11
|
+
</HIB00000>
|
12
|
+
<% end %>
|
13
|
+
<HIC00000>
|
14
|
+
<%= render_attr('HIC00100', 買掛金等合計) %>
|
15
|
+
</HIC00000>
|
16
|
+
</HOI090>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<HOI110 page="1" VR="3.0" id="HOI110" sakuseiNM="<%= @company %>" softNM="<%= @software %> <%= @company %>" sakuseiDay="<%= @issue_date %>">
|
2
|
+
<% @借入金.values.each do |debt| %>
|
3
|
+
<HKB00000>
|
4
|
+
<%= render_attr('HKB00100', debt[:name]) %>
|
5
|
+
<%= render_attr('HKB00300', debt[:address]) %>
|
6
|
+
<%= render_attr('HKB00400', debt[:amount]) %>
|
7
|
+
<%= render_attr('HKB00800', debt[:note]) %>
|
8
|
+
</HKB00000>
|
9
|
+
<% end %>
|
10
|
+
<HKC00000>
|
11
|
+
<%= render_attr('HKC00100', 借入金合計) %>
|
12
|
+
</HKC00000>
|
13
|
+
</HOI110>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<HOI060 page="1" VR="4.0" id="HOI060" sakuseiNM="<%= @company %>" softNM="<%= @software %> <%= @company %>" sakuseiDay="<%= @issue_date %>">
|
2
|
+
<% @有価証券.values.each do |scurity| %>
|
3
|
+
<HFB00000>
|
4
|
+
<HFB00110>
|
5
|
+
<%= render_attr('HFB00120', scurity[:security_purpose]) %>
|
6
|
+
<%= render_attr('HFB00130', scurity[:security_genre]) %>
|
7
|
+
<%= render_attr('HFB00140', scurity[:name]) %>
|
8
|
+
</HFB00110>
|
9
|
+
<HFB00200>
|
10
|
+
<%= render_attr('HFB00210', scurity[:security_units]) %>
|
11
|
+
<HFB00215>
|
12
|
+
<%= render_attr('HFB00230', scurity[:amount]) %>
|
13
|
+
</HFB00215>
|
14
|
+
</HFB00200>
|
15
|
+
<%= render_attr('HFB00400', scurity[:note]) %>
|
16
|
+
</HFB00000>
|
17
|
+
<% end %>
|
18
|
+
<HFC00000>
|
19
|
+
<%= render_attr('HFC00100', 有価証券合計) %>
|
20
|
+
</HFC00000>
|
21
|
+
</HOI060>
|
@@ -4,6 +4,7 @@
|
|
4
4
|
<MAA00020 IDREF="JIGYO_NENDO_FROM"/>
|
5
5
|
<MAA00030 IDREF="JIGYO_NENDO_TO"/>
|
6
6
|
</MAA00010>
|
7
|
+
<MAA00040><kubun_CD>1</kubun_CD></MAA00040>
|
7
8
|
<MAA00050 IDREF="TEISYUTSU_DAY"/>
|
8
9
|
<MAA00060 IDREF="ZEIMUSHO"/>
|
9
10
|
<MAA00070 IDREF="NOZEISHA_ADR"/>
|
@@ -14,6 +15,7 @@
|
|
14
15
|
</MAA00090>
|
15
16
|
<MAA00115 IDREF="NOZEISHA_BANGO"/>
|
16
17
|
<MAA00120 IDREF="SHIHON_KIN"/>
|
18
|
+
<%= render_attr('MAA00130', @別表四調整所得 - @繰越損失管理.deduction) %>
|
17
19
|
<MAA00140>
|
18
20
|
<%= render_attr('MAA00150', 1) %>
|
19
21
|
<%= render_attr('MAA00160', 1) %>
|
@@ -1,13 +1,16 @@
|
|
1
1
|
<HOI010 page="1" VR="4.0" id="HOI010" sakuseiNM="<%= @company %>" softNM="<%= @software %> <%= @company %>" sakuseiDay="<%= @issue_date %>">
|
2
|
-
<% @預金.each do |
|
2
|
+
<% @預金.values.each do |bank| %>
|
3
3
|
<HAB00000>
|
4
4
|
<HAB00100>
|
5
|
-
<%= render_attr('HAB00110',
|
5
|
+
<%= render_attr('HAB00110', bank[:name]) %>
|
6
|
+
<%= render_attr('HAB00120', bank[:branch]) %>
|
6
7
|
</HAB00100>
|
7
|
-
<%= render_attr('
|
8
|
+
<%= render_attr('HAB00200', bank[:account_type]) %>
|
9
|
+
<%= render_attr('HAB00300', bank[:account_no]) %>
|
10
|
+
<%= render_attr('HAB00400', bank[:amount]) %>
|
8
11
|
</HAB00000>
|
9
12
|
<% end %>
|
10
13
|
<HAC00000>
|
11
|
-
<%= render_attr('HAC00100', @預金.values.sum) %>
|
14
|
+
<%= render_attr('HAC00100', @預金.values.map { |b| b[:amount] }.sum) %>
|
12
15
|
</HAC00000>
|
13
16
|
</HOI010>
|
@@ -0,0 +1,195 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Luca #:nodoc:
|
4
|
+
module Jp #:nodoc:
|
5
|
+
# 勘定科目内訳明細書のレンダリング
|
6
|
+
#
|
7
|
+
module Uchiwake
|
8
|
+
def 預貯金内訳
|
9
|
+
@預金 = @bs_data.each.with_object({}) do |(k, v), h|
|
10
|
+
next unless /^110[0-9A-Z]/.match(k)
|
11
|
+
next unless readable(v || 0) > 0
|
12
|
+
|
13
|
+
h[k] = {
|
14
|
+
name: self.class.dict.dig(k)[:label],
|
15
|
+
amount: readable(v)
|
16
|
+
}
|
17
|
+
metadata = uchiwake_account_config(k).first
|
18
|
+
if metadata && metadata['name']
|
19
|
+
h[k][:name] = metadata['name']
|
20
|
+
h[k][:branch] = metadata['branch']
|
21
|
+
h[k][:account_type] = metadata['account_type'] || '普通預金'
|
22
|
+
h[k][:account_no] = metadata['account_no']
|
23
|
+
h[k][:note] = metadata['note']
|
24
|
+
end
|
25
|
+
end
|
26
|
+
render_erb(search_template('yokin-meisai.xml.erb'))
|
27
|
+
end
|
28
|
+
|
29
|
+
def 有価証券内訳フォーム
|
30
|
+
accounts = uchiwake_account_config('331')
|
31
|
+
accounts.concat uchiwake_account_config('332')
|
32
|
+
return nil if accounts.length == 0
|
33
|
+
|
34
|
+
'HOI060'
|
35
|
+
end
|
36
|
+
|
37
|
+
def 有価証券内訳
|
38
|
+
account_codes = uchiwake_account_config('331').map { |account| account['code'].to_s }
|
39
|
+
account_codes.concat uchiwake_account_config('332').map { |account| account['code'].to_s }
|
40
|
+
return nil if account_codes.length == 0
|
41
|
+
|
42
|
+
@有価証券 = @bs_data.each.with_object({}) do |(k, v), h|
|
43
|
+
next unless account_codes.include?(k.to_s)
|
44
|
+
next unless readable(v || 0) > 0
|
45
|
+
|
46
|
+
h[k] = {
|
47
|
+
name: self.class.dict.dig(k)[:label],
|
48
|
+
amount: readable(v)
|
49
|
+
}
|
50
|
+
metadata = uchiwake_account_config(k).first
|
51
|
+
if metadata && metadata['name']
|
52
|
+
h[k][:name] = metadata['name'][0..9] if metadata['name']
|
53
|
+
h[k][:security_purpose] = metadata['security_purpose']
|
54
|
+
h[k][:security_genre] = metadata['security_genre']
|
55
|
+
h[k][:security_units] = metadata['security_units']
|
56
|
+
h[k][:note] = metadata['note']
|
57
|
+
end
|
58
|
+
h[k][:security_purpose] ||= 'その他' if /^332/.match(k.to_s)
|
59
|
+
h[k][:security_genre] ||= '株式' if /^33[12]/.match(k.to_s)
|
60
|
+
h[k][:note] ||= '関係会社株式' if /^332/.match(k.to_s)
|
61
|
+
end
|
62
|
+
|
63
|
+
render_erb(search_template('shoken-meisai.xml.erb'))
|
64
|
+
end
|
65
|
+
|
66
|
+
def 有価証券合計
|
67
|
+
@bs_data.filter { |k, _v| ['331', '332'].include?(k.to_s) }
|
68
|
+
.map { |_k, v| readable(v) || 0 }
|
69
|
+
.sum
|
70
|
+
end
|
71
|
+
|
72
|
+
def 買掛金内訳フォーム
|
73
|
+
accounts = uchiwake_account_config('511')
|
74
|
+
accounts.concat uchiwake_account_config('514')
|
75
|
+
accounts.concat uchiwake_account_config('517')
|
76
|
+
return nil if accounts.length == 0
|
77
|
+
|
78
|
+
'HOI090'
|
79
|
+
end
|
80
|
+
|
81
|
+
def 買掛金内訳
|
82
|
+
account_codes = uchiwake_account_config('511').map { |account| account['code'].to_s }
|
83
|
+
account_codes.concat uchiwake_account_config('514').map { |account| account['code'].to_s }
|
84
|
+
account_codes.concat uchiwake_account_config('517').map { |account| account['code'].to_s }
|
85
|
+
return nil if account_codes.length == 0
|
86
|
+
|
87
|
+
@買掛金 = @bs_data.each.with_object({}) do |(k, v), h|
|
88
|
+
next unless account_codes.include?(k.to_s)
|
89
|
+
next unless readable(v || 0) > 0
|
90
|
+
|
91
|
+
h[k] = {
|
92
|
+
name: self.class.dict.dig(k)[:label],
|
93
|
+
amount: readable(v)
|
94
|
+
}
|
95
|
+
metadata = uchiwake_account_config(k).first
|
96
|
+
if metadata && metadata['name']
|
97
|
+
h[k][:name] = metadata['name']
|
98
|
+
h[k][:payable_type] = self.class.dict.dig(k[0..2], :label)
|
99
|
+
h[k][:address] = metadata['address']
|
100
|
+
h[k][:note] = metadata['note']
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
render_erb(search_template('kaikake-meisai.xml.erb'))
|
105
|
+
end
|
106
|
+
|
107
|
+
def 買掛金等合計
|
108
|
+
@bs_data.filter { |k, _v| ['511', '514', '517'].include?(k.to_s) }
|
109
|
+
.map { |_k, v| readable(v) || 0 }
|
110
|
+
.sum
|
111
|
+
end
|
112
|
+
|
113
|
+
def 仮受金内訳
|
114
|
+
@源泉給与 = readable(@bs_data.dig('5191') || 0)
|
115
|
+
@源泉報酬 = readable(@bs_data.dig('5193') || 0)
|
116
|
+
render_erb(search_template('kariuke-meisai.xml.erb'))
|
117
|
+
end
|
118
|
+
|
119
|
+
def 借入金内訳フォーム
|
120
|
+
accounts = uchiwake_account_config('512')
|
121
|
+
accounts.concat uchiwake_account_config('712')
|
122
|
+
return nil if accounts.length == 0
|
123
|
+
|
124
|
+
'HOI110'
|
125
|
+
end
|
126
|
+
|
127
|
+
def 借入金内訳
|
128
|
+
account_codes = uchiwake_account_config('512').map { |account| account['code'].to_s }
|
129
|
+
account_codes.concat uchiwake_account_config('712').map { |account| account['code'].to_s }
|
130
|
+
return nil if account_codes.length == 0
|
131
|
+
|
132
|
+
@借入金 = @bs_data.each.with_object({}) do |(k, v), h|
|
133
|
+
next unless account_codes.include?(k.to_s)
|
134
|
+
next unless readable(v || 0) > 0
|
135
|
+
|
136
|
+
h[k] = {
|
137
|
+
name: self.class.dict.dig(k)[:label],
|
138
|
+
amount: readable(v)
|
139
|
+
}
|
140
|
+
metadata = uchiwake_account_config(k).first
|
141
|
+
if metadata && metadata['name']
|
142
|
+
h[k][:name] = metadata['name']
|
143
|
+
h[k][:address] = metadata['address']
|
144
|
+
h[k][:note] = metadata['note']
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
render_erb(search_template('kariire-meisai.xml.erb'))
|
149
|
+
end
|
150
|
+
|
151
|
+
def 借入金合計
|
152
|
+
@bs_data.filter { |k, _v| ['512', '712'].include?(k.to_s) }
|
153
|
+
.map { |_k, v| readable(v) || 0 }
|
154
|
+
.sum
|
155
|
+
end
|
156
|
+
|
157
|
+
def 地代家賃内訳フォーム
|
158
|
+
return nil if uchiwake_account_config('C1E').length == 0
|
159
|
+
|
160
|
+
'HOI150'
|
161
|
+
end
|
162
|
+
|
163
|
+
def 地代家賃内訳
|
164
|
+
account_codes = uchiwake_account_config('C1E').map { |account| account['code'].to_s }
|
165
|
+
return nil if account_codes.length == 0
|
166
|
+
|
167
|
+
@地代家賃 = @bs_data.each.with_object({}) do |(k, v), h|
|
168
|
+
next unless account_codes.include?(k)
|
169
|
+
next unless readable(v || 0) > 0
|
170
|
+
|
171
|
+
h[k] = {
|
172
|
+
name: self.class.dict.dig(k)[:label],
|
173
|
+
amount: readable(v)
|
174
|
+
}
|
175
|
+
metadata = uchiwake_account_config(k).first
|
176
|
+
if metadata && metadata['name']
|
177
|
+
h[k][:name] = metadata['name']
|
178
|
+
h[k][:address] = metadata['address']
|
179
|
+
h[k][:rent_type] = metadata['rent_type'] || '家賃'
|
180
|
+
h[k][:rent_purpose] = metadata['rent_purpose']
|
181
|
+
h[k][:rent_address] = metadata['rent_address']
|
182
|
+
h[k][:note] = metadata['note']
|
183
|
+
end
|
184
|
+
end
|
185
|
+
render_erb(search_template('chidai-meisai.xml.erb'))
|
186
|
+
end
|
187
|
+
|
188
|
+
def 役員報酬内訳
|
189
|
+
@役員報酬 = readable(@pl_data.dig('C11') || 0)
|
190
|
+
@給料 = readable(@pl_data.dig('C12') || 0)
|
191
|
+
render_erb(search_template('yakuin-meisai.xml.erb'))
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|