stock: Show the available number of units in the parenthesis

This commit is contained in:
Holger Hans Peter Freyther 2013-07-10 17:07:18 +02:00
parent 748c7334b5
commit 99c7ff1b4b
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ module Spree
days = var.count_on_hand / mean
{'weighted_mean' => mean, 'days' => days, 'variant' => var,
'product' => var.product, 'name' => name}
'product' => var.product, 'name' => name, 'available' => var.count_on_hand}
end
def generate_forecast()

View File

@ -5,7 +5,7 @@ will run low.
Estimates:
<% @forecast.each do |dict| %>
<%= dict['name'] %> => <%= dict['days'].round(2) %> days until sold out.
<%= dict['name'] %> (<%= dict['available'] %>) => <%= dict['days'].round(2) %> days until sold out.
<% end %>