Class: CatalogItem

Inherits:
Ekylibre::Record::Base show all
Defined in:
app/models/catalog_item.rb

Overview

CatalogItem stores all the prices used in sales and purchases.

Instance Method Summary collapse

Methods inherited from Ekylibre::Record::Base

#already_updated?, attr_readonly_with_conditions, #check_if_destroyable?, #check_if_updateable?, columns_definition, complex_scopes, customizable?, #customizable?, #customized?, #destroyable?, #editable?, has_picture, #human_attribute_name, human_attribute_name_with_id, nomenclature_reflections, #old_record, #others, refers_to, scope_with_registration, simple_scopes, #updateable?

Instance Method Details

#pretax_amountObject Also known as: unit_pretax_amount

Compute a pre-tax amount


85
86
87
88
89
90
91
# File 'app/models/catalog_item.rb', line 85

def pretax_amount
  if all_taxes_included && reference_tax
    reference_tax.pretax_amount_of(amount)
  else
    amount
  end
end