stock: Show the available number of units in the parenthesis
This commit is contained in:
parent
748c7334b5
commit
99c7ff1b4b
|
@ -45,7 +45,7 @@ module Spree
|
||||||
days = var.count_on_hand / mean
|
days = var.count_on_hand / mean
|
||||||
|
|
||||||
{'weighted_mean' => mean, 'days' => days, 'variant' => var,
|
{'weighted_mean' => mean, 'days' => days, 'variant' => var,
|
||||||
'product' => var.product, 'name' => name}
|
'product' => var.product, 'name' => name, 'available' => var.count_on_hand}
|
||||||
end
|
end
|
||||||
|
|
||||||
def generate_forecast()
|
def generate_forecast()
|
||||||
|
|
|
@ -5,7 +5,7 @@ will run low.
|
||||||
|
|
||||||
Estimates:
|
Estimates:
|
||||||
<% @forecast.each do |dict| %>
|
<% @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 %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue