@ -62,7 +62,7 @@ module Spree
forecast.push(generate_estimate(var))
}
forecast
forecast.sort { |x,y| x['days'] <=> y['days'] }
end
def stock_report_email()
@ -5,7 +5,7 @@ will run low.
Estimates:
<% @forecast.each do |dict| %>
<%= dict['name'] %> (<%= dict['available'] %>) => <%= dict['days'].round(2) %> days until sold out.
<% end %>