luca-jp 0.18.1 → 0.19.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b480588d30ad8662d44c2ab3f2c0575fa91250b2b24928d4ccc089f1fee34f48
4
- data.tar.gz: 3843a90218ddccc9969d80ec955783a799e3095b6a1a01abe870632a3831f356
3
+ metadata.gz: 99f4c763f4419b099695dde406de31320b586826da34308b1d13df4fdf93310b
4
+ data.tar.gz: 3f6e7b427033b063fba377ef6f9d5b633eb1f054132fbf3a37aa1d60d6fe9c6b
5
5
  SHA512:
6
- metadata.gz: 6a87556ce0b2da2c016624df23efa9e73d00816e0682713596841426d95be8a13b256e6b6ae848b3e6ef16ac10ef9b0e6763b964f6f2cf5a8f14057a6bb52add
7
- data.tar.gz: f3dd2de0bc8686bc7643ade70cb584a1e8e5e3d3c9c6019249e8cbcff07ee85c36ac65465df408bc7cb82611624201988f3b42c277ee392128f961238206c1cb
6
+ metadata.gz: 546ec171704b541956e0982ed550d30cf1ae5c48d2c778d2b17b65377f63075e74206c48c3657036fbf3a0ab325a34ea5d98c0bade6d04eacd5ad20a1f877a31
7
+ data.tar.gz: dc682ce710480958ab7ba2dd88313ad955d448763ae5ab08e5afc9278035418dbcb9c6072f921dce39930062a41e4369153e4b3ed65ac533a606a96d1015eaf0
data/exe/luca-jp CHANGED
@@ -24,7 +24,7 @@ class LucaCmd
24
24
  if params[:export]
25
25
  puts Luca::Jp::Aoiro.range(*auto_range(args, params)).export_json(ext_config: ext_config)
26
26
  else
27
- puts Luca::Jp::Aoiro.range(*auto_range(args, params)).kani(ext_config: ext_config)
27
+ puts Luca::Jp::Aoiro.range(*auto_range(args, params)).kani(ext_config: ext_config, no_xbrl: params[:noxbrl])
28
28
  end
29
29
  end
30
30
 
@@ -82,6 +82,7 @@ when 'h', /hou?jinzei/
82
82
  opt.on('-x VAL', 'extra config') { |v| params[:extra] = v }
83
83
  opt.on('--export', 'export json') { |_v| params[:export] = true }
84
84
  opt.on('--lastyear', 'report on last Financial year') { |_v| params[:lastyear] = true }
85
+ opt.on('--no-xbrl', 'skip XBRL statement') { |_v| params[:noxbrl] = true }
85
86
  args = opt.parse!(ARGV)
86
87
  LucaCmd.check_dir('journals', ext_conf: EXT_CONF) do
87
88
  LucaCmd.houjinzei(args, params)
data/lib/luca/jp/aoiro.rb CHANGED
@@ -20,13 +20,14 @@ module Luca
20
20
  @dirname = 'journals'
21
21
  @record_type = 'raw'
22
22
 
23
- def kani(ext_config: nil, export: false)
23
+ def kani(ext_config: nil, export: false, no_xbrl: false)
24
24
  set_pl(4)
25
25
  set_bs(4)
26
26
  @issue_date = Date.today
27
27
  @company = CGI.escapeHTML(config.dig('company', 'name'))
28
28
  @software = 'LucaJp'
29
29
  @shinkoku_kbn = '30' # 確定申告
30
+ @no_xbrl = no_xbrl # 決算書XBRLの組み込み省略
30
31
 
31
32
  別表四所得調整(ext_config)
32
33
  @税額 = 税額計算
@@ -99,7 +100,7 @@ module Luca
99
100
  別表六一, 別表七, 別表八一, 別表十四二, 別表十五,
100
101
  適用額明細,
101
102
  預貯金内訳, 有価証券内訳, 買掛金内訳, 仮受金内訳, 借入金内訳, 役員報酬内訳, 地代家賃内訳, 雑益雑損失内訳,
102
- 概況説明
103
+ 概況説明, 決算書
103
104
  ].compact.join("\n")
104
105
  render_erb(search_template('aoiro.xtx.erb'))
105
106
  end
@@ -382,6 +383,28 @@ module Luca
382
383
  render_erb(search_template('gaikyo.xml.erb'))
383
384
  end
384
385
 
