luca-jp 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d797219b1ac78940861db1131f44024ddfce43b52dbaaf8b9d48fc6ac456fdf5
4
- data.tar.gz: 054d31fcf2f6bfdf6a37a4f58804518ca1264dc20c10fc6161e03e6db7369ce9
3
+ metadata.gz: 5b22664249b7ad24d2f3dd879f13e65904872a21b8c031d78466d4508e073843
4
+ data.tar.gz: ca8c9698152d247d89d0cf24de3b94c71d006fc9724bfcb7220f7d499a79f16b
5
5
  SHA512:
6
- metadata.gz: 45620145366f9d2a519c438b1b11a69404f5f70a97be2529f4967a0a060297c99e490afc2e0b8fae0ac7bce95c99b6bba670adc01a63f157d55a174cb9c6faec
7
- data.tar.gz: '08f51ad7ca1a249511b9e049a1dffd5246a64597c626bf04b9d0858360d81501da54b1a4f5a89b77df34131a9b03e8acee03e23e147066c293ae82c0b1f2d9fe'
6
+ metadata.gz: d8a95efc786fea95828a02274f4d6d293c82c23faad6526b4e33155c2e5ffe20983cfed42aa872a69f805e6c51fa05c808df4156ed851f2f47c9faae5cd19fbe
7
+ data.tar.gz: 8276ea9fc0ad23ddbb333de3c4a61b6e6d8325b988d33d0df9ead8e9d8dfeca32a1b5e7df2897d68dc9806c39be9d123856b1afdc41e17011020f1ab66c86013
data/lib/luca/jp/aoiro.rb CHANGED
@@ -245,7 +245,29 @@ module Luca
245
245
  end
246
246
 
247
247
  def 租税公課
248
- readable(LucaBook::State.gross(@start_date.year, @start_date.month, @end_date.year, @end_date.month, code: 'C1I')[:debit]['C1I']) || 0
248
+ readable(debit_amount('C1I', @start_date.year, @start_date.month, @end_date.year, @end_date.month))
249
+ end
250
+
251
+ def 別表一同族区分
252
+ case 同族会社?
253
+ when nil
254
+ nil
255
+ when true
256
+ '<kubun_CD>1</kubun_CD>'
257
+ else
258
+ '<kubun_CD>3</kubun_CD>'
259
+ end
260
+ end
261
+
262
+ def 別表二同族区分
263
+ case 同族会社?
264
+ when nil
265
+ nil
266
+ when true
267
+ '<kubun_CD>2</kubun_CD>'
268
+ else
269
+ '<kubun_CD>3</kubun_CD>'
270
+ end
249
271
  end
250
272
 
251
273
  def 別表二株主リスト
@@ -285,7 +307,7 @@ module Luca
285
307
  return nil if beppyo2_config('total_shares').nil?
286
308
  return nil if beppyo2_config('owners').nil?
287
309
 
288
- (別表二上位株数 * 100.0 / beppyo2_config('total_shares')).round(1).to_s
310
+ (別表二上位株数 * 100.0 / beppyo2_config('total_shares')).round(1)
289
311
  end
290
312
 
291
313
  def 別表二上位議決権数
@@ -298,7 +320,16 @@ module Luca
298
320
  return nil if beppyo2_config('total_votes').nil?
299
321
  return nil if beppyo2_config('owners').nil?
300
322
 
301
- (別表二上位議決権数 * 100.0 / beppyo2_config('total_votes')).round(1).to_s
323
+ (別表二上位議決権数 * 100.0 / beppyo2_config('total_votes')).round(1)
324
+ end
325
+
326
+ # TODO: 特定同族会社の判定
327
+ #
328
+ def 同族会社?
329
+ return nil if it_part_config('shihon_kin') > 100_000_000
330
+
331
+ return true if 別表二上位議決権割合 > 50 || 別表二上位株割合 > 50
332
+ false
302
333
  end
303
334
 
