Sha256: 51d220249f1f5b468976c457c59b3b016906dbd44fdfcfe8c312cc30c2d9fef3

Contents?: true

Size: 305 Bytes

Versions: 13

Compression:

Stored size: 305 Bytes

Contents

class TaxRate < ActiveRecord::Base
  belongs_to :zone
  belongs_to :tax_category
  validates_numericality_of :amount
  validates_presence_of :amount
  named_scope :by_zone, lambda { |zone| { :conditions => ["zone_id = ?", zone] } }
  
  enumerable_constant :tax_type, :constants => [:sales_tax, :vat]
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spree-0.8.4 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.8.5 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.4.0 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.4.1 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.5.0 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.6.0 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.5.1 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.7.1 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.7.0 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.8.0 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.8.1 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.8.2 vendor/extensions/tax_calculator/app/models/tax_rate.rb
spree-0.8.3 vendor/extensions/tax_calculator/app/models/tax_rate.rb