Class: Spree::Adjustment

Inherits:
Object
  • Object
show all
Defined in:
app/models/spree/adjustment_decorator.rb

Instance Method Summary collapse

Instance Method Details

#super_update!Object



28
# File 'app/models/spree/adjustment_decorator.rb', line 28

alias :super_update! :update!

#update!Object

Spree sometimes lock adjustments. We will make to calculate Exactor Tax anyway!



31
32
33
34
35
36
37
38
# File 'app/models/spree/adjustment_decorator.rb', line 31

def update!
  if originator.present? and originator.is_a?(TaxRate) and originator.is_exactor_default?
    self.state = "open"
    self.label = "Sales Tax"
    self.update_attribute_without_callbacks(:label, label)
  end
  super_update!
end