sk_calc 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/sk_calc/items.rb +1 -1
- data/lib/sk_calc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTI4YjFhYzNhNjI2NzVmZmU5Njc0NTQ1OWJlMGQ2NTM3ZmQ5YzE5MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmRmYjU3OWM2YjI3OGVmNjMzODBjZmY2ODBjNmU1YWRjYmZjMjI0Yw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWM0YTFhZTcxNjk5NjI1YzFiN2Q1NzdjZjk2ZDg3NjA2NGJlNmRjZDI3MmE1
|
10
|
+
OTBjNDFlMTVhODM2NThmMzkxMmQ3MWNmNjJhYzQxODBjMjE1YzFmMjczOTI5
|
11
|
+
MThkZDJhMzQ1YjEyNTMyYzAyOGNhMzUzYjRjOTdmMDA1OGJmYWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzUwZjc2NDcwM2NjYTkxZGJmOGUyNjg0YzdhMTEyZDJkMGM2ZjNjMDY5ODEw
|
14
|
+
MjhmMmZiMTYyZDAyOTk3ZTcwZjcxOGE4NDk4OWRkMzhkODQ0OWE4MGM3MjA0
|
15
|
+
YmZiOWNjNmJjMDNlY2ExMDA4NjNjMWMyMDhlNmQwN2RmOGU2Y2M=
|
data/lib/sk_calc/items.rb
CHANGED
@@ -87,7 +87,7 @@ module SK::Calc::Items
|
|
87
87
|
result = {}
|
88
88
|
items.group_by(&:tax).each do |tax, item_group|
|
89
89
|
net_total_sum = item_group.to_a.sum(&:net_total_base)
|
90
|
-
result[tax] = (net_total_sum * tax / 100.0)
|
90
|
+
result[tax] = (net_total_sum * tax / 100.0) if tax && !tax.zero?
|
91
91
|
end
|
92
92
|
result.sort
|
93
93
|
end
|
data/lib/sk_calc/version.rb
CHANGED