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?, #check_if_destroyable?, #check_if_updateable?, columns_definition, #customizable?, customizable?, #customized?, #destroyable?, #editable?, has_picture, #human_attribute_name, nomenclature_reflections, #old_record, #others, refers_to, #unsuppress, #updateable?

Methods included from Userstamp::Stampable

included

Methods included from Userstamp::Stamper

included

Instance Method Details

#pretax_amountObject Also known as: unit_pretax_amount

Compute a pre-tax amount


98
99
100
101
102
103
104
# File 'app/models/catalog_item.rb', line 98

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