luca-jp 0.16.3 → 0.17.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.
data/lib/luca/jp/util.rb CHANGED
@@ -21,9 +21,12 @@ module Luca
21
21
  end
22
22
  end
23
23
 
24
+ # TODO: customerオプションを適切に扱うには
25
+ # 納付時にx-customerを付加していないケースの考慮が必要
24
26
  def prepaid_tax(code, customer = nil)
25
27
  search_end = @end_date.prev_month # exclude year end adjustment
26
- header = { customer: customer } unless customer.nil?
28
+ # header = { customer: customer } unless customer.nil?
29
+ header = nil
27
30
  amount, _ = self.class.net(@start_date.year, @start_date.month, search_end.year, search_end.month, code: code, header: header)
28
31
  LucaSupport::Code.readable(amount[code] || 0)
29
32
  end
@@ -95,8 +98,8 @@ module Luca
95
98
  end
96
99
 
97
100
  def 期首期末残高(code)
98
- pre = readable(@start_balance.dig(code))
99
- post = readable(@bs_data.dig(code))
101
+ pre = readable(@start_balance.dig(code)) || 0
102
+ post = readable(@bs_data.dig(code)) || 0
100
103
  [readable(pre), readable(post)]
101
104
  end
102
105
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Luca
4
4
  module Jp
5
- VERSION = '0.16.3'
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.16.3
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-01-11 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
@@ -148,6 +148,7 @@ files:
148
148
  - lib/luca/jp/templates/eltax.xml.erb
149
149
  - lib/luca/jp/templates/fuhyo43.xml.erb
150
150
  - lib/luca/jp/templates/fuhyo53.xml.erb
151
+ - lib/luca/jp/templates/fuhyo6.xml.erb
151
152
  - lib/luca/jp/templates/gaikyo.xml.erb
152
153
  - lib/luca/jp/templates/kaikake-meisai.xml.erb
153
154
  - lib/luca/jp/templates/kariire-meisai.xml.erb