luca-jp 0.1.8 → 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/lib/luca/jp.rb +1 -0
- data/lib/luca/jp/aoiro.rb +34 -28
- data/lib/luca/jp/templates/chidai-meisai.xml.erb +15 -0
- data/lib/luca/jp/templates/gaikyo.xml.erb +32 -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/yokin-meisai.xml.erb +7 -4
- data/lib/luca/jp/uchiwake.rb +195 -0
- data/lib/luca/jp/util.rb +11 -0
- data/lib/luca/jp/version.rb +1 -1
- metadata +7 -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/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'
|
@@ -65,10 +66,20 @@ module Luca
|
|
65
66
|
@納税充当金期中増, @納税充当金期中減 = 納税充当金期中増減
|
66
67
|
@翌期還付法人税 = 中間還付税額(@確定法人税額 + @確定地方法人税額, @法人税中間納付 + @地方法人税中間納付)
|
67
68
|
@概況売上 = gaikyo('A0')
|
68
|
-
@form_sec = [
|
69
|
-
|
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']
|
70
76
|
@it = it_part
|
71
|
-
@form_data = [
|
77
|
+
@form_data = [
|
78
|
+
別表一, 別表一次葉, 別表二, 別表四簡易, 別表五一, 別表五二, 別表七, 別表十五,
|
79
|
+
適用額明細,
|
80
|
+
預貯金内訳, 有価証券内訳, 買掛金内訳, 仮受金内訳, 借入金内訳, 役員報酬内訳, 地代家賃内訳,
|
81
|
+
概況説明
|
82
|
+
].compact.join("\n")
|
72
83
|
render_erb(search_template('aoiro.xtx.erb'))
|
73
84
|
end
|
74
85
|
end
|
@@ -168,28 +179,6 @@ module Luca
|
|
168
179
|
render_erb(search_template('beppyo15.xml.erb'))
|
169
180
|
end
|
170
181
|
|
171
|
-
def 預貯金内訳
|
172
|
-
@預金 = @bs_data.each.with_object({}) do |(k, v), h|
|
173
|
-
next unless /^110[0-9A-Z]/.match(k)
|
174
|
-
next unless readable(v || 0) > 0
|
175
|
-
|
176
|
-
h[@@dict.dig(k)[:label]] = readable(v)
|
177
|
-
end
|
178
|
-
render_erb(search_template('yokin-meisai.xml.erb'))
|
179
|
-
end
|
180
|
-
|
181
|
-
def 仮受金内訳
|
182
|
-
@源泉給与 = readable(@bs_data.dig('5191') || 0)
|
183
|
-
@源泉報酬 = readable(@bs_data.dig('5193') || 0)
|
184
|
-
render_erb(search_template('kariuke-meisai.xml.erb'))
|
185
|
-
end
|
186
|
-
|
187
|
-
def 役員報酬内訳
|
188
|
-
@役員報酬 = readable(@pl_data.dig('C11') || 0)
|
189
|
-
@給料 = readable(@pl_data.dig('C12') || 0)
|
190
|
-
render_erb(search_template('yakuin-meisai.xml.erb'))
|
191
|
-
end
|
192
|
-
|
193
182
|
def 適用額明細フォーム
|
194
183
|
return nil if @確定法人税額 == 0
|
195
184
|
|
@@ -237,6 +226,10 @@ module Luca
|
|
237
226
|
render_erb(search_template('gaikyo.xml.erb'))
|
238
227
|
end
|
239
228
|
|
229
|
+
def self.dict
|
230
|
+
@@dict
|
231
|
+
end
|
232
|
+
|
240
233
|
private
|
241
234
|
|
242
235
|
def 期首未納事業税
|
@@ -267,8 +260,8 @@ module Luca
|
|
267
260
|
<VAE00210>
|
268
261
|
#{render_attr('VAE00220', owner['address'])}
|
269
262
|
#{render_attr('VAE00230', owner['name'])}
|
270
|
-
#{render_attr('VAE00235', owner['relation'] || 'その他')}
|
271
263
|
</VAE00210>
|
264
|
+
#{render_attr('VAE00235', owner['relation'] || '<kubun_CD>90</kubun_CD>')}
|
272
265
|
<VAE00250>
|
273
266
|
<VAE00290>
|
274
267
|
#{render_attr('VAE00300', owner['shares'])}
|
@@ -325,9 +318,9 @@ module Luca
|
|
325
318
|
|
326
319
|
%Q(<ICB00140>
|
327
320
|
#{render_attr('ICB00150', '仮払税金')}
|
328
|
-
#{render_attr('ICB00160', 未収仮払税金 * -1)}
|
321
|
+
#{render_attr('ICB00160', readable(未収仮払税金) * -1)}
|
329
322
|
<ICB00170>
|
330
|
-
#{render_attr('ICB00190', 還付税金 * -1)}
|
323
|
+
#{render_attr('ICB00190', readable(還付税金) * -1)}
|
331
324
|
#{render_attr('ICB00200', @仮払税金 * -1)}
|
332
325
|
</ICB00170>
|
333
326
|
#{render_attr('ICB00210', @仮払税金 * -1)}
|
@@ -549,6 +542,19 @@ module Luca
|
|
549
542
|
[readable(increase), readable(r)]
|
550
543
|
end
|
551
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")
|
556
|
+
end
|
557
|
+
|
552
558
|
def 概況月(idx)
|
553
559
|
@start_date.next_month(idx).month
|
554
560
|
end
|
@@ -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>
|
@@ -10,9 +10,32 @@
|
|
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>
|
14
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>
|
15
27
|
<IAF00000>
|
28
|
+
<IAF01000>
|
29
|
+
<IAF01100>
|
30
|
+
<%= render_attr('IAF01110', gaikyo_config('genkin_kanrisha')) %>
|
31
|
+
</IAF01100>
|
32
|
+
<IAF01200>
|
33
|
+
<%= render_attr('IAF01210', gaikyo_config('tsucho_kanrisha')) %>
|
34
|
+
</IAF01200>
|
35
|
+
</IAF01000>
|
36
|
+
<IAF03000>
|
37
|
+
<%= 概況源泉徴収種類 %>
|
38
|
+
</IAF03000>
|
16
39
|
<IAF04000>
|
17
40
|
<%= render_attr('IAF04200', 消費税課税売上高) %>
|
18
41
|
</IAF04000>
|
@@ -59,6 +82,15 @@
|
|
59
82
|
</IAI03000>
|
60
83
|
</HOK010-1>
|
61
84
|
<HOK010-2>
|
85
|
+
<IAJ00000>
|
86
|
+
<IAJ03000>
|
87
|
+
<%= render_attr('IAJ03100', gaikyo_config('genkin_share')) %>
|
88
|
+
<%= render_attr('IAJ03200', gaikyo_config('kake_share')) %>
|
89
|
+
</IAJ03000>
|
90
|
+
</IAJ00000>
|
91
|
+
<IAM00000>
|
92
|
+
<%= render_attr('IAM01000', '総勘定元帳') %>
|
93
|
+
</IAM00000>
|
62
94
|
<IAP00000>
|
63
95
|
<% 12.times do |i| %>
|
64
96
|
<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>
|
@@ -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
|
data/lib/luca/jp/util.rb
CHANGED
@@ -75,6 +75,17 @@ module Luca
|
|
75
75
|
config.dig('jp', 'beppyo2', key)
|
76
76
|
end
|
77
77
|
|
78
|
+
def gaikyo_config(key)
|
79
|
+
config.dig('jp', 'gaikyo', key)
|
80
|
+
end
|
81
|
+
|
82
|
+
def uchiwake_account_config(key)
|
83
|
+
account_list = config.dig('jp', 'accounts')
|
84
|
+
return [] if account_list.nil?
|
85
|
+
|
86
|
+
Array(account_list).filter { |account| /^#{key}/.match(account['code'].to_s) }
|
87
|
+
end
|
88
|
+
|
78
89
|
def eltax_config(key)
|
79
90
|
config.dig('jp', 'eltax', key)
|
80
91
|
end
|
data/lib/luca/jp/version.rb
CHANGED
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.2.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: 2021-03-
|
11
|
+
date: 2021-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lucabook
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- lib/luca/jp/templates/beppyo51.xml.erb
|
97
97
|
- lib/luca/jp/templates/beppyo52.xml.erb
|
98
98
|
- lib/luca/jp/templates/beppyo7.xml.erb
|
99
|
+
- lib/luca/jp/templates/chidai-meisai.xml.erb
|
99
100
|
- lib/luca/jp/templates/consumption.xtx.erb
|
100
101
|
- lib/luca/jp/templates/el-no6-43.xml.erb
|
101
102
|
- lib/luca/jp/templates/el-no6-9.xml.erb
|
@@ -105,11 +106,15 @@ files:
|
|
105
106
|
- lib/luca/jp/templates/fuhyo43.xml.erb
|
106
107
|
- lib/luca/jp/templates/fuhyo53.xml.erb
|
107
108
|
- lib/luca/jp/templates/gaikyo.xml.erb
|
109
|
+
- lib/luca/jp/templates/kaikake-meisai.xml.erb
|
110
|
+
- lib/luca/jp/templates/kariire-meisai.xml.erb
|
108
111
|
- lib/luca/jp/templates/kariuke-meisai.xml.erb
|
112
|
+
- lib/luca/jp/templates/shoken-meisai.xml.erb
|
109
113
|
- lib/luca/jp/templates/syouhizei-shinkoku-kanni.xml.erb
|
110
114
|
- lib/luca/jp/templates/tekiyougaku.xml.erb
|
111
115
|
- lib/luca/jp/templates/yakuin-meisai.xml.erb
|
112
116
|
- lib/luca/jp/templates/yokin-meisai.xml.erb
|
117
|
+
- lib/luca/jp/uchiwake.rb
|
113
118
|
- lib/luca/jp/urikake.rb
|
114
119
|
- lib/luca/jp/util.rb
|
115
120
|
- lib/luca/jp/version.rb
|