inventory

This commit is contained in:
Nweni
2017-08-30 14:19:24 +06:30
parent c9998c0b65
commit cabc78c373
21 changed files with 328 additions and 138 deletions

View File

@@ -1,4 +1,4 @@
class StockCheckItemsController < ApplicationController
class Inventory::StockCheckItemsController < BaseInventoryController
before_action :set_stock_check_item, only: [:show, :edit, :update, :destroy]
# GET /stock_check_items
@@ -28,7 +28,7 @@ class StockCheckItemsController < ApplicationController
respond_to do |format|
if @stock_check_item.save
format.html { redirect_to @stock_check_item, notice: 'Stock check item was successfully created.' }
format.html { redirect_to inventory_stock_checks_path, notice: 'Stock check item was successfully created.' }
format.json { render :show, status: :created, location: @stock_check_item }
else
format.html { render :new }
@@ -69,6 +69,6 @@ class StockCheckItemsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def stock_check_item_params
params.fetch(:stock_check_item, {})
params.require(:stock_check_item).permit(:item_code, :stock_count)
end
end