304
335
  def 別表四還付法人税等金額
@@ -577,13 +608,17 @@ module Luca
577
608
 
578
609
  def 概況月源泉徴収(idx)
579
610
  target = @start_date.next_month(idx)
580
- readable(LucaBook::State.gross(target.year, target.month, code: '5191')[:credit]['5191'] || 0)
581
- + readable(LucaBook::State.gross(target.year, target.month, code: '5193')[:credit]['5193'] || 0)
611
+ [
612
+ readable(credit_amount('5191', target.year, target.month, target.year, target.month)),
613
+ readable(credit_amount('5193', target.year, target.month, target.year, target.month))
614
+ ].sum
582
615
  end
583
616
 
584
617
  def 概況源泉徴収
585
- readable(LucaBook::State.gross(@start_date.year, @start_date.month, @end_date.year, @end_date.month, code: '5191')[:credit]['5191'] || 0)
586
- + readable(LucaBook::State.gross(@start_date.year, @start_date.month, @end_date.year, @end_date.month, code: '5193')[:credit]['5193'] || 0)
618
+ [
619
+ readable(credit_amount('5191', @start_date.year, @start_date.month, @end_date.year, @end_date.month)),
620
+ readable(credit_amount('5193', @start_date.year, @start_date.month, @end_date.year, @end_date.month))
621
+ ].sum
587
622
  end
588
623
 
589
624
  def gaikyo(code)
@@ -208,8 +208,8 @@ module Luca
208
208
  end
209
209
 
210
210
  def 未納事業税期中増減
211
- r = LucaBook::State.gross(@start_date.year, @start_date.month, @end_date.year, @end_date.month, code: '5152')
212
- [LucaSupport::Code.readable(r[:credit]['5152'] || 0), LucaSupport::Code.readable(r[:debit]['5152'] || 0)]
211
+ r = gross_amount('5152', @start_date.year, @start_date.month, @end_date.year, @end_date.month)
212
+ [LucaSupport::Code.readable(r[0]), LucaSupport::Code.readable(r[1])]
213
213
  end
214
214
 
215
215
 
@@ -14,8 +14,10 @@
14
14
  <BGA00110 IDREF="DAIHYO_NM"/>
15
15
  </BGA00090>
16
16
  <BGA00120 IDREF="DAIHYO_ADR"/>
17
+ <BGA00130><kubun_CD>1</kubun_CD></BGA00130>
17
18
  <BGA00140 IDREF="JIGYO_NAIYO"/>
18
19
  <BGA00150 IDREF="SHIHON_KIN"/>
20
+ <%= render_attr('BGA00170', 別表一同族区分) %>
19
21
  <BGA00210>
20
22
  <BGA00220><kubun_CD>1</kubun_CD></BGA00220>
21
23
  <BGA00230><kubun_CD>1</kubun_CD></BGA00230>
@@ -16,6 +16,7 @@
16
16
  <%= render_attr('VAB00070', 別表二上位議決権数) %>
17
17
  <%= render_attr('VAB00080', 別表二上位議決権割合) %>
18
18
  </VAB00000>
19
+ <%= render_attr('VAD00000', 別表二同族区分) %>
19
20
  <VAE00000>
20
21
  <VAE00010>
21
22
  <VAE00020>
@@ -24,6 +24,20 @@
24
24
  <%= render_attr('IAC02100', gaikyo_config('kogaisha_kaigai')) %>
25
25
  </IAC02000>
26
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>
27
41
  <IAF00000>
28
42
  <IAF01000>
29
43
  <IAF01100>
@@ -88,6 +102,24 @@
88
102
  <%= render_attr('IAJ03200', gaikyo_config('kake_share')) %>
89
103
  </IAJ03000>
90
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>
91
123
  <IAM00000>
92
124
  <%= render_attr('IAM01000', '総勘定元帳') %>
93
125
  </IAM00000>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Luca
4
4
  module Jp
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luca-jp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuma Takahiro