Displaying 2 results from an estimated 2 matches for "sell_pric".
Did you mean:
sell_price
2011 Feb 09
4
Modules being shared and model data
Have in a module in ./lib:
module Pricing
def sell_price
(cost.to_f)/((100-(margn.to_f))/100)
end
def sell_price_inc
((product.cost.to_f)/((100-(product.margn.to_f))/100)*1.14)
end
def charge_excl
(sell_price).to_f * quantity
end
end
A model product:
class Product < ActiveRecord::Base
include Pricing
attr_accessible :name...
2006 Feb 22
0
Need help getting value from text_field_with_autocomplete
...gt;"></td>
<td align="center"><input type="text" name="unit_price[#{@product.id}]"
size="5", value="<%= @product.unit_price %>"></td>
<td align="center"><input type="text" name="sell_price[#{@product.id}]"
size="5"></td>
</tr>
<tr>
<td align="center"><input type="text" name="unit_weight[#{@product.id}]"
size="5", value="<%= @product.unit_weight %>"></td>
<td align="c...