piggybak_giftcerts 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
21
21
  end
22
22
 
23
23
  APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
24
- load 'rails/tasks/engine.rake'
24
+ #load 'rails/tasks/engine.rake'
25
25
 
26
26
  Bundler::GemHelper.install_tasks
27
27
 
@@ -10,11 +10,17 @@ module PiggybakGiftcerts
10
10
  next if (i[:sellable].item.is_a?(::PiggybakVariants::Variant) && i[:sellable].item.item_type == "PiggybakGiftcerts::BuyableGiftcert")
11
11
  taxable_total += i[:quantity]*i[:sellable].price
12
12
  end
13
+ taxable_total += object.extra_data[:reduce_tax_subtotal].to_f
13
14
  else
14
15
  object.line_items.sellables.each do |li|
15
16
  next if (li.sellable.item.is_a?(::PiggybakVariants::Variant) && li.sellable.item.item_type == "PiggybakGiftcerts::BuyableGiftcert")
16
17
  taxable_total += li.quantity*li.sellable.price
17
18
  end
19
+ Piggybak.config.line_item_types.each do |k, v|
20
+ if v.has_key?(:reduce_tax_subtotal) && v[:reduce_tax_subtotal]
21
+ taxable_total += object.send("#{k}_charge")
22
+ end
23
+ end
18
24
  end
19
25
  (method.metadata.detect { |m| m.key == "rate" }.value.to_f * taxable_total).to_c
20
26
  end
@@ -1,3 +1,3 @@
1
1
  module PiggybakGiftcerts
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piggybak_giftcerts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-15 00:00:00.000000000 Z
12
+ date: 2012-11-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -131,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  segments:
133
133
  - 0
134
- hash: 1649749116328803619
134
+ hash: 1925880590576457555
135
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  none: false
137
137
  requirements:
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  segments:
142
142
  - 0
143
- hash: 1649749116328803619
143
+ hash: 1925880590576457555
144
144
  requirements: []
145
145
  rubyforge_project:
146
146
  rubygems_version: 1.8.23