386
+ def 決算書フォーム
387
+ return %Q(<XBRL2_1_SEC/>) if @no_xbrl
388
+
389
+ xsd_filename = %Q(#statement-#{@issue_date.to_s}.xsd)
390
+ %Q(<XBRL2_1_SEC><rdf:Seq>
391
+ <rdf:li><rdf:description><Instance><rdf:Bag><rdf:li><rdf:description about="#HOT010-1"/></rdf:li></rdf:Bag></Instance></rdf:description></rdf:li>
392
+ <rdf:li><rdf:description><taxonomy><rdf:Bag><rdf:li><rdf:description about="#{xsd_filename}"/></rdf:li></rdf:Bag></taxonomy></rdf:description></rdf:li>
393
+ </rdf:Seq></XBRL2_1_SEC>)
394
+ end
395
+
396
+ def 決算書
397
+ if @no_xbrl
398
+ STDERR.puts "決算書XBRLをeTaxソフトに追加インポートする必要あり"
399
+ return nil
400
+ end
401
+
402
+ @xbrl_filename = %Q(statement-#{@issue_date.to_s})
403
+ @xbrl, @xsd = LucaBook::State.range(@start_date.year, @start_date.month, @end_date.year, @end_date.month)
404
+ .render_xbrl(@xbrl_filename)
405
+ render_erb(search_template('xbrl21.xml.erb'))
406
+ end
407
+
385
408
  def self.dict
386
409
  @@dict
387
410
  end
@@ -524,8 +547,15 @@ module Luca
524
547
  @当期純損益 + @損金不算入額留保 - @益金不算入額留保
525
548
  end
526
549
 
550
+ # NOTE: 別表四社外流出欄の本書と外書の区分は紙の事務を前提としており自明ではない。
551
+ # 帳票フィールド仕様書を参照して実装するほかない
552
+ #
527
553
  def 別表四調整所得仮計社外流出
528
- @当期純損益 + @損金不算入額社外流出 - @益金不算入額社外流出
554
+ @損金不算入額社外流出
555
+ end
556
+
557
+ def 別表四調整所得仮計社外流出外書
558
+ @益金不算入額社外流出 * -1
529
559
  end
530
560
 
531
561
  # 損金経理した税額控除対象額の調整
@@ -549,6 +579,10 @@ module Luca
549
579
  ].compact.sum
550
580
  end
551
581
 
582
+ def 別表四調整所得合計社外流出外書
583
+ 別表四調整所得仮計社外流出外書
584
+ end
585
+
552
586
  def 別表四還付法人税等金額
553
587
  refund_tax()
554
588
  end
@@ -7,7 +7,7 @@
7
7
  <SEND_DATA/>
8
8
  <FORM_SEC><rdf:Seq><%= @form_sec %></rdf:Seq></FORM_SEC>
9
9
  <IT_SEC><rdf:description about="#IT"/></IT_SEC>
10
- <TENPU_SEC/><XBRL_SEC/><XBRL_2_1_SEC/>
10
+ <TENPU_SEC/><XBRL_SEC/><%= 決算書フォーム %>
11
11
  <SOFUSHO_SEC/><ATTACH_SEC/><CSV_SEC/>
12
12
  </rdf:description>
13
13
  </rdf:RDF>
@@ -96,7 +96,7 @@
96
96
  <%= render_attr('ARD00290', @益金不算入額) %>
97
97
  <%= render_attr('ARD00300', @益金不算入額留保) %>
98
98
  <ARD00310>
99
- <%= render_attr('ARD00330', @益金不算入額社外流出) %>
99
+ <%= render_attr('ARD00320', @益金不算入額社外流出) %>
100
100
  </ARD00310>
101
101
  </ARD00280>
102
102
  </ARD00000>
@@ -104,6 +104,7 @@
104
104
  <%= render_attr('ARE00010', 別表四調整所得仮計) %>
105
105
  <%= render_attr('ARE00020', 別表四調整所得仮計留保) %>
106
106
  <ARE00030>
107
+ <%= render_attr('ARE00040', 別表四調整所得仮計社外流出外書) %>
107
108
  <%= render_attr('ARE00050', 別表四調整所得仮計社外流出) %>
108
109
  </ARE00030>
109
110
  </ARE00000>
@@ -111,6 +112,7 @@
111
112
  <%= render_attr('ARZ10010', 別表四調整所得仮計) %>
112
113
  <%= render_attr('ARZ10020', 別表四調整所得仮計留保) %>
113
114
  <ARZ10030>
115
+ <%= render_attr('ARZ10040', 別表四調整所得仮計社外流出外書) %>
114
116
  <%= render_attr('ARZ10050', 別表四調整所得仮計社外流出) %>
115
117
  </ARZ10030>
116
118
  </ARZ10000>
@@ -129,6 +131,7 @@
129
131
  <%= render_attr('ARK00010', 別表四調整所得合計) %>
130
132
  <%= render_attr('ARK00020', 別表四調整所得合計留保) %>
131
133
  <ARK00030>
134
+ <%= render_attr('ARK00040', 別表四調整所得合計社外流出外書) %>
132
135
  <%= render_attr('ARK00050', 別表四調整所得合計社外流出) %>
133
136
  </ARK00030>
134
137
  </ARK00000>
@@ -136,7 +139,8 @@
136
139
  <%= render_attr('ARM00010', 別表四調整所得合計 - @繰越損失管理.deduction) %>
137
140
  <%= render_attr('ARM00020', 別表四調整所得合計留保) %>
138
141
  <ARM00030>
139
- <%= render_attr('ARM00050', 別表四調整所得合計社外流出 - @繰越損失管理.deduction) %>
142
+ <%= render_attr('ARM00040', 別表四調整所得合計社外流出外書 - @繰越損失管理.deduction) %>
143
+ <%= render_attr('ARM00050', 別表四調整所得合計社外流出) %>
140
144
  </ARM00030>
141
145
  </ARM00000>
142
146
  <%# ARN10010 中間申告における繰戻しによる還付に係る災害損失欠損金額の益金算入額 %>
@@ -145,6 +149,7 @@
145
149
  <%= render_attr('ARS00010', @別表四調整所得) %>
146
150
  <%= render_attr('ARS00020', 別表四調整所得合計留保) %>
147
151
  <ARS00030>
152
+ <%= render_attr('ARS00040', 別表四調整所得合計社外流出外書) %>
148
153
  <%= render_attr('ARS00050', 別表四調整所得合計社外流出) %>
149
154
  </ARS00030>
150
155
  </ARS00000>
@@ -154,6 +159,7 @@
154
159
  <%= render_attr('ARS50010', @別表四調整所得) %>
155
160
  <%= render_attr('ARS50020', 別表四調整所得合計留保) %>
156
161
  <ARS50030>
162
+ <%= render_attr('ARS50040', 別表四調整所得合計社外流出外書) %>
157
163
  <%= render_attr('ARS50050', 別表四調整所得合計社外流出) %>
158
164
  </ARS50030>
159
165
  </ARS50000>
@@ -167,7 +173,8 @@
167
173
  <%= render_attr('ARV00010', @別表四調整所得 - @繰越損失管理.deduction) %>
168
174
  <%= render_attr('ARV00020', 別表四調整所得合計留保) %>
169
175
  <ARV00030>
170
- <%= render_attr('ARV00050', 別表四調整所得合計社外流出 - @繰越損失管理.deduction) %>
176
+ <%= render_attr('ARV00040', 別表四調整所得合計社外流出外書 - @繰越損失管理.deduction) %>
177
+ <%= render_attr('ARV00050', 別表四調整所得合計社外流出) %>
171
178
  </ARV00030>
172
179
  </ARV00000>
173
180
  </HOA420>
@@ -0,0 +1,8 @@
1
+ <XBRL2_1>
2
+ <XBRL2_1_INSTANCE VR="2.0" id="HOT010-1" page="1" sakuseiDay="<%= @issue_date %>" sakuseiNM="<%= @company %>" softNM="<%= @software %> <%= @company %>">
3
+ <%= @xbrl %>
4
+ </XBRL2_1_INSTANCE>
5
+ <XBRL2_1_TAXONOMY id="<%= @xbrl_filename %>.xsd">
6
+ <%= @xsd %>
7
+ </XBRL2_1_TAXONOMY>
8
+ </XBRL2_1>
@@ -7,6 +7,9 @@
7
7
  <ILA00050><%= it_part_config('daihyo_adr') %></ILA00050>
8
8
  <ILA00060><kubun_CD>1</kubun_CD></ILA00060>
9
9
  </ILA00010>
10
+ <ILA00310>
11
+ <%= render_attr('ILA00320', @役員報酬) %>
12
+ </ILA00310>
10
13
  </ILA00000>
11
14
  <ILB00000>
12
15
  <ILB00010>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Luca
4
4
  module Jp
5
- VERSION = '0.18.1'
5
+ VERSION = '0.19.1'
6
6
  end
7
7
  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.18.1
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuma Takahiro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-11 00:00:00.000000000 Z
11
+ date: 2024-04-12 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.5.3
19
+ version: 0.5.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.5.3
26
+ version: 0.5.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: lucadeal
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -173,6 +173,7 @@ files:
173
173
  - lib/luca/jp/templates/shoken-meisai.xml.erb
174
174
  - lib/luca/jp/templates/syouhizei-shinkoku-kanni.xml.erb
175
175
  - lib/luca/jp/templates/tekiyougaku.xml.erb
176
+ - lib/luca/jp/templates/xbrl21.xml.erb
176
177
  - lib/luca/jp/templates/yakuin-meisai.xml.erb
177
178
  - lib/luca/jp/templates/yokin-meisai.xml.erb
178
179
  - lib/luca/jp/templates/zatsueki-meisai.xml.erb