billing 0.0.7c → 0.0.7d

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
  SHA1:
3
- metadata.gz: f56c9b0367a2f52896f8d42c487b3cf31f9b00e1
4
- data.tar.gz: 64959b01058842409f1246620166c579c575e036
3
+ metadata.gz: df6ed94ea74139a373d3e01686d5fe39b934df80
4
+ data.tar.gz: 43ba07baf2e1023652042622e64916a48793be47
5
5
  SHA512:
6
- metadata.gz: 461b7674cfbc98e4c44a7c688a6bfdf40938fab42c568e298b694b327840dfe9f2ab5123cb19a97b80cea325e23fc46453d2db5933c2759aafa62d6c9e21fe4c
7
- data.tar.gz: 405f85fc3cb7f6b69f1708d3bac31a869a9d3605a2d1636daaf30ec71510d35f48157b7f1db8bb6e3f7be4d4e52cfbb3f9fe25a87cca3529107102e4c33218f5
6
+ metadata.gz: f0d7508d635546326628c78ca0613940fa1ae7b9b0c62679121d7af2f329ff672321356c6dc166c81e6f05a4f28e9fcf416d8fe3da372007f5e6b845c41b6487
7
+ data.tar.gz: e50375f961de3e1c1ee0209de85f95ee17db09d0bdc2131f8ee3eb27630d742a474884b842ef22aca94b9de828eb3f17d66d7887bacaa470597ce742a58ef82d
@@ -94,12 +94,13 @@ module Billing
94
94
  end
95
95
 
96
96
  def global_modifier_value
97
- if global_modifiers = modifiers.select{ |m| m.charge.nil? }
98
- Money.new(0).tap() do |value|
99
- global_modifiers.each do |global_modifier|
100
- value += global_modifier.percent_ratio.nil? ? global_modifier.fixed_value : (charges_a.sum(&:value).to_money * global_modifier.percent_ratio)
101
- end
102
- end if global_modifiers.any?
97
+ global_modifiers = modifiers.select{ |m| m.charge.nil? }
98
+ if global_modifiers.any?
99
+ gvalue = Money.new(0)
100
+ global_modifiers.each do |global_modifier|
101
+ gvalue += global_modifier.percent_ratio.nil? ? global_modifier.fixed_value : (charges_a.sum(&:value).to_money * global_modifier.percent_ratio)
102
+ end
103
+ return gvalue
103
104
  end
104
105
  end
105
106
 
@@ -1,3 +1,3 @@
1
1
  module Billing
2
- VERSION = "0.0.7c"
2
+ VERSION = "0.0.7d"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7c
4
+ version: 0.0.7d
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Vangelov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-12 00:00:00.000000000 Z
11
+ date: 2015-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails