diff --git a/app/controllers/origami/product_commissions_controller.rb b/app/controllers/origami/product_commissions_controller.rb index 31343fe5..1156827a 100755 --- a/app/controllers/origami/product_commissions_controller.rb +++ b/app/controllers/origami/product_commissions_controller.rb @@ -91,7 +91,7 @@ class Origami::ProductCommissionsController < BaseOrigamiController # @commission = Commission.where('product_code = ? AND is_active = ?', @menu_item.item_code, true).take Commission.all.each do |com| - if com.product_code.include? @menu_item.item_code && com.active == true + if com.product_code.include? @menu_item.item_code && com.is_active == true @commission = Commission.find(com.id) break end diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index e0eb7455..fb212f13 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -19,7 +19,7 @@ class ActionController::Base render :json => [{ status: false, message: 'Invalid Access!'}] end else - #check for license file + # check for license file if check_license current_license(ENV["SX_PROVISION_URL"]) else diff --git a/db/migrate/20170403155230_create_employees.rb b/db/migrate/20170403155230_create_employees.rb index 4270b265..16e741d8 100755 --- a/db/migrate/20170403155230_create_employees.rb +++ b/db/migrate/20170403155230_create_employees.rb @@ -3,6 +3,7 @@ class CreateEmployees < ActiveRecord::Migration[5.1] create_table :employees do |t| t.string :name, :null => false t.string :role, :null => false, :default => "cashier" + t.boolean :is_active, :default => true t.string :emp_id, :null => false t.string :password_digest, :null => false t.string :token_session