add sale reason in seed

This commit is contained in:
Yan
2017-06-15 11:12:50 +06:30
parent 2efd6fc410
commit 41572d5360
3 changed files with 6 additions and 12 deletions

View File

@@ -10,7 +10,6 @@ class HomeController < ApplicationController
@login_form.emp_id = params[:login_form][:emp_id] @login_form.emp_id = params[:login_form][:emp_id]
@login_form.password = params[:login_form][:password] @login_form.password = params[:login_form][:password]
@employee = Employee.login(@login_form.emp_id, @login_form.password) @employee = Employee.login(@login_form.emp_id, @login_form.password)
<<<<<<< HEAD
if @employee != nil if @employee != nil
if @employee.role == "administrator" if @employee.role == "administrator"
@@ -25,17 +24,6 @@ class HomeController < ApplicationController
else else
redirect_to origami_root_path, :notice => "Username and Password dosn't match!" redirect_to origami_root_path, :notice => "Username and Password dosn't match!"
end end
=======
if @employee.role == "administrator"
session[:session_token] = @employee.token_session
redirect_to dashboard_path
elsif @employee.role == "cashier"
session[:session_token] = @employee.token_session
redirect_to origami_root_path
else
render :index
end
>>>>>>> 7dffd668eaee6ab82621fd4bae150525ded79df1
end end

View File

@@ -76,6 +76,12 @@ booking_status = Lookup.create([{lookup_type:'booking_status', name: 'Available'
account_type = Lookup.create([{lookup_type:'account_type', name: 'Income', value: 'income'}, account_type = Lookup.create([{lookup_type:'account_type', name: 'Income', value: 'income'},
{lookup_type:'account_type', name: 'Expense', value: 'expense'}]) {lookup_type:'account_type', name: 'Expense', value: 'expense'}])
# sale void reason
void_reason = Lookup.create([{lookup_type:'void_reason', name: 'Approve By Manager', value: 'Approve By Manager'},
{lookup_type:'void_reason', name: 'Customer Mistake', value: 'Customer Mistake'},
{lookup_type:'void_reason', name: 'Cashier Mistake', value: 'Cashier Mistake'},
{lookup_type:'void_reason', name: 'Waiter Mistake', value: 'Waiter Mistake'}])
#WALK CUSTOMER - Default CUSTOMER (take key 1) #WALK CUSTOMER - Default CUSTOMER (take key 1)
customer = Customer.create({name:"WALK-IN", email: "cus1@customer.com", contact_no:"000000000"}) customer = Customer.create({name:"WALK-IN", email: "cus1@customer.com", contact_no:"000000000"})
customer2 = Customer.create({name:"TAKEAWAY", email: "cus2@customer.com", contact_no:"111111111"}) customer2 = Customer.create({name:"TAKEAWAY", email: "cus2@customer.com", contact_no:"111111111"})

BIN
dump.rdb

Binary file not shown.