+
+ <%= render 'inventory_list' %>
-
-
-
-
-
+
<%if current_login_employee.role == "administrator" || current_login_employee.role == "manager" %>
-
+
<%end%>
-
+
+
+
+
diff --git a/app/views/inventory/inventory_definitions/_form.html.erb b/app/views/inventory/inventory_definitions/_form.html.erb
index 4c716bac..36b80822 100644
--- a/app/views/inventory/inventory_definitions/_form.html.erb
+++ b/app/views/inventory/inventory_definitions/_form.html.erb
@@ -1,10 +1,15 @@
-<%= simple_form_for(@inventory_definition) do |f| %>
+
+<%= simple_form_for([:inventory,@inventory_definition]) do |f| %>
<%= f.error_notification %>
+ <%= f.input :item_code %>
+ <%= f.input :min_order_level %>
+ <%= f.input :max_stock_level %>
<%= f.button :submit %>
+
<% end %>
diff --git a/app/views/inventory/inventory_definitions/new.html.erb b/app/views/inventory/inventory_definitions/new.html.erb
index a67b973a..ce290607 100644
--- a/app/views/inventory/inventory_definitions/new.html.erb
+++ b/app/views/inventory/inventory_definitions/new.html.erb
@@ -1,5 +1,11 @@
-
New Inventory Definition
-<%= render 'form', inventory_definition: @inventory_definition %>
-
-<%= link_to 'Back', inventory_definitions_path %>
+
+
+ <%= render 'form', inventory: @inventory_definition %>
+
diff --git a/app/views/inventory/stock_checks/index.html.erb b/app/views/inventory/stock_checks/index.html.erb
index 05b802eb..f5f8eb9a 100644
--- a/app/views/inventory/stock_checks/index.html.erb
+++ b/app/views/inventory/stock_checks/index.html.erb
@@ -1,25 +1,53 @@
-
<%= notice %>
+
+
+
+
+
+
+
+ | # |
+ Product |
+ Balance |
+
+
+
+
+
+
+
+
+
+
+
+
-
Stock Checks
+
+
+
+
+
-
-
-
- |
-
-
-
-
- <% @stock_checks.each do |stock_check| %>
-
- | <%= link_to 'Show', stock_check %> |
- <%= link_to 'Edit', edit_stock_check_path(stock_check) %> |
- <%= link_to 'Destroy', stock_check, method: :delete, data: { confirm: 'Are you sure?' } %> |
-
- <% end %>
-
-
-
-
-
-<%= link_to 'New Stock Check', new_stock_check_path %>
+
+
+
+
+
+ | # |
+ Product |
+ Balance |
+ Different |
+
+
+
+
+
+
+
diff --git a/app/views/layouts/inventory.html.erb b/app/views/layouts/inventory.html.erb
index 5bcf7e0a..d6bbf436 100644
--- a/app/views/layouts/inventory.html.erb
+++ b/app/views/layouts/inventory.html.erb
@@ -9,7 +9,7 @@
SmartSales : Restaurant
<%= csrf_meta_tags %>
- <%= stylesheet_link_tag 'inventory', media: 'all', 'data-turbolinks-track': 'reload' %>
+ <%= stylesheet_link_tag 'origami', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'jquery-confirm', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'jquery-confirm', 'data-turbolinks-track': 'reload' %>
diff --git a/config/routes.rb b/config/routes.rb
index 3e8caa28..980980cb 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -327,7 +327,7 @@ Rails.application.routes.draw do
# ----------- Inventory ---------------------------
namespace :inventory do
- get 'inventory' => 'inventory#index'
+ get '/' => 'inventory#index'
resources :stock_check_items
resources :stock_checks
resources :stock_journals
diff --git a/db/migrate/20170824110103_create_inventory_definitions.rb b/db/migrate/20170824110103_create_inventory_definitions.rb
index 4278ce89..c73fd0bd 100644
--- a/db/migrate/20170824110103_create_inventory_definitions.rb
+++ b/db/migrate/20170824110103_create_inventory_definitions.rb
@@ -4,6 +4,8 @@ class CreateInventoryDefinitions < ActiveRecord::Migration[5.1]
t.string :item_code
t.integer :min_order_level, :default => 0
t.integer :max_stock_level, :default => 0
+ t.integer :created_by
+ t.boolean :is_active, :default => true
t.timestamps
end
end