class CoTailors::Order

Constants

MEASUREMENT_PARAMS

Public Instance Methods

grand_total() click to toggle source
# File lib/co_tailors/order.rb, line 15
def grand_total
  tax = 0.05
  shipping = 0 # 1200

  subtotal = items.all.map { |i| i.cost }.reduce( :+ )
  subtotal = subtotal * (tax + 1)
  subtotal += shipping
  return subtotal.to_i
end