luca-jp 0.17.0 → 0.17.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: 1eb3cc018828ad1a0e466b86bac2280a7db7661118c6a47748bfa2feae045824
4
- data.tar.gz: '080aef29106f45e7a0188f646f8098d047decd6bc4adc70453d36ec2ae147f22'
3
+ metadata.gz: 58d494de7a0afaeba64b0fa3e863d29d58d18c4d388c3fc242cf0dbf15e7ac47
4
+ data.tar.gz: d508e3aed40438c2976ca54163177d4c70063f2cc817ff8f0a527bc5db718ac2
5
5
  SHA512:
6
- metadata.gz: 0ba0df576a6bb63923a33a0dc124a3a3539a1bda7346fa428228304fc371cc0218f3e855d18dbbc935d7a7352ace49f7ef012c46fe04f9abcca0b26b3af59217
7
- data.tar.gz: e10900edeed0d1596fcd7f02225d4e49fef3f9656ece12604d631bf5c788fd14e011cf41c5cf0ff043fee02f3171156c109d86a2e6bc70e819f0d7fdec92e42e
6
+ metadata.gz: 4423973592ddda83bf2bf59335e97912cd1629b22ab02e701081d885ebb37f5e105176748ff0695648cefe518fed3d482dd41e0d01e8aa9648442a74c5304a8c
7
+ data.tar.gz: a20cfa2fb819a2775173715c2dd71820c7ae5c1140f4354a8a62bebe6306a18c6b59ed27fc941a63ae9cec6cb995f09bbc088b1dd638b75eb3862204dc007c95
@@ -114,9 +114,7 @@ module Luca
114
114
  # -----------------------------------------------------
115
115
 
116
116
  def 期首繰越損失
117
- @繰越損失管理.records
118
- .filter { |record| record['start_date'] > @end_date.prev_year(10) && record['end_date'] < @start_date }
119
- .inject(0) { |sum, record| sum + (record['amount'] || 0) }
117
+ 翌期繰越損失 + @繰越損失管理.deduction
120
118
  end
121
119
 
122
120
  def 当期控除計
@@ -126,7 +124,7 @@ module Luca
126
124
  def 翌期繰越損失
127
125
  @繰越損失管理.records
128
126
  .filter { |record| record['start_date'] > @end_date.prev_year(10) && record['end_date'] < @start_date }
129
- .inject(0) { |sum, record| sum + (record['amount'] || 0) }
127
+ .inject(0) { |sum, record| [sum, record['amount']].compact.sum }
130
128
  end
131
129
 
132
130
  def 当期繰越損失
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Luca
4
4
  module Jp
5
- VERSION = '0.17.0'
5
+ VERSION = '0.17.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.17.0
4
+ version: 0.17.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-03-14 00:00:00.000000000 Z
11
+ date: 2024-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lucabook