Merge branch 'staging'

This commit is contained in:
Yan
2017-07-17 15:13:31 +06:30
58 changed files with 1375 additions and 1252 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

View File

@@ -213,3 +213,29 @@ tr.discount-item-row:hover {
margin-left:-40px !important;
margin-top:-40px !important;
}
/*Loading gif for payment*/
#loading_wrapper{
position: fixed;
background-color: #C8C8C8 ;
height: 100%;
width: 100%;
left: 0;
opacity: 0.6;
top: 0;
z-index: 9999999;
}
#loading{
position: relative;
height: 100%;
width: 100%;
background-image: url('../../../image/loading-ajax.gif');
background-position: center center;
background-repeat: no-repeat;
opacity: 1;
filter: alpha(opacity=100); /* ie */
-moz-opacity: 1; /* mozilla */
}

View File

@@ -34,12 +34,10 @@ class BaseReportController < ActionController::Base
to = params[:to]
day_ref = Time.now.utc.getlocal
if params[:report_type] == "daily_sale" || params[:report_type] == "sale_item"
if from.present? && to.present?
if from != "" && to != ""
f_date = DateTime.parse(params[:from])
t_date = DateTime.parse(params[:to])
f_date = DateTime.parse(from)
t_date = DateTime.parse(to)
f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec)
t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec)
from = f_time.beginning_of_day.utc.getlocal
@@ -83,59 +81,6 @@ class BaseReportController < ActionController::Base
to = (day_ref - 1.year).end_of_year.utc
end
end
else # end daily sale report
if period_type.to_i == 1
if params[:from] != "" && params[:to] !=""
f_date = DateTime.parse(params[:from])
t_date = DateTime.parse(params[:to])
f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec)
t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec)
from = f_time.beginning_of_day.utc.getlocal
to = t_time.end_of_day.utc.getlocal
else
from = day_ref.beginning_of_day.utc
to = day_ref.end_of_day.utc
end
else
case period.to_i
when PERIOD["today"]
from = day_ref.beginning_of_day.utc
to = day_ref.end_of_day.utc
when PERIOD["yesterday"]
from = (day_ref - 1.day).beginning_of_day.utc
to = (day_ref - 1.day).end_of_day.utc
when PERIOD["this_week"]
from = Time.now.beginning_of_week.utc
to = Time.now.utc
when PERIOD["last_week"]
from = (day_ref - 7.day).beginning_of_week.utc
to = (day_ref - 7.day).end_of_week.utc
when PERIOD["last_7"]
from = (day_ref - 7.day).utc
to = Time.now.utc
when PERIOD["this_month"]
from = Time.now.beginning_of_month.utc
to = Time.now.utc
when PERIOD["last_month"]
from = (day_ref - 1.month).beginning_of_month.utc
to = (day_ref - 1.month).end_of_month.utc
when PERIOD["last_30"]
from = (day_ref - 30.day).utc
to = Time.now.utc
when PERIOD["this_year"]
from = Time.now.beginning_of_year.utc
to = Time.now.utc
when PERIOD["last_year"]
from = (day_ref - 1.year).beginning_of_year.utc
to = (day_ref - 1.year).end_of_year.utc
end
end
end
return from, to

View File

@@ -49,21 +49,7 @@ class Crm::CustomersController < BaseCrmController
#get customer amount
@customer = Customer.find(params[:id])
@response = Customer.get_membership_transactions(@customer)
# get member information
total = Customer.get_member_account(@customer)
@balance = 0.00
@accountable_type = ''
if total["status"]==true
total["data"].each do |res|
if res["accountable_type"] == "RebateAccount" || res["accountable_type"] == "RebatebonusAccount"
@balance += res["balance"]
# @accountable_type = res["accountable_type"]
@accountable_type = "Rebate Balance"
end
end
end
# @response = ""
#end customer amount

View File

@@ -7,7 +7,7 @@ class Origami::DiscountsController < BaseOrigamiController
if Sale.exists?(sale_id)
@sale_data = Sale.find(sale_id)
end
@member_discount = MembershipSetting.find_by_discount(1)
@accounts = Account.all
end
@@ -167,33 +167,39 @@ class Origami::DiscountsController < BaseOrigamiController
'Accept' => 'application/json'
}, :timeout => 10)
rescue HTTParty::Error
response = {status: false, message: "Can't open membership server "}
response = {:status=> false, :message => "Can't open membership server " }
rescue Net::OpenTimeout
response = { status: false , message: "Can't open membership server "}
response = {:status=> false, :message => "Can't open membership server " }
rescue OpenURI::HTTPError
response = { status: false, message: "Can't open membership server "}
response = {:status=> false, :message => "Can't open membership server " }
rescue SocketError
response = { status: false, message: "Can't open membership server "}
response = {:status=> false, :message => "Can't open membership server " }
end
puts "ssssssssss"
puts response.to_json
table_id = sale.bookings[0].dining_facility_id
table_type = DiningFacility.find(table_id).type
puts response
puts "sssssssssss"
# Re-calc All Amount in Sale
if response["status"] == true
sale.compute_by_sale_items(sale_id, sale.sale_items, response["discount_earned"])
end
result = {:status=> "Success", :table_id => table_id,:table_type => table_type }
# if response["status"] == false
# result = {:status=> "Success", :table_id => table_id,:table_type => table_type,:url_status => response[:status],:url_message => response[:message] }
# end
discount_amount = response["discount_earned"]
if response["discount_bonus_earned"]
discount_amount = discount_amount + response["discount_bonus_earned"]
end
sale.compute_by_sale_items(sale_id, sale.sale_items, discount_amount, 'member_discount')
result = {:status=> "Success",:title=>"Member Discount", :table_id => table_id,:table_type => table_type }
end
if response["status"] == "500"
result = {:status=> response["error"],:title=>"Alert", :table_id => table_id,:table_type => table_type }
end
if !response.nil?
if response[:status] == false
result = {:status=> response[:message],:title=>"Alert", :table_id => table_id,:table_type => table_type }
end
end
render :json => result.to_json
end

View File

@@ -4,7 +4,7 @@ class Origami::HomeController < BaseOrigamiController
def index
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')
@complete = Sale.all
@complete = Sale.where("sale_status != 'new'")
@orders = Order.all.order('date desc')
# @shift = ShiftSale.current_open_shift(current_user.id)
end
@@ -13,7 +13,7 @@ class Origami::HomeController < BaseOrigamiController
def show
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')
@complete = Sale.all
@complete = Sale.where("sale_status != 'new'")
@orders = Order.all.order('date desc')
@status_order = ""
@status_sale = ""

View File

@@ -3,7 +3,7 @@ class Origami::OrdersController < BaseOrigamiController
def show
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')
@complete = Sale.all
@complete = Sale.where("sale_status != 'new'")
@orders = Order.all.order('status desc')
@order = Order.find(params[:order_id])
sale_order = SaleOrder.find_by_order_id(@order.order_id)

View File

@@ -6,6 +6,8 @@ class Origami::OthersPaymentsController < BaseOrigamiController
@sale_id = params[:sale_id]
@payment_method_setting = PaymentMethodSetting.all
@rebate = MembershipSetting.find_by_rebate(1)
# @sale_id = params[:sale_id]
# sale_data = Sale.find_by_sale_id(@sale_id)

View File

@@ -18,7 +18,8 @@ class Origami::PaymentsController < BaseOrigamiController
# customer= Customer.where('customer_id=' +.customer_id)
customer= Customer.find(sale_data.customer_id)
# get member information
if customer.membership_id != nil
rebate = MembershipSetting.find_by_rebate(1)
if customer.membership_id != nil && rebate
member_info = Customer.get_member_account(customer)
end
# get printer info
@@ -55,7 +56,8 @@ class Origami::PaymentsController < BaseOrigamiController
#shop detail
shop_details = Shop.find(1)
# get member information
if customer.membership_id != nil
rebate = MembershipSetting.find_by_rebate(1)
if customer.membership_id != nil && rebate
member_info = Customer.get_member_account(customer)
rebate_amount = Customer.get_membership_transactions(customer,saleObj.receipt_no)
end
@@ -89,9 +91,9 @@ class Origami::PaymentsController < BaseOrigamiController
#get customer amount
@customer = Customer.find(@sale_data.customer_id)
rebate = MembershipSetting.find_by_rebate(1)
# get member information
if @customer.membership_id != nil
if @customer.membership_id != nil && rebate
response = Customer.get_member_account(@customer)
if response["status"]==true
response["data"].each do |res|
@@ -145,7 +147,8 @@ class Origami::PaymentsController < BaseOrigamiController
#shop detail
shop_details = Shop.find(1)
# get member information
if customer.membership_id != nil
rebate = MembershipSetting.find_by_rebate(1)
if customer.membership_id != nil && rebate
member_info = Customer.get_member_account(customer)
rebate_amount = Customer.get_membership_transactions(customer,saleObj.receipt_no)
end

View File

@@ -3,7 +3,7 @@ class Origami::RoomsController < BaseOrigamiController
def show
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')
@complete = Sale.all
@complete = Sale.where("sale_status != 'new'")
@orders = Order.all.order('date desc')
@room = DiningFacility.find(params[:room_id])
@sale_array = Array.new
@@ -31,9 +31,6 @@ class Origami::RoomsController < BaseOrigamiController
end
end
end
puts "hhhhhhhhhh"
puts @status
puts @obj.to_json
end

View File

@@ -3,7 +3,7 @@ class Origami::SalesController < BaseOrigamiController
def show
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')
@complete = Sale.all
@complete = Sale.where("sale_status != 'new'")
@orders = Order.all.order('date desc')
@sale = Sale.find(params[:sale_id])
end

View File

@@ -4,8 +4,6 @@ class Origami::ShiftsController < BaseOrigamiController
end
def show
puts ">>>>>"
puts current_user.id
@shift = ShiftSale.current_open_shift(current_user.id)
end

View File

@@ -1,25 +1,31 @@
class Reports::ReceiptNoController < BaseReportController
authorize_resource :class => false
def index
from, to, report_type = get_date_range_from_params
@payments = [["All Payment",''], ["Cash Payment","cash"], ["Credit Payment","creditnote"], ["FOC Payment","foc"], ["Other Payment","card"]]
if params[:shift_name].to_i != 0
@shift = ShiftSale.where('shift_started_at >= ? and shift_closed_at <= ?',from,to).take
# puts @shift.to_json
if @shift.present?
@sale_data = Sale.where('shift_sale_id = ? ',@shift.id)
@sale_taxes = Sale.get_separate_tax(from,to)
end
else
@sale_data = Sale.where("sale_status=? and receipt_date between ? and ?","completed",from.utc,to.utc)
@sale_taxes = Sale.get_separate_tax(from.utc,to.utc)
end
from, to = get_date_range_from_params
if @shift.present?
@shift_from = @shift.shift_started_at.nil? ? '-' : @shift.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p")
@shift_to = @shift.shift_closed_at.nil? ? '-' : @shift.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p")
end
@shift_sale_range = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
@shift = ''
if params[:shift_name].to_i != 0
shift_sale = ShiftSale.find(params[:shift_name])
if to.blank?
@shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL ',shift_sale.shift_started_at)
else
@shift = ShiftSale.where('shift_started_at = ? and shift_closed_at = ? ',shift_sale.shift_started_at, shift_sale.shift_closed_at)
end
end
@sale_data = Sale.get_shift_sales_by_receipt_no(@shift_sale_range,@shift,from,to, params[:payment_type])
if @shift.present?
@shift.each do |sh|
@shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p")
@shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p")
@shift_data = sh
end
end
respond_to do |format|
format.html
@@ -28,7 +34,7 @@ authorize_resource :class => false
end
def show
from, to, report_type = get_date_range_from_params
from, to = get_date_range_from_params
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
@@ -38,7 +44,8 @@ authorize_resource :class => false
local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p")
opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc
closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc
str = { :local_opening_date => local_opening_date, :local_closing_date => local_closing_date, :opening_date => opening_date, :closing_date => closing_date}
shift_id = sale.id.nil? ? '-' : sale.id
str = {:shift_id => shift_id, :local_opening_date => local_opening_date, :local_closing_date => local_closing_date, :opening_date => opening_date, :closing_date => closing_date}
date_arr.push(str)
end
@@ -48,205 +55,4 @@ authorize_resource :class => false
format.json { render json: out }
end
end
def get_date_range_from_params
period_type = params[:period_type]
period = params[:period]
branch = params[:branch]
report_type = params[:report_type]
shift_name = params[:shift_name]
unless shift_name.nil?
shift_arr = shift_name.split(' - ')
shift_from = shift_arr[0]
shift_to = shift_arr[1]
end
day_ref = day_ref = Time.now.utc.getlocal
if period_type.to_i == 1
### =>search by from and to
unless shift_name.nil?
if shift_name.to_s == '0'
### => all shift
f_date = DateTime.parse(params[:from])
t_date = DateTime.parse(params[:to])
f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec)
t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec)
from = f_time.beginning_of_day.utc.getlocal
to = t_time.end_of_day.utc.getlocal
else
unless shift_from == '-'
f_date = DateTime.parse(shift_from)
from = f_date
else
from = ''
end
unless shift_to == '-'
t_date = DateTime.parse(shift_to)
to = t_date
else
to = ''
end
end
else
f_date = DateTime.parse(params[:from])
t_date = DateTime.parse(params[:to])
f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec)
t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec)
from = f_time.beginning_of_day.utc.getlocal
to = t_time.end_of_day.utc.getlocal
end
else
### => search by Today or yesterday
unless shift_name.nil?
if shift_name.to_s == '0'
### => all shift
case period.to_i
when PERIOD["today"]
from = day_ref.beginning_of_day.utc
to = day_ref.end_of_day.utc
when PERIOD["yesterday"]
from = (day_ref - 1.day).beginning_of_day.utc
to = (day_ref - 1.day).end_of_day.utc
when PERIOD["this_week"]
from = Time.now.beginning_of_week.utc
to = Time.now.utc
when PERIOD["last_week"]
from = (day_ref - 7.day).beginning_of_week.utc
to = (day_ref - 7.day).end_of_week.utc
when PERIOD["last_7"]
from = (day_ref - 7.day).utc
to = Time.now.utc
when PERIOD["this_month"]
from = Time.now.beginning_of_month.utc
to = Time.now.utc
when PERIOD["last_month"]
from = (day_ref - 1.month).beginning_of_month.utc
to = (day_ref - 1.month).end_of_month.utc
when PERIOD["last_30"]
from = (day_ref - 30.day).utc
to = Time.now.utc
when PERIOD["this_year"]
from = Time.now.beginning_of_year.utc
to = Time.now.utc
when PERIOD["last_year"]
from = (day_ref - 1.year).beginning_of_year.utc
to = (day_ref - 1.year).end_of_year.utc
end
else
unless shift_from == '-'
f_date = DateTime.parse(shift_from)
#f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec)
from = f_date.utc
else
from = ''
end
unless shift_to == '-'
t_date = DateTime.parse(shift_to)
#t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec)
to = t_date.utc
else
to = ''
end
end
else
if params[:report_type].to_i != 0
r_type = params[:report_type].to_s
if r_type == 'shift_item'
case period.to_i
when PERIOD["today"]
from = day_ref.beginning_of_day.utc
to = day_ref.end_of_day.utc
when PERIOD["yesterday"]
from = (day_ref - 1.day).beginning_of_day.utc
to = (day_ref - 1.day).end_of_day.utc
when PERIOD["this_week"]
from = Time.now.beginning_of_week.utc
to = Time.now.utc
when PERIOD["last_week"]
from = (day_ref - 7.day).beginning_of_week.utc
to = (day_ref - 7.day).end_of_week.utc
when PERIOD["last_7"]
from = (day_ref - 7.day).utc
to = Time.now.utc
when PERIOD["this_month"]
from = Time.now.beginning_of_month.utc
to = Time.now.utc
when PERIOD["last_month"]
from = (day_ref - 1.month).beginning_of_month.utc
to = (day_ref - 1.month).end_of_month.utc
when PERIOD["last_30"]
from = (day_ref - 30.day).utc
to = Time.now.utc
when PERIOD["this_year"]
from = Time.now.beginning_of_year.utc
to = Time.now.utc
when PERIOD["last_year"]
from = (day_ref - 1.year).beginning_of_year.utc
to = (day_ref - 1.year).end_of_year.utc
end
end
else
### => report not shift
case period.to_i
when PERIOD["today"]
from = day_ref.beginning_of_day.utc
to = day_ref.end_of_day.utc
when PERIOD["yesterday"]
from = (day_ref - 1.day).beginning_of_day.utc
to = (day_ref - 1.day).end_of_day.utc
when PERIOD["this_week"]
from = Time.now.beginning_of_week.utc
to = Time.now.utc
when PERIOD["last_week"]
from = (day_ref - 7.day).beginning_of_week.utc
to = (day_ref - 7.day).end_of_week.utc
when PERIOD["last_7"]
from = (day_ref - 7.day).utc
to = Time.now.utc
when PERIOD["this_month"]
from = Time.now.beginning_of_month.utc
to = Time.now.utc
when PERIOD["last_month"]
from = (day_ref - 1.month).beginning_of_month.utc
to = (day_ref - 1.month).end_of_month.utc
when PERIOD["last_30"]
from = (day_ref - 30.day).utc
to = Time.now.utc
when PERIOD["this_year"]
from = Time.now.beginning_of_year.utc
to = Time.now.utc
when PERIOD["last_year"]
from = (day_ref - 1.year).beginning_of_year.utc
to = (day_ref - 1.year).end_of_year.utc
end
end
end
end
return from, to,report_type
end
end

View File

@@ -2,17 +2,20 @@ class Reports::SaleitemController < BaseReportController
authorize_resource :class => false
def index
from, to, report_type = get_date_range_from_params
from, to = get_date_range_from_params
shift_sale_range = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
shift = ''
if to.blank?
shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL ',from)
else
shift = ShiftSale.where('shift_started_at = ? and shift_closed_at = ? ',from, to)
end
if params[:shift_name].to_i != 0
shift_sale = ShiftSale.find(params[:shift_name])
if to.blank?
shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL ',shift_sale.shift_started_at)
else
@sale_data, @discount_data , @cash_data , @card_data , @credit_data , @foc_data , @grand_total = Sale.get_by_shift_items(shift_sale_range,shift, from, to, Sale::SALE_STATUS_COMPLETED, report_type)
shift = ShiftSale.where('shift_started_at = ? and shift_closed_at = ? ',shift_sale.shift_started_at, shift_sale.shift_closed_at)
end
end
@sale_data, @discount_data , @cash_data , @card_data , @credit_data , @foc_data , @grand_total , @change_amount = Sale.get_by_shift_items(shift_sale_range,shift, from, to, Sale::SALE_STATUS_COMPLETED)
@account_cate_count = Hash.new {|hash, key| hash[key] = 0}
@@ -27,7 +30,7 @@ class Reports::SaleitemController < BaseReportController
@sale_data.each {|acc| @totalByAccount[acc.account_id] += acc.grand_total}
if !shift.nil?
if shift.present?
shift.each do |sh|
@shift_from = sh.shift_started_at.nil? ? '-' : sh.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p")
@shift_to = sh.shift_closed_at.nil? ? '-' : sh.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p")
@@ -52,7 +55,8 @@ class Reports::SaleitemController < BaseReportController
local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p")
opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc
closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc
str = { :local_opening_date => local_opening_date, :local_closing_date => local_closing_date, :opening_date => opening_date, :closing_date => closing_date}
shift_id = sale.id.nil? ? '-' : sale.id
str = {:shift_id => shift_id, :local_opening_date => local_opening_date, :local_closing_date => local_closing_date, :opening_date => opening_date, :closing_date => closing_date}
date_arr.push(str)
end
@@ -62,226 +66,5 @@ class Reports::SaleitemController < BaseReportController
format.json { render json: out }
end
end
def get_date_range_from_params
period_type = params[:period_type]
period = params[:period]
from = params[:from]
to = params[:to]
branch = params[:branch]
report_type = params[:report_type]
shift_name = params[:shift_name]
unless shift_name.nil?
shift_arr = shift_name.split(' - ')
shift_from = shift_arr[0]
shift_to = shift_arr[1]
end
day_ref = Time.now
if period_type.to_i == 1
### =>search by from and to
unless shift_name.nil?
if shift_name.to_s == '0'
### => all shift
#f_date = DateTime.parse(from)
#t_date = DateTime.parse(to)
if params[:from] && params[:to]
if params[:from] != "" && params[:to] !=""
f_date = DateTime.strptime(from, "%m/%d/%Y")
t_date = DateTime.strptime(to, "%m/%d/%Y")
f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec)
t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec)
from = f_time.beginning_of_day.utc
to = t_time.end_of_day.utc
end
else
from = day_ref.beginning_of_day.utc
to = day_ref.end_of_day.utc
end
else
unless shift_from == '-'
f_date = DateTime.parse(shift_from)
from = f_date
else
from = ''
end
unless shift_to == '-'
t_date = DateTime.parse(shift_to)
to = t_date
else
to = ''
end
end
else
# f_date = DateTime.parse(from)
# t_date = DateTime.parse(to)
if params[:from] && params[:to]
if params[:from] != "" && params[:to] !=""
f_date = DateTime.strptime(from, "%m/%d/%Y")
t_date = DateTime.strptime(to, "%m/%d/%Y")
f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec)
t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec)
from = f_time.beginning_of_day.utc
to = t_time.end_of_day.utc
end
else
from = day_ref.beginning_of_day.utc
to = day_ref.end_of_day.utc
end
end
else
### => search by Today or yesterday
unless shift_name.nil?
if shift_name.to_s == '0'
### => all shift
case period.to_i
when PERIOD["today"]
from = day_ref.beginning_of_day.utc
to = day_ref.end_of_day.utc
when PERIOD["yesterday"]
from = (day_ref - 1.day).beginning_of_day.utc
to = (day_ref - 1.day).end_of_day.utc
when PERIOD["this_week"]
from = Time.now.beginning_of_week.utc
to = Time.now.utc
when PERIOD["last_week"]
from = (day_ref - 7.day).beginning_of_week.utc
to = (day_ref - 7.day).end_of_week.utc
when PERIOD["last_7"]
from = (day_ref - 7.day).utc
to = Time.now.utc
when PERIOD["this_month"]
from = Time.now.beginning_of_month.utc
to = Time.now.utc
when PERIOD["last_month"]
from = (day_ref - 1.month).beginning_of_month.utc
to = (day_ref - 1.month).end_of_month.utc
when PERIOD["last_30"]
from = (day_ref - 30.day).utc
to = Time.now.utc
when PERIOD["this_year"]
from = Time.now.beginning_of_year.utc
to = Time.now.utc
when PERIOD["last_year"]
from = (day_ref - 1.year).beginning_of_year.utc
to = (day_ref - 1.year).end_of_year.utc
end
else
unless shift_from == '-'
f_date = DateTime.parse(shift_from)
# f_date = DateTime.strptime(shift_from, "%m/%d/%Y")
#f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec)
from = f_date
else
from = ''
end
unless shift_to == '-'
t_date = DateTime.parse(shift_to)
# t_date = DateTime.strptime(shift_to, "%m/%d/%Y")
#t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec)
to = t_date
else
to = ''
end
end
else
if params[:report_type].to_i != 0
r_type = params[:report_type].to_s
if r_type == 'shift_item'
case period.to_i
when PERIOD["today"]
from = day_ref.beginning_of_day.utc
to = day_ref.end_of_day.utc
when PERIOD["yesterday"]
from = (day_ref - 1.day).beginning_of_day.utc
to = (day_ref - 1.day).end_of_day.utc
when PERIOD["this_week"]
from = Time.now.beginning_of_week.utc
to = Time.now.utc
when PERIOD["last_week"]
from = (day_ref - 7.day).beginning_of_week.utc
to = (day_ref - 7.day).end_of_week.utc
when PERIOD["last_7"]
from = (day_ref - 7.day).utc
to = Time.now.utc
when PERIOD["this_month"]
from = Time.now.beginning_of_month.utc
to = Time.now.utc
when PERIOD["last_month"]
from = (day_ref - 1.month).beginning_of_month.utc
to = (day_ref - 1.month).end_of_month.utc
when PERIOD["last_30"]
from = (day_ref - 30.day).utc
to = Time.now.utc
when PERIOD["this_year"]
from = Time.now.beginning_of_year.utc
to = Time.now.utc
when PERIOD["last_year"]
from = (day_ref - 1.year).beginning_of_year.utc
to = (day_ref - 1.year).end_of_year.utc
end
end
else
### => report not shift
case period.to_i
when PERIOD["today"]
from = day_ref.beginning_of_day.utc
to = day_ref.end_of_day.utc
when PERIOD["yesterday"]
from = (day_ref - 1.day).beginning_of_day.utc
to = (day_ref - 1.day).end_of_day.utc
when PERIOD["this_week"]
from = Time.now.beginning_of_week.utc
to = Time.now.utc
when PERIOD["last_week"]
from = (day_ref - 7.day).beginning_of_week.utc
to = (day_ref - 7.day).end_of_week.utc
when PERIOD["last_7"]
from = (day_ref - 7.day).utc
to = Time.now.utc
when PERIOD["this_month"]
from = Time.now.beginning_of_month.utc
to = Time.now.utc
when PERIOD["last_month"]
from = (day_ref - 1.month).beginning_of_month.utc
to = (day_ref - 1.month).end_of_month.utc
when PERIOD["last_30"]
from = (day_ref - 30.day).utc
to = Time.now.utc
when PERIOD["this_year"]
from = Time.now.beginning_of_year.utc
to = Time.now.utc
when PERIOD["last_year"]
from = (day_ref - 1.year).beginning_of_year.utc
to = (day_ref - 1.year).end_of_year.utc
end
end
end
end
return from, to,report_type
end
end

View File

@@ -3,16 +3,40 @@ class Reports::ShiftsaleController < BaseReportController
def index
from, to, report_type = get_date_range_from_params
@sale_data = Sale.get_by_shiftsales(from,to)
respond_to do |format|
from, to = get_date_range_from_params
@shift = ''
if params[:shift_name].to_i != 0
@shift = ShiftSale.find(params[:shift_name])
end
@sale_data = Sale.get_by_shiftsales(from,to,@shift)
respond_to do |format|
format.html
format.xls
end
end
def show
from, to = get_date_range_from_params
@sale_data = Sale.get_by_shift_sale(from,to,Sale::SALE_STATUS_COMPLETED)
date_arr = Array.new
@sale_data.each do |sale|
local_opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc.getlocal.strftime("%e %b %I:%M%p")
local_closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc.getlocal.strftime("%e %b %I:%M%p")
opening_date = sale.opening_date.nil? ? '-' : sale.opening_date.utc
closing_date = sale.closing_date.nil? ? '-' : sale.closing_date.utc
shift_id = sale.id.nil? ? '-' : sale.id
str = {:shift_id => shift_id, :local_opening_date => local_opening_date, :local_closing_date => local_closing_date, :opening_date => opening_date, :closing_date => closing_date}
date_arr.push(str)
end
out = {:status => 'ok', :message => date_arr}
respond_to do |format|
format.json { render json: out }
end
end
end

View File

@@ -70,6 +70,6 @@ class Settings::MembershipSettingsController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def settings_membership_setting_params
params.require(:membership_setting).permit(:membership_type, :is_active, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id, :created_by)
params.require(:membership_setting).permit(:membership_type, :is_active,:discount,:rebate,:bonus,:point, :gateway_communication_type, :gateway_url, :auth_token, :merchant_account_id, :created_by)
end
end

View File

@@ -75,8 +75,8 @@ class Ability
can :read, Sale
can :update, Sale
can :add_customer, Customer
can :update_sale_by_customer, Customer
can :add_customer, Customer
can :update_sale_by_customer, Customer
can :index, :other_charge
can :create, :other_charge

View File

@@ -1,12 +1,12 @@
class MenuCategory < ApplicationRecord
# before_create :generate_menu_category_code
before_create :generate_menu_category_code
belongs_to :menu
has_many :children, :class_name => "MenuCategory", foreign_key: "menu_category_id"
belongs_to :parent, :class_name => "MenuCategory", foreign_key: "menu_category_id", optional: true
has_many :menu_items
validates_presence_of :name, :menu, :code, :order_by
validates_presence_of :name, :menu, :order_by
default_scope { order('order_by asc') }

View File

@@ -1,6 +1,6 @@
class MenuItem < ApplicationRecord
# before_create :generate_menu_item_code
before_create :generate_menu_item_code
belongs_to :menu_category, :optional => true
has_many :menu_item_instances
@@ -8,7 +8,7 @@ class MenuItem < ApplicationRecord
has_many :children, :class_name => "MenuItem", foreign_key: "menu_item_id"
belongs_to :account
validates_presence_of :item_code, :name, :type, :min_qty, :taxable, :min_selectable_item, :max_selectable_item
validates_presence_of :name, :type, :min_qty, :taxable, :min_selectable_item, :max_selectable_item
default_scope { order('item_code asc') }

View File

@@ -1,6 +1,6 @@
class MenuItemInstance < ApplicationRecord
belongs_to :menu_item
# before_create :generate_menu_item_instance_code
before_create :generate_menu_item_instance_code
def self.findParentCategory(item)
if item.menu_category_id

View File

@@ -503,84 +503,18 @@ def self.get_by_range_by_saleitems(from,to,status,report_type)
case report_type.to_i
when REPORT_TYPE["daily"]
return query
when REPORT_TYPE["monthly"]
return query.group("MONTH(date)")
when REPORT_TYPE["yearly"]
return query.group("YEAR(date)")
end
end
def self.get_by_shiftsales(from,to)
return ShiftSale.where("(shift_started_at between ? and ? OR shift_closed_at between ? and ? )", from, to, from, to)
def self.get_by_shiftsales(from,to,shift)
if !shift.blank?
ShiftSale.where("id =?",shift.id)
else
ShiftSale.where("(shift_started_at between ? and ? OR shift_closed_at between ? and ? )", from, to, from, to)
end
end
# def self.get_by_shiftsales(from,to)
# shift_sales = ShiftSale.select('shift_sales.id, cs.name as cashier_station_name, shift_sales.shift_started_at as opening_date, shift_sales.shift_closeed_at as closing_date')
# .joins(" INNER JOIN cashier_terminals cs ON cs.id = shift_sales.cashier_terminal_id")
# .where("shift_sales.employee_id = ? and (shift_sales.shift_started_at between ? and ? OR shift_sales.shift_closeed_at between ? and ? )", employee, from, to, from, to)
# .order("shift_sales.id DESC")
# sale_arr = Array.new
# shift_sales.each do |shift|
# all_total= Sale.select("grand_total,sr.payment_method, sr.payment_amount, rounding_adjustment")
# .joins("join employees e on sales.cashier_id = e.id join shift_sales sh on sh.id = sales.shift_sale_id")
# .joins("INNER JOIN (select * from sale_payments group by sale_payments.sale_id, sale_payments.payment_method) sr ON sr.sale_id = sales.sale_id")
# .where("sales.shift_sale_id =? and sales.sale_status = 'completed' and sales.total_amount != 0",shift.id)
# void = Sale.select("SUM(sales.grand_total) AS grand_total")
# .joins("join shift_sales sh on sh.id = sales.shift_sale_id")
# .where('sales.sale_status = "void" and sales.total_amount != 0 and sales.shift_sale_id = ?', shift.id)
# .sum(:grand_total)
# cash = all_total.select('sr.payment_method')
# .where('sr.payment_method = "cash"')
# .sum(:amount)
# credit = all_total.where('sr.payment_method = "creditnote"')
# .sum(:amount)
# accept_credit = all_total.select('ci.amout')
# .joins("INNER JOIN credit_items ci ON ci.sale_id = sales.id")
# .where('sr.payment_method = "creditnote"')
# .sum(:amout)
# foc = all_total.where('sales.payment_method = "foc" and sales.sale_status = "completed"')
# .sum(:grand_total)
# card = all_total.select('payment_method')
# .where('sr.payment_method = "card"')
# .sum(:amount).to_f
# rounding_adj = all_total.sum(:rounding_adjustment)
# discount = all_total.sum(:discount_amount)
# void = void.nil? ? 0 : void
# cash = cash.nil? ? 0 : cash
# credit = credit.nil? ? 0 : credit
# foc = foc.nil? ? 0 : foc
# card = card.nil? ? 0 : card
# accept_credit = accept_credit.nil? ? 0 : accept_credit
# # all_payments = void.to_d + cash.to_d + credit.to_d + foc.to_d + card.to_d + accept_credit.to_d
# all_payments = cash.to_d + credit.to_d + foc.to_d + card.to_d + accept_credit.to_d
# payments = { void_amount: void, cash_amount: cash, credit_amount: credit,accept_credit_amount: accept_credit, foc_amount: foc, card_amount: card, grand_total: all_payments , cashier_station_name: shift.cashier_station_name, opening_date: shift.opening_date, closing_date: shift.closing_date, rounding_adj: rounding_adj }
# sale_arr.push(payments)
# end
# return sale_arr
# end
# def self.get_receipt_no_list(from,to)
# sale = Sale.where("sale_status=? and receipt_date between ? and ?","completed",from,to)
# end
def self.get_by_shift_sale(from,to,status)
query = ShiftSale.select("shift_sales.id ,shift_started_at AS opening_date,shift_closed_at As closing_date," +
" grand_total AS grand_total, cash_sales AS cash," +
@@ -604,7 +538,7 @@ def self.get_item_query()
end
def self.get_by_shift_items(shift_sale_range, shift, from, to, status, report_type)
def self.get_by_shift_items(shift_sale_range, shift, from, to, status)
# date_type_selection = get_sql_function_for_report_type(report_type)
@@ -616,11 +550,12 @@ def self.get_item_query()
total_foc_amount = 0
total_grand_total = 0
if shift == '[]'
if shift.blank?
### => get all sales range in shift_sales
query = query.where("sales.shift_sale_id IN (?) and sale_status='completed'",shift_sale_range.to_a)
discount_query = Sale.where("sales.shift_sale_id IN (?) and sale_status ='completed'", shift_sale_range.to_a).sum(:total_discount)
sale_cash = Sale.select("SUM(case when (sale_payments.payment_method = 'mpu' or sale_payments.payment_method = 'visa' or sale_payments.payment_method = 'master' or sale_payments.payment_method = 'jcb' or sale_payments.payment_method = 'paypar') then (sale_ - sales.amount_changed) else 0 end) as card_amount,
change_amount = Sale.where("sales.shift_sale_id IN (?) and sale_status ='completed'", shift_sale_range.to_a).sum(:amount_changed)
sale_cash = Sale.select("SUM(case when (sale_payments.payment_method = 'mpu' or sale_payments.payment_method = 'visa' or sale_payments.payment_method = 'master' or sale_payments.payment_method = 'jcb' or sale_payments.payment_method = 'paypar') then (sale_payments.payment_amount) else 0 end) as card_amount,
SUM(case when (sale_payments.payment_method='cash') then (sale_payments.payment_amount) else 0 end) as cash_amount,
SUM(case when (sale_payments.payment_method='creditnote') then (sale_payments.payment_amount) else 0 end) as credit_amount,
SUM(case when (sale_payments.payment_method='foc') then (sale_payments.payment_amount) else 0 end) as foc_amount")
@@ -633,11 +568,11 @@ def self.get_item_query()
total_foc_amount += s_c.foc_amount.to_f
end
total_grand_total = total_cash_amount.to_f + total_card_amount.to_f + total_credit_amount.to_f
elsif shift_sale_range == '[]'
else
query = query.where("sales.shift_sale_id IN (?) and sale_status='completed'",shift.to_a)
discount_query = Sale.where("sales.shift_sale_id in (?) and sale_status= 'completed' ", shift.to_a).sum(:total_discount)
sale_cash = Sale.select("SUM(case when (sale_payments.payment_method = 'mpu' or sale_payments.payment_method = 'visa' or sale_payments.payment_method = 'master' or sale_payments.payment_method = 'jcb' or sale_payments.payment_method = 'paypar') then (sale_payments.payment_amount) else 0 end) as card_amount,
change_amount = Sale.where("sales.shift_sale_id in (?) and sale_status= 'completed' ", shift.to_a).sum(:amount_changed)
sale_cash = Sale.select("SUM(case when (sale_payments.payment_method ='mpu' or sale_payments.payment_method = 'visa' or sale_payments.payment_method = 'master' or sale_payments.payment_method = 'jcb' or sale_payments.payment_method = 'paypar') then (sale_payments.payment_amount) else 0 end) as card_amount,
SUM(case when (sale_payments.payment_method='cash') then (sale_payments.payment_amount) else 0 end) as cash_amount,
SUM(case when (sale_payments.payment_method='creditnote') then (sale_payments.payment_amount) else 0 end) as credit_amount,
SUM(case when (sale_payments.payment_method='foc') then (sale_payments.payment_amount) else 0 end) as foc_amount")
@@ -649,31 +584,39 @@ def self.get_item_query()
total_credit_amount += s_c.credit_amount.to_f
total_foc_amount += s_c.foc_amount.to_f
end
total_grand_total = total_cash_amount.to_f + total_card_amount.to_f + total_credit_amount.to_f
else
query = query.where("receipt_date between ? and ? and sale_status=?",from,to,'completed')
sale_cash = Sale.select("sales.total_discount as total_discount,
SUM(case when (sale_payments.payment_method = 'mpu' or sale_payments.payment_method = 'visa' or sale_payments.payment_method = 'master' or sale_payments.payment_method = 'jcb' or sale_payments.payment_method = 'paypar') then (sale_payments.payment_amount) else 0 end) as card_amount,
SUM(case when (sale_payments.payment_method='cash') then (sale_payments.payment_amount) else 0 end) as cash_amount,
SUM(case when (sale_payments.payment_method='creditnote') then (sale_payments.payment_amount) else 0 end) as credit_amount,
SUM(case when (sale_payments.payment_method='foc') then (sale_payments.payment_amount) else 0 end) as foc_amount")
.joins("join sale_payments on sale_payments.sale_id = sales.sale_id")
.where("sales.shift_sale_id in (?) and sale_status = 'completed' ", shift.to_a)
sale_cash.each do |s_c|
total_cash_amount += s_c.cash_amount.to_f
total_card_amount += s_c.card_amount.to_f
total_credit_amount += s_c.credit_amount.to_f
total_foc_amount += s_c.foc_amount.to_f
discount_query = s_c.total_discount.to_f
end
total_grand_total = total_cash_amount.to_f + total_card_amount.to_f + total_credit_amount.to_f
total_grand_total = total_cash_amount.to_f + total_card_amount.to_f + total_credit_amount.to_f
end
return query, discount_query , total_cash_amount , total_card_amount , total_credit_amount , total_foc_amount , total_grand_total
end
return query, discount_query , total_cash_amount , total_card_amount , total_credit_amount , total_foc_amount , total_grand_total , change_amount
end
def self.get_shift_sales_by_receipt_no(shift_sale_range,shift,from,to,payment_type)
## => left join -> show all sales although no orders
if payment_type.blank?
payment_type = ''
else
if payment_type == 'card'
payment_type = " and sale_payments.payment_method = 'mpu' or sale_payments.payment_method = 'visa' or sale_payments.payment_method = 'master' or sale_payments.payment_method = 'jcb' or sale_payments.payment_method = 'paypar'"
else
payment_type = " and sale_payments.payment_method = '#{payment_type}'"
end
end
puts payment_type
query = Sale.all
if shift.present?
query = query.where("sales.shift_sale_id in (?) #{payment_type} and sale_status= 'completed' and sale_payments.payment_amount != 0", shift.to_a)
.joins("join sale_payments on sale_payments.sale_id = sales.sale_id")
.group("sales.sale_id")
else
query = query .where("sale_status='completed' #{payment_type} and sale_payments.payment_amount != 0 and sales.shift_sale_id in (?)",shift_sale_range.to_a)
.joins("join sale_payments on sale_payments.sale_id = sales.sale_id")
.group("sales.sale_id")
end
end
def self.get_separate_tax(from,to,payment_method=nil)
@@ -692,7 +635,7 @@ end
cash = 0.0
self.sale_payments.each do |pay|
if pay.payment_method == 'cash'
cash = pay.payment_amount
cash = pay.payment_amount-self.amount_changed
end
end
return cash

View File

@@ -261,20 +261,25 @@ class SalePayment < ApplicationRecord
end
self.sale.sale_status = "completed"
response = rebat(sObj)
if MembershipSetting.find(1).rebate
response = rebat(sObj)
if response["status"] == true
self.sale.rebate_status = 'true'
end
if response["status"] == false
self.sale.rebate_status = 'false'
end
if !response.nil?
if response["status"] == true
self.sale.rebate_status = 'true'
end
if response["status"] == false
self.sale.rebate_status = 'false'
end
if response[:status] == false
self.sale.rebate_status = 'false'
end
if response[:status] == "no_member"
self.sale.rebate_status = nil
if response[:status] == false
self.sale.rebate_status = 'false'
end
if response[:status] == "no_member"
self.sale.rebate_status = nil
end
end
puts "rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr"
end
self.sale.save!

View File

@@ -60,8 +60,15 @@ class SeedGenerator < ApplicationRecord
seed.save
end
padding_len = 5 - prefix.length
next_code = prefix + seed.current.to_s.to_s.rjust((4-prefix.length)+1,'0')
if prefix.length == 1
padding_len = 5 - prefix.length
count = 4-prefix.length
else prefix.length == 2
padding_len = 6 - prefix.length
count = 5-prefix.length
end
next_code = prefix + seed.current.to_s.to_s.rjust((count)+1,'0')
return next_code
end
end

View File

@@ -46,11 +46,11 @@
</div>
<div class="form-group">
<%= f.input :nrc_no, :class => "form-control nrc_no" %>
<%= f.input :nrc_no,:label => "NRC No", :class => "form-control nrc_no" %>
</div>
<div class="form-group">
<%= f.input :company, :class => "form-control col-md-6 company",:required => true%>
<%= f.input :company, :class => "form-control col-md-6 company"%>
<% flash.each do |name, msg| %>
<% str="[\"#{msg['company']}\"]"

View File

@@ -64,18 +64,11 @@
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th colspan="5">Membership Transactions</th>
<th>Current Balance : <%= @balance%></th>
</tr>
<tr>
<th>Date</th>
<th>Redeem</th>
<th>Rebate</th>
<th>Balance</th>
<!-- <th>Redeem</th> -->
<th>Discount Amount</th>
<!-- <th>Balance</th> -->
<th>From Account</th>
<th>Status</th>
<th>Receipt No</th>
@@ -86,9 +79,9 @@
<% @response["data"].each do |transaction| %>
<tr>
<td><%= transaction["date"]%></td>
<td><%= transaction["redeem"]%></td>
<!-- <td><%= transaction["redeem"]%></td> -->
<td><%= transaction["rebate"] %></td>
<td><%= transaction["balance"] %></td>
<!-- <td><%= transaction["balance"] %></td> -->
<td><%= transaction["account_status"] %></td>
<td><%= transaction["status"] %></td>
<td><%= transaction["receipt_no"] %></td>

View File

@@ -121,10 +121,10 @@
</div>
<div class="form-group">
<%= f.input :nrc_no, :class => "form-control nrc_no" %>
<%= f.input :nrc_no, :label => "NRC No",:class => "form-control nrc_no" %>
</div>
<div class="form-group">
<%= f.input :company, :class => "form-control col-md-6 company",:required => true%>
<%= f.input :company, :class => "form-control col-md-6 company"%>
<% flash.each do |name, msg| %>
<% str="[\"#{msg['company']}\"]"

View File

@@ -67,7 +67,12 @@
<td class="item-attr"><strong id="order-beverage"></strong></td>
</tr> -->
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<%if @sale_data.discount_type == 'member_discount'%>
<td class="charges-name"><strong>Member Discount:</strong></td>
<%else%>
<td class="charges-name"><strong>Discount:</strong></td>
<%end%>
<td class="item-attr">(<strong id="order-discount"><%=@sale_data.total_discount rescue 0%></strong>)</td>
</tr>
<tr class="hidden">
@@ -190,9 +195,11 @@
<button id="remove-item-discount" class="btn btn-warning btn-block action-btn">RemoveItem Discount</button>
<button id="remove-all" class="btn btn-warning btn-block action-btn">Remove All</button>
<button id="pay-discount" class="btn btn-danger btn-block action-btn">Enter</button>
<hr />
<button id="member-discount" class="btn btn-success btn-block action-btn
<%= @sale_data.customer.membership_id ? " " : "disabled"%>">Member Discount</button>
<% if @member_discount%>
<hr />
<button id="member-discount" class="btn btn-success btn-block action-btn
<%= @sale_data.customer.membership_id ? " " : "disabled"%>">Member Discount</button>
<%end %>
</div>
</div>
</div>
@@ -502,19 +509,18 @@ $(document).ready(function(){
data: params,
success:function(result){
if (result.url_status == false) {
status = result.url_message
if (result.status == "Success") {
type = 'green'
btn_color = 'btn-green'
}else{
type = 'red'
btn_color = 'btn-red'
}else{
status = result.status
type = ''
btn_color = 'btn-green'
}
$.confirm({
title: 'Infomation!',
content: status,
title: result.title,
content: result.status,
columnClass: 'small',
type: type,
buttons: {
@@ -536,18 +542,14 @@ $(document).ready(function(){
}
});
}else{
$.confirm({
title: 'Alert !',
content: 'Please Select Account',
type: 'red',
$.alert({
title: 'Alert!',
content: 'Please Select Account',
type: 'red',
typeAnimated: true,
buttons: {
confirm: {
text: 'Ok',
btnClass: 'btn-danger',
}
}
});
btnClass: 'btn-danger',
});
}
});//end member discount

View File

@@ -220,7 +220,11 @@
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<%if @obj_sale != nil && @obj_sale.discount_type == 'member_discount'%>
<td class="charges-name"><strong>Member Discount:</strong></td>
<%else%>
<td class="charges-name"><strong>Discount:</strong></td>
<%end%>
<td class="item-attr"><strong id="order-discount">(<%= @obj_sale.total_discount rescue 0%>)</strong></td>
</tr>

View File

@@ -15,13 +15,13 @@
</ul>
<!-- Nav tabs - End -->
<div class="tab-content" style="max-height:670px; overflow:auto">
<div class="tab-content" style="max-height:570px; overflow:auto">
<!--- Panel 0 - Completed Orders -->
<!--- Panel 1 - Table Orders -->
<div class="tab-pane " id="tables" role="tabpanel">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;min-height:500px; max-height:500px; overflow-x:scroll">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
<div class="card tables red text-white" data-id="<%= table.id %>" data-name="<%= table.name %>">
@@ -42,7 +42,7 @@
<!--- Panel 2 - Room Orders -->
<div class="tab-pane active" id="rooms" role="tabpanel">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;min-height:500px; max-height:500px; overflow-x:scroll" >
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;" >
<% @rooms.each do |room| %>
<% if room.status == 'occupied' %>
<div class="card rooms red text-white" data-id="<%= room.id %>" data-name="<%= room.name %>">
@@ -95,7 +95,7 @@
</div>
</div>
<div class="card-text" style="min-height:500px; max-height:500px; overflow-x:scroll" >
<div class="card-text" style="min-height:500px; max-height:500px; overflow:auto" >
<table class="table table-striped" id="order-items-table">
<thead>
<tr>

View File

@@ -15,13 +15,13 @@
</ul>
<!-- Nav tabs - End -->
<div class="tab-content" style="max-height:670px; overflow:auto">
<div class="tab-content" style="max-height:570px; overflow:auto">
<!--- Panel 0 - Completed Orders -->
<!--- Panel 1 - Table Orders -->
<div class="tab-pane active" id="tables" role="tabpanel">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;min-height:500px; max-height:500px; overflow-x:scroll" >
<div class="card-columns" style="padding-top:10px;" >
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
<div class="card tables red text-white" data-id="<%= table.id %>" data-name="<%= table.name %>">
@@ -42,7 +42,7 @@
<!--- Panel 2 - Room Orders -->
<div class="tab-pane" id="rooms" role="tabpanel">
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;min-height:500px; max-height:500px; overflow-x:scroll" >
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;" >
<% @rooms.each do |room| %>
<% if room.status == 'occupied' %>
<div class="card rooms red text-white" data-id="<%= room.id %>" data-name="<%= room.name %>">
@@ -95,7 +95,7 @@
</div>
</div>
<div class="card-text" style="min-height:500px; max-height:500px; overflow-x:scroll" >
<div class="card-text" style="min-height:500px; max-height:500px; overflow:auto" >
<table class="table table-striped" id="order-items-table">
<thead>
<tr>

View File

@@ -175,7 +175,9 @@
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<td class="charges-name"><strong>Discount:</strong></td>
<td class="item-attr"><strong id="order-discount">(<%=@selected_item.total_discount rescue 0%>)</strong></td>
</tr>
<tr class="rebate_amount"></tr>

View File

@@ -59,7 +59,11 @@
<td class="item-attr"><strong id="order-sub-total"><%=sub_total%></strong></td>
</tr>
<tr>
<%if @sale_data.discount_type == 'member_discount'%>
<td class="charges-name"><strong>Member Discount:</strong></td>
<%else%>
<td class="charges-name"><strong>Discount:</strong></td>
<%end%>
<td class="item-attr">(<strong id="order-discount"><%=@sale_data.total_discount rescue 0%></strong>)</td>
</tr>
<tr class="hidden">

View File

@@ -1,4 +1,6 @@
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-3">
<div class="card" >
@@ -68,7 +70,12 @@
<td style="width:20%; text-align:right; border-top:none"><strong><span id="sub-total"><%=sub_total%></span></strong></td>
</tr>
<tr>
<td style="width:80%; text-align:left; border-top:none"><strong>(Discount)</strong></td>
<%if @sale_data.discount_type == 'member_discount'%>
<td style="width:80%; text-align:left; border-top:none"><strong>Member Discount:</strong></td>
<%else%>
<td style="width:80%; text-align:left; border-top:none"><strong>(Discount)</strong></td>
<%end%>
<td style="width:20%; text-align:right; border-top:none"><strong><span>(<%=@sale_data.total_discount rescue 0%>)</span></strong></td>
</tr>
<tr>
@@ -99,6 +106,7 @@
</div>
</div>
</div>
<div class="col-lg-5 col-md-5 col-sm-3">
<div class="row" style="margin-top:10px;">
<div class="col-md-8"><strong style="font-size:18px;">Amount Due</strong></div>
@@ -253,6 +261,8 @@
<button type="button" class="btn btn-primary btn-block"> FOC </button>
<button type="button" class="btn btn-primary btn-block" id="void"> Void </button>
</div>
</div>
<script>
@@ -339,15 +349,19 @@ $( document ).ready(function() {
$('#pay').click(function() {
$('#pay').text("Processing, Please wait!")
$( "#loading_wrapper" ).show();
if($('#balance').text() > 0){
alert(" Insufficient Amount!")
$( "#loading_wrapper" ).hide();
}else{
// payment
var cash = $('#cash').text();
var credit = $('#credit').text();
var card = $('#card').text();
var sale_id = $('#sale_id').text();
$.ajax({type: "POST",
url: "<%= origami_payment_cash_path %>",
data: "cash="+ cash + "&sale_id=" + sale_id,
@@ -359,7 +373,7 @@ $( document ).ready(function() {
else{
var msg = '';
}
$( "#loading_wrapper" ).hide();
if($('#balance').text() < 0){
$.confirm({
title: 'Infomation!',
@@ -429,4 +443,4 @@ function update_balance(){
$('#balance').text(result.toFixed(2));
}
</script>
</script>

View File

@@ -40,7 +40,11 @@
<td class="item-attr"><strong id="order-sub-total"></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<%if @sale.discount_type == 'member_discount'%>
<td class="charges-name"><strong>Member Discount:</strong></td>
<%else%>
<td class="charges-name"><strong>Discount:</strong></td>
<%end%>
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
</tr>
<tr>

View File

@@ -106,7 +106,11 @@
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<%if @sale.discount_type == 'member_discount'%>
<td class="charges-name"><strong>Member Discount:</strong></td>
<%else%>
<td class="charges-name"><strong>Discount:</strong></td>
<%end%>
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
</tr>
<tr>

View File

@@ -203,7 +203,11 @@
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<%if @obj != nil && @status_sale == 'sale' && @obj.discount_type == 'member_discount'%>
<td class="charges-name"><strong>Member Discount:</strong></td>
<%else%>
<td class="charges-name"><strong>Discount:</strong></td>
<%end%>
<td class="item-attr"><strong id="order-discount">(<%=@obj.total_discount rescue 0%>)</strong></td>
</tr>
<% if @status == "sale" %>

View File

@@ -164,7 +164,11 @@
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<%if @sale.discount_type == 'member_discount'%>
<td class="charges-name"><strong>Member Discount:</strong></td>
<%else%>
<td class="charges-name"><strong>Discount:</strong></td>
<%end%>
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
</tr>
<tr>

View File

@@ -110,7 +110,7 @@ $(document).on('focusout', '.float-value', function(event){
$('#open_cashier').on('click',function(){
var cashier_terminal = $('#cashier_terminal').val();
var amount = $('#total').text();
var amount = $('#total').text()||0;
$.ajax({type: "POST",
url: "<%= origami_shifts_path %>",
data: "opening_balance=" + amount + "&cashier_terminal="+ cashier_terminal,

View File

@@ -40,7 +40,11 @@
<td class="item-attr"><strong id="order-sub-total"></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<%if @sale.discount_type == 'member_discount'%>
<td class="charges-name"><strong>Member Discount:</strong></td>
<%else%>
<td class="charges-name"><strong>Discount:</strong></td>
<%end%>
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
</tr>
<tr>

View File

@@ -106,7 +106,11 @@
<td class="item-attr"><strong id="order-sub-total"><%= sub_total %></strong></td>
</tr>
<tr>
<td class="charges-name"><strong>Discount:</strong></td>
<%if @sale.discount_type == 'member_discount'%>
<td class="charges-name"><strong>Member Discount:</strong></td>
<%else%>
<td class="charges-name"><strong>Discount:</strong></td>
<%end%>
<td class="item-attr"><strong id="order-discount">(<%= @sale.total_discount rescue 0%>)</strong></td>
</tr>
<tr>

View File

@@ -0,0 +1,177 @@
<div class="row">
<div class="col-md-12">
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
<% if period_type != false %>
<div class="row">
<div class="form-group col-md-2">
<label>Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="">Select Period</option>
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
<option value="3">Last week</option>
<option value="4">Last 7 days</option>
<option value="5">This month</option>
<option value="6">Last month</option>
<option value="7">Last 30 days</option>
<option value="8">This year</option>
<option value="9">Last year</option>
</select>
</div>
<!-- <input type="hidden" name="report_type" value="shift_item" id="sel_receipt_no"> -->
<div class="form-group col-md-2">
<label>Select Type</label>
<select name="sale_type" id="sel_sale_type" class="form-control">
<option value="0">All Sale Type</option>
<option value="1">Revenue Only</option>
<option value="2">Discount Only</option>
<option value="3">Void Only</option>
<option value="4">Taxes Only</option>
<option value="5">Other Amount Only</option>
</select>
</div>
<div class="form-group col-md-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="">From</label>
<input data-behaviour='datepicker' class="form-control" name="from" id="from" type="text" placeholder="From date">
</div>
<div class="form-group col-md-2">
<label class="">To</label>
<input data-behaviour='datepicker' class="form-control" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="form-group col-md-2">
<label class="">All Shift</label>
<select name="shift_name" id="shift_name" class="form-control"></select>
</div>
<div class="form-group col-md-1 margin-top-20">
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div>
<% end %>
<div class="row">
<div class="form-group">
<% if defined? promotions %>
<%= select_tag "promotion", options_for_select(@promotions, :selected => params[:promotion_type]), :class => "form-control" %>
<% end %>
<% if defined? menu_types %>
<%= select_tag "menu_type", options_for_select(@menu_types, :selected => params[:menu_type]), :class => "form-control" %>
<% end %>
<% if defined? payments %>
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
<% end %>
<% if defined? cashiers %>
<%= select_tag "cashier", options_from_collection_for_select(@cashiers,"id","name"),:prompt => "All Cashier Stations", :class => "form-control" %>
<% end %>
<% if defined? singer %>
<%= select_tag "singer", options_from_collection_for_select(singer,"id","name"),:prompt => "All Vocal List", :class => "form-control" %>
<% end %>
<% if defined? bsm %>
<%= select_tag "singer", options_from_collection_for_select(bsm,"id","name"),:prompt => "All BSM List", :class => "form-control" %>
<% end %>
<% if defined? guest_role %>
<%= select_tag "guest_role", options_from_collection_for_select(@guest_role,"id","name"),:prompt => "Vocal/BSM List", :class => "form-control" %>
<% end %>
<% if defined? list_by_payment_type %> <!-- for report detail by credit and foc -->
<%= select_tag "payment_type_list", options_for_select(@payment_list, :selected => params[:payment_type_list]), :class => "form-control" %>
<% end %>
<% if defined? products %>
<%= select_tag "product", options_from_collection_for_select(@products,"id","name"),:prompt => "All Products", :class => "form-control" %>
<% end %>
<% if defined? items %>
<%= select_tag "item", options_for_select(@items, :selected => params[:item_type]), :class => "form-control" %>
<% end %>
</div>
</div>
<!-- <div class="row">
<div class="col-md-12">
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div> -->
<% end %>
</div>
</div>
<script type="text/javascript">
$(function(){
$('#custom_excel').hide();
$('#custom_excel').click(function(){
var url = $('#custom_excel').attr('data-url');
$('#frm_report').attr('action',url)
$('#frm_report').submit();
// window.location = url;
});
var item = $('#item').val();
var payment_type = $('#payment_type');
if(item == 'order'){
$('#cashier').hide();
$('#waiter').show();
if(payment_type){
$('#payment_type').hide();
}
}
else if(item == 'sale'){
$('#waiter').hide();
$('#cashier').show();
}
else{
$('#waiter').hide();
$('#cashier').show();
$("#item").val('sale');
}
});
// $("#from").val("<%=params[:from] rescue '-'%>");
// $("#to").val("<%=params[:to] rescue '-'%>");
// $("#sel_period").val(<%=params[:period] rescue '-'%>);
// $("#sel_sale_type").val(<%=params[:sale_type] rescue '-'%>);
<% if params[:period_type] == 1 || params[:period_type] == "1" %>
$("#rd_period_type_1").attr("checked","checked");
<% else %>
$("#rd_period_type_0").attr("checked","checked");
<% end %>
$(".btn-group button").removeClass("active");
<% report_type = params[:report_type].blank? ? "0" : params[:report_type] %>
$("#btn_report_type_<%= report_type %>").addClass("active");
$('#item').change(function(){
var item = $('#item').val();
var payment_type = $('#payment_type');
if(item == 'sale'){
$('#waiter').hide();
$('#cashier').show();
if(payment_type){
$('#payment_type').show();
}
}
else{
$('#cashier').hide();
$('#waiter').show();
if(payment_type){
$('#payment_type').hide();
}
}
});
</script>

View File

@@ -35,7 +35,7 @@
<th style='text-align:center;'>Master Sales</th>
<th style='text-align:center;'>Visa Sales</th>
<th style='text-align:center;'>Jcb Sales</th>
<th style='text-align:center;'>Paypar Sales</th>
<th style='text-align:center;'>Redeem Sales</th>
<th style='text-align:center;'>Cash Sales</th>
<th style='text-align:center;'>Credit Sales</th>
<th style='text-align:center;'>FOC Sales</th>
@@ -59,7 +59,8 @@
<% foc = 0 %>
<% discount = 0 %>
<% total = 0 %>
<% grand_total = 0 %>
<% grand_total = 0 %>
<% old_grand_total = 0 %>
<% count = 1 %> <% rounding_adj = 0 %>
<% @sale_data.each do |sale| %>
<% void += sale[:void_amount] %>
@@ -74,6 +75,7 @@
<% discount += sale[:total_discount] %>
<% total += sale[:old_grand_total].to_f + sale[:rounding_adj].to_f %>
<% grand_total += sale[:grand_total].to_f %>
<% old_grand_total += sale[:old_grand_total].to_f %>
<% rounding_adj += sale[:rounding_adj].to_f %>
<tr>
<td style='text-align:right;'><%= count %></td>
@@ -90,25 +92,25 @@
<td style='text-align:right;'>(<%= number_with_delimiter(sprintf("%.2f",sale[:total_discount]), :delimiter => ',') rescue '-'%>)</td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:old_grand_total].to_f + sale[:rounding_adj].to_f ), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:rounding_adj].to_f), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:grand_total]), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:old_grand_total]), :delimiter => ',') rescue '-'%></td>
</tr>
<% count = count + 1 %>
<% end %>
<tr style="font-weight:600;">
<td colspan="3" style='text-align:center;'>Total</td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",mpu_amount), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",master_amount), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",visa_amount), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",jcb_amount), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",paypar_amount), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",mpu), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",master), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",visa), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",jcb), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",paypar), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",cash), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",credit), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",foc), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'>(<%= number_with_delimiter(sprintf("%.2f",discount), :delimiter => ',') rescue '-'%>)</td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",total), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",rounding_adj), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",grand_total), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",old_grand_total), :delimiter => ',') rescue '-'%></td>
</tr>
<% total_tax = 0 %>
@@ -135,54 +137,3 @@
</div>
</div>
</div>
<script>
$(function(){
var check_arr = [];
var search = '<%= params[:period_type] %>';
if(search){
if(parseInt(search) == 0){
search_by_period();
}
else{
search_by_date();
}
}else{
search_by_period();
}
$('#sel_period').change(function(){
search_by_period();
});
function search_by_period(){
var period = $('#sel_period').val();
var period_type = 0;
var from = "";
var to = "";
}
$('#from').change(function(){
search_by_date();
});
$('#to').change(function(){
search_by_date();
});
function search_by_date(){
var from = $('#from').val();
var to = $('#to').val();
var period = 0;
var period_type = 1;
if(to != '' && from != ''){
shift_name = from + ',' + to;
check_arr.push(to);
// console.log(check_arr.length)
if(check_arr.length == 1){
}
if(check_arr.length == 3){
check_arr = [];
}
}
}
});
</script>

View File

@@ -1,12 +1,11 @@
<div class="card row">
<div class="container margin-top-20">
<div class="card row">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<% if params[:from]%>
<tr>
<th colspan="17"> Sale (<%= params[:from] rescue '-' %> - <%= params[:to] rescue '-'%>)</th>
<th colspan="17"> Sale (<%= from rescue '-' %> - <%= to rescue '-'%>)</th>
</tr>
<% end %>
<tr>
<th style='text-align:center;'>Sr.no</th>
<th style='text-align:center;'>Date</th>
@@ -15,7 +14,7 @@
<th style='text-align:center;'>Master Sales</th>
<th style='text-align:center;'>Visa Sales</th>
<th style='text-align:center;'>Jcb Sales</th>
<th style='text-align:center;'>Paypar Sales</th>
<th style='text-align:center;'>Redeem Sales</th>
<th style='text-align:center;'>Cash Sales</th>
<th style='text-align:center;'>Credit Sales</th>
<th style='text-align:center;'>FOC Sales</th>
@@ -39,7 +38,8 @@
<% foc = 0 %>
<% discount = 0 %>
<% total = 0 %>
<% grand_total = 0 %>
<% grand_total = 0 %>
<% old_grand_total = 0 %>
<% count = 1 %> <% rounding_adj = 0 %>
<% @sale_data.each do |sale| %>
<% void += sale[:void_amount] %>
@@ -48,12 +48,13 @@
<% visa += sale[:visa_amount] %>
<% jcb += sale[:jcb_amount] %>
<% paypar += sale[:paypar_amount] %>
<% cash += sale[:cash_amount] %>
<% cash += sale[:cash_amount]-sale[:total_change_amount] %>
<% credit += sale[:credit_amount] %>
<% foc += sale[:foc_amount] %>
<% discount += sale[:total_discount] %>
<% total += sale[:grand_total].to_f + sale[:rounding_adj].to_f %>
<% total += sale[:old_grand_total].to_f + sale[:rounding_adj].to_f %>
<% grand_total += sale[:grand_total].to_f %>
<% old_grand_total += sale[:old_grand_total].to_f %>
<% rounding_adj += sale[:rounding_adj].to_f %>
<tr>
<td style='text-align:right;'><%= count %></td>
@@ -64,31 +65,31 @@
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:visa_amount]), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:jcb_amount]), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:paypar_amount]), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:cash_amount]), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:cash_amount]-sale[:total_change_amount]), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:credit_amount]), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:foc_amount]), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'>(<%= number_with_delimiter(sprintf("%.2f",sale[:total_discount]), :delimiter => ',') rescue '-'%>)</td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:grand_total].to_f + sale[:rounding_adj].to_f ), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:old_grand_total].to_f + sale[:rounding_adj].to_f ), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:rounding_adj].to_f), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:grand_total]), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",sale[:old_grand_total]), :delimiter => ',') rescue '-'%></td>
</tr>
<% count = count + 1 %>
<% end %>
<tr style="font-weight:600;">
<td colspan="3" style='text-align:center;'>Total</td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",mpu_amount), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",master_amount), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",visa_amount), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",jcb_amount), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",paypar_amount), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",mpu), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",master), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",visa), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",jcb), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",paypar), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",cash), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",credit), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",foc), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'>(<%= number_with_delimiter(sprintf("%.2f",discount), :delimiter => ',') rescue '-'%>)</td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",total), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",rounding_adj), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",grand_total), :delimiter => ',') rescue '-'%></td>
<td style='text-align:right;'><%= number_with_delimiter(sprintf("%.2f",old_grand_total), :delimiter => ',') rescue '-'%></td>
</tr>
<% total_tax = 0 %>
@@ -113,4 +114,5 @@
<% end %>
</table>
</div>
</div>
</div>
</div>

View File

@@ -6,6 +6,7 @@
<div class="form-group col-md-2">
<label>Select Period</label>
<select name="period" id="sel_period" class="form-control">
<option value="">Select Period</option>
<option value="0">Today</option>
<option value="1">Yesterday</option>
<option value="2">This week</option>
@@ -18,18 +19,12 @@
<option value="9">Last year</option>
</select>
</div>
<input type="hidden" name="report_type" value="shift_item" id="sel_receipt_no">
<% if defined? payments %>
<div class="form-group col-md-2">
<label>Select Type</label>
<select name="sale_type" id="sel_sale_type" class="form-control">
<option value="0">All Sale Type</option>
<option value="1">Revenue Only</option>
<option value="2">Discount Only</option>
<option value="3">Void Only</option>
<option value="4">Taxes Only</option>
<option value="5">Other Amount Only</option>
</select>
<label>Select Payments</label>
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
</div>
<% end %>
<div class="form-group col-md-2">
<!-- <label class="">Select Shift Period</label> -->
<label class="">From</label>
@@ -41,7 +36,8 @@
</div>
<div class="form-group col-md-2">
<label class="">All Shift</label>
<select name="shift_name" id="shift_name" class="form-control"></select>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="form-group col-md-1 margin-top-20">
<input type="submit" value="Generate Report" class='btn btn-primary'>
@@ -49,70 +45,6 @@
</div>
<% end %>
<!-- <div class="row">
<% if defined? show_monthly %>
<div class="span3" style="margin-bottom:10px;">
<input type="hidden" id="report_type" name="report_type" value="0">
<div class="btn-group" data-toggle="buttons-radio">
<button id="btn_report_type_1" onclick="$('#report_type').val(1)" type="button" class="btn btn-inverse">Monthly</button>
<button id="btn_report_type_2" onclick="$('#report_type').val(2)" type="button" class="btn btn-inverse">Yearly</button>
</div>
</div>
<% end %>
</div> -->
<div class="row">
<div class="form-group">
<% if defined? promotions %>
<%= select_tag "promotion", options_for_select(@promotions, :selected => params[:promotion_type]), :class => "form-control" %>
<% end %>
<% if defined? menu_types %>
<%= select_tag "menu_type", options_for_select(@menu_types, :selected => params[:menu_type]), :class => "form-control" %>
<% end %>
<% if defined? payments %>
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
<% end %>
<% if defined? cashiers %>
<%= select_tag "cashier", options_from_collection_for_select(@cashiers,"id","name"),:prompt => "All Cashier Stations", :class => "form-control" %>
<% end %>
<% if defined? singer %>
<%= select_tag "singer", options_from_collection_for_select(singer,"id","name"),:prompt => "All Vocal List", :class => "form-control" %>
<% end %>
<% if defined? bsm %>
<%= select_tag "singer", options_from_collection_for_select(bsm,"id","name"),:prompt => "All BSM List", :class => "form-control" %>
<% end %>
<% if defined? guest_role %>
<%= select_tag "guest_role", options_from_collection_for_select(@guest_role,"id","name"),:prompt => "Vocal/BSM List", :class => "form-control" %>
<% end %>
<% if defined? list_by_payment_type %> <!-- for report detail by credit and foc -->
<%= select_tag "payment_type_list", options_for_select(@payment_list, :selected => params[:payment_type_list]), :class => "form-control" %>
<% end %>
<% if defined? products %>
<%= select_tag "product", options_from_collection_for_select(@products,"id","name"),:prompt => "All Products", :class => "form-control" %>
<% end %>
<% if defined? items %>
<%= select_tag "item", options_for_select(@items, :selected => params[:item_type]), :class => "form-control" %>
<% end %>
</div>
</div>
<!-- <div class="row">
<div class="col-md-12">
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div> -->
<% end %>
</div>
</div>
@@ -150,12 +82,22 @@ $(function(){
}
});
<% if params[:shift_name].to_i > 0%>
shift_id = '<%= params[:shift_name] %>'
local_date = '<%= @shift_from %> - <%= @shift_to %> '
var shift = $('#shift_name');
str = '<option value="'+ shift_id +'" '+ 'selected = "selected"' +'>' + local_date + '</option>';
shift.append(str);
<% end %>
// $("#from").val("<%=params[:from] rescue '-'%>");
// $("#to").val("<%=params[:to] rescue '-'%>");
// $("#sel_period").val(<%=params[:period] rescue '-'%>);
// $("#sel_sale_type").val(<%=params[:sale_type] rescue '-'%>);
$("#from").val("<%=params[:from] rescue '-'%>");
$("#to").val("<%=params[:to] rescue '-'%>");
$("#sel_period").val(<%=params[:period] rescue '-'%>);
$("#sel_sale_type").val(<%=params[:sale_type] rescue '-'%>);
// shift = $(".shift-id").text()
// if (shift.length>0) {
// $('.shift_name > option[value="'+shift+'"]').attr('selected','selected');
// }
<% if params[:period_type] == 1 || params[:period_type] == "1" %>
$("#rd_period_type_1").attr("checked","checked");

View File

@@ -7,35 +7,36 @@
<div class="container">
<%= render :partial=>'shift_sale_report_filter',
:locals=>{ :period_type => true, :shift_name => true, :report_path =>reports_receipt_no_index_path} %>
:locals=>{ :period_type => true, :shift_name => true,:payments => true, :report_path =>reports_receipt_no_index_path} %>
<hr />
</div>
<!-- <div class="container">
<div class="container">
<div class="row">
<div class="col-md-12 text-right">
<a href="javascript:export_to('<%=reports_receipt_no_index_path%>.xls')" class = "btn btn-default">Export to Excel</a>
</div>
</div>
</div> -->
</div>
<div class="container margin-top-20">
<div class="card row">
<table class="table table-striped" border="0">
<thead>
<% if !params[:from].blank?%>
<tr>
<th colspan="7">From Date : <%= params[:from] rescue '-' %> , To Date : <%= params[:to] rescue '-'%></th>
</tr>
<% end %>
<% if @shift_from %>
<tr>
<% if @shift.employee %>
<% cashier_name = !@shift.nil? ? @shift.employee.name : '-' %>
<% end %>
<th colspan="7">Shift Name = <%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%> ( <%= cashier_name rescue '-'%> )</th>
</tr>
<% end %>
<% if !params[:from].blank?%>
<tr>
<th colspan="7">From Date : <%= params[:from] %> , To Date : <%= params[:to] %></th>
</tr>
<% end %>
<% if @shift_from %>
<tr>
<% if @shift_data.employee %>
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
<% end %>
<th colspan="7">Shift Name = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>
<tr>
<th>Recipt No</th>
@@ -61,53 +62,54 @@
<% other_amt = 0 %>
<% total_nett = 0 %>
<% rounding_adj = 0%> <% gov_tax = 0 %> <% service_charge = 0 %>
<%if @sale_data %>
<% @sale_data.each do |result| %>
<% @sale_data.each do |result| %>
<% grand_total = grand_total.to_f + result.grand_total.to_f %>
<% old_grand_total = old_grand_total.to_f + result.old_grand_total.to_f %>
<% total_tax += result.total_tax.to_f %>
<% total_sum += result.total_amount.to_f %>
<% discount_amt += result.total_discount.to_f %>
<% rounding_adj += result.rounding_adjustment.to_f %>
<tr>
<td><%= result.receipt_no rescue '-' %> </td>
<td><%= result.cashier_name rescue '-' %></td>
<td><%= result.total_amount rescue '-' %></td>
<td><%= result.total_discount rescue '-' %></td>
<td><%= result.total_tax rescue '-' %></td>
<td><%= result.old_grand_total %></td>
<td><%= result.rounding_adjustment.to_f rescue '-' %></td>
<td><%= result.grand_total_after_rounding() rescue '-'%></td>
</tr>
<% grand_total = grand_total.to_f + result.grand_total.to_f %>
<% old_grand_total = old_grand_total.to_f + result.old_grand_total.to_f %>
<% total_tax += result.total_tax.to_f %>
<% total_sum += result.total_amount.to_f %>
<% discount_amt += result.total_discount.to_f %>
<% rounding_adj += result.rounding_adjustment.to_f %>
<tr>
<td><%= result.receipt_no rescue '-' %> </td>
<td><%= result.cashier_name rescue '-' %></td>
<td><%= result.total_amount rescue '-' %></td>
<td><%= result.total_discount rescue '-' %></td>
<td><%= result.total_tax rescue '-' %></td>
<td><%= result.grand_total %></td>
<td><%= result.rounding_adjustment.to_f rescue '-' %></td>
<td><%= result.grand_total_after_rounding() rescue '-'%></td>
</tr>
<% end %>
<tr style="border-top:4px double #666;">
<td colspan="2">&nbsp;</td>
<td><b><%= total_sum rescue '-'%></b></td>
<td><b><%= discount_amt rescue '-'%></b></td>
<td><b><%= sprintf "%.2f",total_tax rescue '-'%></b></td><!--
<td><b><%= sprintf "%.2f",service_charge rescue '-'%></b></td> -->
<!-- <td><b><%= other_amt rescue '-'%></b></td> -->
<td><b><%= grand_total.to_f.round(2) rescue '-'%></b></td>
<td><b><%= rounding_adj rescue '-'%></b></td>
<td><b><%= old_grand_total.to_f.round + rounding_adj %></b></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td>Total Amount</td>
<td>Discount Amount</td>
<td>Tax Amount</td>
<td>Grand Total</td>
<td>Rounding Adj.</td>
<td>Grand Total +<br/>
Rounding Adj.
</td>
</tr>
<% end %>
<tr style="border-top:4px double #666;">
<td colspan="2">&nbsp;</td>
<td><b><%= total_sum rescue '-'%></b></td>
<td><b><%= discount_amt rescue '-'%></b></td>
<td><b><%= sprintf "%.2f",total_tax rescue '-'%></b></td><!--
<td><b><%= sprintf "%.2f",service_charge rescue '-'%></b></td> -->
<!-- <td><b><%= other_amt rescue '-'%></b></td> -->
<td><b><%= old_grand_total.to_f.round(2) rescue '-'%></b></td>
<td><b><%= rounding_adj rescue '-'%></b></td>
<td><b><%= old_grand_total.to_f.round + rounding_adj %></b></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td>Total Amount</td>
<td>Discount Amount</td>
<td>Tax Amount</td>
<td>Grand Total</td>
<td>Rounding Adj.</td>
<td>Grand Total +<br/>
Rounding Adj.
</td>
</tr>
<%end%>
</tbody>
</table>
</div>
@@ -181,9 +183,9 @@
var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date;
var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date;
var shift_id = data.message[index].shift_id ;
if(param_shift != ''){
if(sh_date == param_shift){
if(shift_id == param_shift){
selected = 'selected = "selected"';
}
else{
@@ -192,7 +194,7 @@
}else{
selected = '';
}
str += '<option value="'+ sh_date +'" '+ selected +'>' + local_date + '</option>';
str += '<option value="'+ shift_id +'" '+ selected +'>' + local_date + '</option>';
// console.log(sh_date)
})

View File

@@ -2,19 +2,20 @@
<div class="card row">
<table class="table table-striped" border="0">
<thead>
<% if !params[:from].blank?%>
<tr>
<th colspan="7">From Date : <%= params[:from] rescue '-' %> , To Date : <%= params[:to] rescue '-'%></th>
</tr>
<% end %>
<% if @shift_from %>
<tr>
<% if @shift.employee %>
<% cashier_name = !@shift.nil? ? @shift.employee.name : '-' %>
<% end %>
<th colspan="7">Shift Name = <%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%> ( <%= cashier_name rescue '-'%> )</th>
</tr>
<% end %>
<% if !params[:from].blank?%>
<tr>
<th colspan="7">From Date : <%= params[:from] %> , To Date : <%= params[:to] %></th>
</tr>
<% end %>
<% if @shift_from %>
<tr>
<% if @shift_data.employee %>
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
<% end %>
<th colspan="7">Shift Name = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>
<tr>
<th>Recipt No</th>
@@ -32,6 +33,7 @@
</thead>
<tbody>
<% grand_total = 0 %>
<% old_grand_total = 0 %>
<% total_tax = 0 %>
<% guest_count = 0 %>
<% total_sum = 0 %>
@@ -39,52 +41,54 @@
<% other_amt = 0 %>
<% total_nett = 0 %>
<% rounding_adj = 0%> <% gov_tax = 0 %> <% service_charge = 0 %>
<%if @sale_data %>
<% @sale_data.each do |result| %>
<% @sale_data.each do |result| %>
<% grand_total = grand_total.to_f + result.grand_total.to_f %>
<% old_grand_total = old_grand_total.to_f + result.old_grand_total.to_f %>
<% total_tax += result.total_tax.to_f %>
<% total_sum += result.total_amount.to_f %>
<% discount_amt += result.total_discount.to_f %>
<% rounding_adj += result.rounding_adjustment.to_f %>
<tr>
<td><%= result.receipt_no rescue '-' %> </td>
<td><%= result.cashier_name rescue '-' %></td>
<td><%= result.total_amount rescue '-' %></td>
<td><%= result.total_discount rescue '-' %></td>
<td><%= result.total_tax rescue '-' %></td>
<td><%= result.old_grand_total %></td>
<td><%= result.rounding_adjustment.to_f rescue '-' %></td>
<td><%= result.grand_total_after_rounding() rescue '-'%></td>
</tr>
<% grand_total = grand_total.to_f + result.grand_total.to_f %>
<% total_tax += result.total_tax.to_f %>
<% total_sum += result.total_amount.to_f %>
<% discount_amt += result.total_discount.to_f %>
<% rounding_adj += result.rounding_adjustment.to_f %>
<tr>
<td><%= result.receipt_no rescue '-' %> </td>
<td><%= result.cashier_name rescue '-' %></td>
<td><%= result.total_amount rescue '-' %></td>
<td><%= result.total_discount rescue '-' %></td>
<td><%= sprintf "%.2f",result.total_tax rescue '-' %></td>
<td><%= result.grand_total %></td>
<td><%= result.rounding_adjustment.to_f rescue '-' %></td>
<td><%= result.grand_total_after_rounding() rescue '-'%></td>
</tr>
<% end %>
<tr style="border-top:4px double #666;">
<td colspan="2">&nbsp;</td>
<td><b><%= total_sum rescue '-'%></b></td>
<td><b><%= discount_amt rescue '-'%></b></td>
<td><b><%= sprintf "%.2f",total_tax rescue '-'%></b></td><!--
<td><b><%= sprintf "%.2f",service_charge rescue '-'%></b></td> -->
<!-- <td><b><%= other_amt rescue '-'%></b></td> -->
<td><b><%= grand_total.to_f.round(2) rescue '-'%></b></td>
<td><b><%= rounding_adj rescue '-'%></b></td>
<td><b><%= grand_total.to_f.round + rounding_adj %></b></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td>Total Amount</td>
<td>Discount Amount</td>
<td>Tax Amount</td>
<td>Grand Total</td>
<td>Rounding Adj.</td>
<td>Grand Total +<br/>
Rounding Adj.
</td>
</tr>
<% end %>
<tr style="border-top:4px double #666;">
<td colspan="2">&nbsp;</td>
<td><b><%= total_sum rescue '-'%></b></td>
<td><b><%= discount_amt rescue '-'%></b></td>
<td><b><%= sprintf "%.2f",total_tax rescue '-'%></b></td><!--
<td><b><%= sprintf "%.2f",service_charge rescue '-'%></b></td> -->
<!-- <td><b><%= other_amt rescue '-'%></b></td> -->
<td><b><%= old_grand_total.to_f.round(2) rescue '-'%></b></td>
<td><b><%= rounding_adj rescue '-'%></b></td>
<td><b><%= old_grand_total.to_f.round + rounding_adj %></b></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td>Total Amount</td>
<td>Discount Amount</td>
<td>Tax Amount</td>
<td>Grand Total</td>
<td>Rounding Adj.</td>
<td>Grand Total +<br/>
Rounding Adj.
</td>
</tr>
<%end%>
</tbody>
</table>
</div>

View File

@@ -41,7 +41,8 @@
</div>
<div class="form-group col-md-2">
<label class="">All Shift</label>
<select name="shift_name" id="shift_name" class="form-control"></select>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="form-group col-md-2 margin-top-20">
<input type="submit" value="Generate Report" class='btn btn-primary'>
@@ -49,74 +50,6 @@
</div>
<% end %>
<!-- <div class="row">
<% if defined? show_monthly %>
<div class="span3" style="margin-bottom:10px;">
<input type="hidden" id="report_type" name="report_type" value="0">
<div class="btn-group" data-toggle="buttons-radio">
<button id="btn_report_type_1" onclick="$('#report_type').val(1)" type="button" class="btn btn-inverse">Monthly</button>
<button id="btn_report_type_2" onclick="$('#report_type').val(2)" type="button" class="btn btn-inverse">Yearly</button>
</div>
</div>
<% end %>
</div> -->
<div class="row">
<div class="form-group">
<% if defined? promotions %>
<%= select_tag "promotion", options_for_select(@promotions, :selected => params[:promotion_type]), :class => "form-control" %>
<% end %>
<% if defined? menu_types %>
<%= select_tag "menu_type", options_for_select(@menu_types, :selected => params[:menu_type]), :class => "form-control" %>
<% end %>
<% if defined? payments %>
<%= select_tag "payment_type", options_for_select(@payments, :selected => params[:payment_type]), :class => "form-control" %>
<% end %>
<% if defined? shift_name %>
<!-- Temporary no needs
<select name="shift_name" id="shift_name"></select>
-->
<% end %>
<% if defined? cashiers %>
<%= select_tag "cashier", options_from_collection_for_select(@cashiers,"id","name"),:prompt => "All Cashier Stations", :class => "form-control" %>
<% end %>
<% if defined? singer %>
<%= select_tag "singer", options_from_collection_for_select(singer,"id","name"),:prompt => "All Vocal List", :class => "form-control" %>
<% end %>
<% if defined? bsm %>
<%= select_tag "singer", options_from_collection_for_select(bsm,"id","name"),:prompt => "All BSM List", :class => "form-control" %>
<% end %>
<% if defined? guest_role %>
<%= select_tag "guest_role", options_from_collection_for_select(@guest_role,"id","name"),:prompt => "Vocal/BSM List", :class => "form-control" %>
<% end %>
<% if defined? list_by_payment_type %> <!-- for report detail by credit and foc -->
<%= select_tag "payment_type_list", options_for_select(@payment_list, :selected => params[:payment_type_list]), :class => "form-control" %>
<% end %>
<% if defined? products %>
<%= select_tag "product", options_from_collection_for_select(@products,"id","name"),:prompt => "All Products", :class => "form-control" %>
<% end %>
<% if defined? items %>
<%= select_tag "item", options_for_select(@items, :selected => params[:item_type]), :class => "form-control" %>
<% end %>
</div>
</div>
<!-- <div class="row">
<div class="col-md-12">
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
</div> -->
<% end %>
</div>
</div>
@@ -152,20 +85,19 @@ $(function(){
}
});
//Reset the form to pervious values
$("#branch").val(<%=params[:branch]%>);
$("#waiter").val("<%=params[:waiter]%>");
$("#cashier").val(<%=params[:cashier]%>);
$("#product").val(<%=params[:product]%>);
$("#singer").val(<%=params[:singer]%>);
$("#item").val('<%=params[:item]%>');
$("#guest_role").val('<%=params[:guest_role]%>');
<% if params[:shift_name].to_i > 0%>
shift_id = '<%= params[:shift_name] %>'
local_date = '<%= @shift_from %> - <%= @shift_to %> '
var shift = $('#shift_name');
str = '<option value="'+ shift_id +'" '+ 'selected = "selected"' +'>' + local_date + '</option>';
shift.append(str);
<% end %>
$("#from").val("<%=params[:from] rescue '-'%>");
$("#to").val("<%=params[:to] rescue '-'%>");
$("#sel_period").val(<%=params[:period] rescue '-'%>);
$("#sel_sale_type").val(<%=params[:sale_type] rescue '-'%>);
$("#from").val("<%=params[:from]%>");
$("#to").val("<%=params[:to]%>");
$("#sel_period").val(<%=params[:period]%>);
$("#sel_sale_type").val(<%=params[:sale_type]%>);
<% if params[:period_type] == 1 || params[:period_type] == "1" %>
$("#rd_period_type_1").attr("checked","checked");
@@ -195,4 +127,4 @@ $('#item').change(function(){
}
}
});
</script>
</script>

View File

@@ -134,15 +134,11 @@
<td><span><%= grand_total%></span></td>
</tr>
<% end %>
<!-- <tr style="border-top:2px solid grey;">
<td colspan="5">&nbsp;</td>
<td>Total Amount</td>
<td><span><%= grand_total%></span></td>
</tr> -->
<!-- <tr>
<tr>
<td colspan="5">&nbsp;</td>
<td>Cash Received</td>
<td><span><%= @cash_data %></span></td>
<td><span><%= @cash_data - @change_amount %></span></td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
@@ -168,8 +164,8 @@
<td colspan="5">&nbsp;</td>
<td>Grand Total</td>
<!-- <td><span class="double_underline"><%= grand_total.to_f - @discount_data.to_f%></span></td> -->
<!-- <td><span class="double_underline"><%= @grand_total%></span></td>
</tr> -->
<td><span class="double_underline"><%= @grand_total - @change_amount%></span></td>
</tr>
</tbody>
</table>
</div>
@@ -256,9 +252,10 @@
var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date;
var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date;
var shift_id = data.message[index].shift_id ;
if(param_shift != ''){
if(sh_date == param_shift){
if(shift_id == param_shift){
selected = 'selected = "selected"';
}
else{
@@ -270,7 +267,7 @@
}
str += '<option value="'+ sh_date +'" '+ selected +'>' + local_date + '</option>';
str += '<option value="'+ shift_id +'" '+ selected +'>' + local_date + '</option>';
// console.log(sh_date)
})
@@ -278,10 +275,5 @@
});
}
//total price by account
$('#items_table tr').each(function(i){
});
});
</script>

View File

@@ -1,104 +1,150 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-type" content="application/vnd.ms-excel; charset=UTF-8">
</head>
<body>
<div class="span12">
<% unless @sale_data.blank? %>
<div class="container margin-top-20">
<div class="card row">
<div class="table-responsive">
<table class="table table-striped" id="items_table" border="0">
<thead>
<table class="table table-striped" id="items_table" border="0">
<thead>
<% if !params[:from].blank?%>
<tr>
<th colspan="7">From Date : <%= params[:from] %> , To Date : <%= params[:to] %></th>
<% if !params[:from].blank?%>
<tr>
<th colspan="7">From Date : <%= params[:from] %> , To Date : <%= params[:to] %></th>
</tr>
<% end %>
<% if @shift_from %>
<tr>
<% if @shift_data.employee %>
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
<% end %>
<th colspan="7">Shift Name = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>
<tr>
<th>&nbsp;</th>
<th>Menu Category</th>
<th>Code</th>
<th>Product</th>
<th>Total Item</th>
<th>Unit Price</th>
<th>Revenue</th>
</tr>
</thead>
<tbody>
<% unless @sale_data.blank? %>
<% acc_arr = Array.new %>
<% cate_arr = Array.new %>
<% sub_total = 0.0 %>
<% count = 0%>
<% total_price = 0.0 %>
<% cate_count = 0 %>
<% acc_count = 0%>
<% grand_total = 0%>
<% total_qty = 0%>
<% total_amount = 0 %>
<% discount = 0%>
<% @sale_data.each do |sale| %>
<% total_qty += sale.total_item %>
<% if !acc_arr.include?(sale.account_id) %>
<tr>
<td><b><%= sale.account_name %></b></td>
<td colspan="4">&nbsp;</td>
<td>Total Price By <%= sale.account_name %></td>
<td>
<% @totalByAccount.each do |account, total| %>
<% if sale.account_id == account %>
<b><%= total %></b>
<% grand_total += total %>
<% end %>
<% end %>
</td>
</tr>
<% acc_arr.push(sale.account_id) %>
<% end %>
<tr>
<td>&nbsp;</td>
<% if !cate_arr.include?(sale.menu_category_id) %>
<td><%= sale.menu_category_name %></td>
<% cate_arr.push(sale.menu_category_id) %>
<% else %>
<td>&nbsp;</td>
<% end %>
<td><%= sale.item_code rescue '-' %></td>
<td><%= sale.product_name rescue '-' %></td>
<td><%= sale.total_item rescue '-' %></td>
<td><%= sale.unit_price rescue '-' %></td>
<td><%= sale.grand_total rescue '-' %></td>
</tr>
<!-- sub total -->
<% @menu_cate_count.each do |key,value| %>
<% if sale.menu_category_id == key %>
<% count = count + 1 %>
<% sub_total += sale.grand_total %>
<% if count == value %>
<tr>
<td colspan="5">&nbsp;</td>
<td>Sub Total</td>
<td ><span class="underline"><%= sub_total %></span></td>
</tr>
<% sub_total = 0.0%>
<% count = 0%>
<% end %>
<% end %>
<% end %>
<!-- end sub total -->
<% end %>
<tr style="border-top:2px solid grey;">
<td colspan="3">&nbsp;</td>
<td>Total Item</td>
<td><span><%= total_qty%></span></td>
<td>Total Amount</td>
<td><span><%= grand_total%></span></td>
</tr>
<% end %>
<tr>
<td colspan="5">&nbsp;</td>
<td>Cash Received</td>
<td><span><%= @cash_data - @change_amount %></span></td>
</tr>
<% end %>
<% if @shift_from %>
<tr>
<% if @shift_data.employee %>
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
<% end %>
<th colspan="7">Shift Name = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
</tr>
<% end %>
<tr>
<th>&nbsp;</th>
<th>Menu Category</th>
<th>Code</th>
<th>Product</th>
<th>Total Item</th>
<th>Unit Price</th>
<th>Revenue</th>
</tr>
</thead>
<tbody>
<% acc_arr = Array.new %>
<% cate_arr = Array.new %>
<% sub_total = 0.0 %>
<% count = 0%>
<% total_price = 0.0 %>
<% cate_count = 0 %>
<% acc_count = 0%>
<% grand_total = 0%>
<% total_discount = 0.0 %>
<% @sale_data.order("total_item desc").each do |sale| %>
<tr>
<td>&nbsp;</td>
<% if !cate_arr.include?(sale.menu_category_id) %>
<td><%= sale.menu_category_name %></td>
<% cate_arr.push(sale.menu_category_id) %>
<% else %>
<td>&nbsp;</td>
<% end %>
<td><%= sale.code rescue '-' %></td>
<% if @item_table == 'sale' %>
<% if sale.item_remark == 'FOC' %>
<td><%= '[PROMO] '.to_s + sale.product_name.to_s rescue '-' %></td>
<% elsif sale.item_remark == 'FOC ITEM' %>
<td><%= '[DIS:QTY] '.to_s + sale.product_name.to_s rescue '-' %></td>
<% elsif sale.item_remark == 'DISCOUNT' %>
<td><%= '[DIS:TP] '.to_s + sale.product_name.to_s rescue '-' %></td>
<% else %>
<td><%= sale.product_name.to_s rescue '-' %></td>
<% end %>
<% if sale.item_remark == 'DISCOUNT' %>
<td> - </td>
<td> - </td>
<td><%= sale.total_price.abs rescue '-' %></td>
<% total_price += sale.total_price %>
<% else %>
<td><%= sale.total_item.abs rescue '-' %></td>
<td><%= sale.unit_price rescue '-' %></td>
<td><%= sale.grand_total.abs rescue '-' %></td>
<% end %>
<% else %>
<td><%= sale.product_name.to_s rescue '-' %></td>
<td><%= sale.total_item.abs rescue '-' %></td>
<td><%= sale.unit_price rescue '-' %></td>
<td><%= sale.grand_total.abs rescue '-' %></td>
<% end %>
<td colspan="5">&nbsp;</td>
<td>Card Sales</td>
<td><span><%= @card_data %></span></td>
</tr>
<!-- sub total -->
<!-- end sub total -->
<% grand_total += sale.grand_total%>
<% end %>
<tr>
<td colspan="5">&nbsp;</td>
<td>Credit Sales</td>
<td><span><%= @credit_data %></span></td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
<td>FOC Sales</td>
<td><span><%= @foc_data %></span></td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
<td>Discount Amount</td>
<td><span><%= @discount_data %></span></td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
<td>Grand Total</td>
<td><span class="double_underline"><%= grand_total + total_discount %></span></td>
<!-- <td><span class="double_underline"><%= grand_total.to_f - @discount_data.to_f%></span></td> -->
<td><span class="double_underline"><%= @grand_total - @change_amount%></span></td>
</tr>
</tbody>
</tbody>
</table>
<% end %>
</div>
</body>
</html>
</div>
</div>

View File

@@ -18,18 +18,7 @@
<option value="9">Last year</option>
</select>
</div>
<!-- <input type="hidden" name="report_type" value="daily_sale" id="sel_sale_type"> -->
<!-- <div class="form-group col-md-2">
<label>Select Type</label>
<select name="sale_type" id="sel_sale_type" class="form-control">
<option value="0">All Sale Type</option>
<option value="1">Revenue Only</option>
<option value="2">Discount Only</option>
<option value="3">Void Only</option>
<option value="4">Taxes Only</option>
<option value="5">Other Amount Only</option>
</select>
</div> -->
<div class="form-group col-md-3">
<!-- <label class="">Select Shift Period</label> -->
<label class="">From</label>
@@ -39,6 +28,11 @@
<label class="">To</label>
<input data-behaviour='datepicker' class="form-control" name="to" id="to" type="text" placeholder="To date">
</div>
<div class="form-group col-md-2">
<label class="">All Shift</label>
<select class="form-control select" name="shift_name" id="shift_name" >
</select>
</div>
<div class="form-group col-md-2 margin-top-20">
<input type="submit" value="Generate Report" class='btn btn-primary'>
</div>
@@ -82,15 +76,13 @@ $(function(){
});
//Reset the form to pervious values
$("#branch").val(<%=params[:branch]%>);
$("#waiter").val("<%=params[:waiter]%>");
$("#cashier").val(<%=params[:cashier]%>);
$("#product").val(<%=params[:product]%>);
$("#singer").val(<%=params[:singer]%>);
$("#item").val('<%=params[:item]%>');
$("#guest_role").val('<%=params[:guest_role]%>');
<% if params[:shift_name].to_i > 0%>
shift_id = '<%= params[:shift_name] %>'
local_date = '<%= @shift.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p")%> -<%= @shift.shift_closed_at.utc.getlocal.strftime("%e %b %I:%M%p") %>'
var shift = $('#shift_name');
str = '<option value="'+ shift_id +'" '+ 'selected = "selected"' +'>' + local_date + '</option>';
shift.append(str);
<% end %>
$("#from").val("<%=params[:from]%>");
$("#to").val("<%=params[:to]%>");
$("#sel_period").val(<%=params[:period]%>);

View File

@@ -7,7 +7,7 @@
<div class="container">
<%= render :partial=>'shift_sale_report_filter',
:locals=>{ :period_type => true, :shift_name => false, :report_path =>reports_shiftsale_index_path} %>
:locals=>{ :period_type => true, :shift_name => true, :report_path =>reports_shiftsale_index_path} %>
<hr />
</div>
@@ -110,5 +110,94 @@
</div>
</div>
</div>
<script>
$(function(){
var check_arr = [];
$('#sel_period').change(function(){
search_by_period();
});
function search_by_period(){
var period = $('#sel_period').val();
var period_type = 0;
var from = "";
var to = "";
show_shift_name(period,period_type,from,to,'shift_item');
}
$('#from').change(function(){
search_by_date();
});
$('#to').change(function(){
search_by_date();
});
function search_by_date(){
var from = $('#from').val();
var to = $('#to').val();
var period = 0;
var period_type = 1;
if(to != '' && from != ''){
shift_name = from + ',' + to;
check_arr.push(to);
console.log(check_arr.length)
if(check_arr.length == 1){
show_shift_name(period,period_type,from,to,'shift_item');
}
if(check_arr.length == 3){
check_arr = [];
}
}
}
function show_shift_name(period,period_type,from,to,shift_item){
var shift = $('#shift_name');
shift.empty();
var str = '';
var param_shift = '';
var param_shift = '<%= params[:shift_name] rescue '-'%>';
url = '<%= reports_get_shift_by_date_path %>';
$.get(url, {period :period, period_type :period_type, from :from, to :to, report_type :shift_item} , function(data){
str = '<option value="0">--- All Shift ---</option>';
$(data.message).each(function(index){
var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date;
var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date;
var shift_id = data.message[index].shift_id ;
if(param_shift != ''){
if(shift_id == param_shift){
selected = 'selected = "selected"';
}
else{
selected = '';
}
}else{
selected = '';
}
str += '<option value="'+ shift_id +'" '+ selected +'>' + local_date + '</option>';
// console.log(sh_date)
})
shift.append(str);
});
}
});
</script>

View File

@@ -7,7 +7,10 @@
<%= f.input :gateway_communication_type %>
<%= f.input :gateway_url %>
<%= f.input :auth_token %>
<%= f.input :created_by %>
<%= f.input :discount %>
<%= f.input :rebate %>
<%= f.input :bonus %>
<%= f.input :point %>
</div>
<div class="form-actions">

View File

@@ -18,7 +18,10 @@
<th>Gateway url</th>
<th>Auth token</th>
<th>Merchant account</th>
<th>Created by</th>
<th>Discount</th>
<th>Rebate</th>
<th>Bonus</th>
<th>Point</th>
<th colspan="3"></th>
</tr>
</thead>
@@ -32,7 +35,10 @@
<td><%= settings_membership_setting.gateway_url %></td>
<td><%= settings_membership_setting.auth_token %></td>
<td><%= settings_membership_setting.merchant_account rescue ''%></td>
<td><%= settings_membership_setting.created_by %></td>
<td><%= settings_membership_setting.discount %></td>
<td><%= settings_membership_setting.rebate %></td>
<td><%= settings_membership_setting.bonus %></td>
<td><%= settings_membership_setting.point %></td>
<td><%= link_to 'Edit', edit_settings_membership_setting_path(settings_membership_setting) %></td>
<td><%= link_to 'Destroy', settings_membership_setting_path(settings_membership_setting), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>

View File

@@ -32,7 +32,7 @@
<td><%= @settings_order_queue_station.station_name %></td>
<td><%= @settings_order_queue_station.is_active %></td>
<td><%= @settings_order_queue_station.auto_print %></td>
<td><%= @settings_order_queue_station.processing_items %></td>
<td><%= JSON.parse(@settings_order_queue_station.processing_items).count %></td>
<td><%= @settings_order_queue_station.print_copy %></td>
<td><%= @settings_order_queue_station.printer_name %></td>
<td><%= @settings_order_queue_station.font_size %></td>

View File

@@ -8,7 +8,10 @@ class CreateMembershipSettings < ActiveRecord::Migration[5.1]
t.string :auth_token
t.string :merchant_account_id
t.string :created_by
t.boolean :discount, :default => false
t.boolean :rebate, :default => false
t.boolean :bonus, :default => false
t.boolean :point, :default => false
t.timestamps
end
end

View File

@@ -138,7 +138,7 @@ menu_item_attribute_size_small = MenuItemAttribute.create({attribute_type:"size"
menu_item_attribute_size_medium = MenuItemAttribute.create({attribute_type:"size",name: "Medium", value: "medium"})
menu_item_attribute_size_large = MenuItemAttribute.create({attribute_type:"size", name: "Large", value: "large"})
shop = Shop.create({id:1, name: "Beauty In the Pot", address:'No.42-A, Sayar San Road, Bahan, Yangon', township:"Bahan",state:"Yangon",city:"Yangon", country:"Myanmar", phone_no:"+95(9) 252221188, +95(9) 252221177",reservation_no:"111",license:"123",
shop = Shop.create({id:1, name: "OSAKA OHSHO", address:'No. 256, Kyaikkasan Road, Tamwe Township, Yangon', township:"Tamwe",state:"Yangon",city:"Yangon", country:"Myanmar", phone_no:"Tel: 09-258676611",reservation_no:"111",license:"123",
activated_at:"2017-06-26 08:36:24",license_data:"test",base_currency:"111",id_prefix:"111"})
#Default Order Queue stations
# order_queue_station1 = OrderQueueStation.create({station_name: "Queue Station 1", is_active: true,printer_name: "kitchen_printer", processing_items: JSON.generate(['01001','01002','01003','01004']), print_copy:true, cut_per_item: false, use_alternate_name: false, created_by: "SYSTEM DEFAULT"})
@@ -172,7 +172,8 @@ member_actions= MembershipAction.create([{membership_type:"get_account_balance",
{membership_type:"get_all_member_group",gateway_url:"/api/member_group/get_all_member_group",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"},
{membership_type:"rebate",gateway_url:"/api/membership_campaigns/rebate",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"},
{membership_type:"get_all_member_account",gateway_url:"/api/generic_customer/get_membership_data",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"},
{membership_type:"get_member_transactions",gateway_url:"/api/generic_customer/get_membership_transactions",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}
{membership_type:"get_member_transactions",gateway_url:"/api/generic_customer/get_membership_transactions",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"},
{membership_type:"member_discount",gateway_url:"/api/membership_campaigns/discount",additional_parameter:{campaign_type_id:6},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"},
])
payment_methods = PaymentMethodSetting.create({payment_method:"MPU",gateway_url: "http://192.168.1.47:3006"})

View File

@@ -293,18 +293,175 @@ menu_category10 = MenuCategory.create({menu: menu, name: "Udon", alt_name: "Udo
# Curry
menu_category12 = MenuCategory.create({menu: menu, name: "Curry", alt_name: "Curry", order_by: 12,created_by: "SYSTEM DEFAULT"})
# C1-Pork Cutlet Curry
menu_category12_menu_item1 = SimpleMenuItem.create({name: "C1-Pork Cutlet Curry", alt_name: " ",menu_category: menu_category12 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category12_menu_item1, price:5500.00, is_on_promotion:false}])
# C2-Beef Curry
menu_category12_menu_item2 = SimpleMenuItem.create({name: "C2-Beef Curry", alt_name: "",menu_category: menu_category12 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category12_menu_item2, price:5500.00, is_on_promotion:false}])
# C3-Fried Chicken Curry
menu_category12_menu_item3 = SimpleMenuItem.create({name: "C3-Fried Chicken Curry", alt_name: "",menu_category: menu_category12 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category12_menu_item3, price:5500.00, is_on_promotion:false}])
# C4-Curry Rice
menu_category12_menu_item4 = SimpleMenuItem.create({name: "C4-Curry Rice", alt_name: "",menu_category: menu_category12 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category12_menu_item4, price:3500.00, is_on_promotion:false}])
# C5-Fried Prawn Curry
menu_category12_menu_item5 = SimpleMenuItem.create({name: "C5-Fried Prawn Curry", alt_name: "",menu_category: menu_category12 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category12_menu_item5, price:6900.00, is_on_promotion:false}])
# Chicken Cutlet Curry
menu_category12_menu_item6 = SimpleMenuItem.create({name: "Chicken Cutlet Curry", alt_name: "",menu_category: menu_category12 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category12_menu_item6, price:5500.00, is_on_promotion:false}])
# Rice
menu_category13 = MenuCategory.create({menu: menu, name: "Rice", alt_name: "Rice", order_by: 13,created_by: "SYSTEM DEFAULT"})
# R1-Katsu Don
menu_category13_menu_item1 = SimpleMenuItem.create({name: "R1-Katsu Don", alt_name: " ",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item1, price:5900.00, is_on_promotion:false}])
# R2-Beef Don
menu_category13_menu_item2 = SimpleMenuItem.create({name: "R2-Beef Don", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item2, price:4000.00, is_on_promotion:false}])
# R3-Pork Don
menu_category13_menu_item3 = SimpleMenuItem.create({name: "R3-Pork Don", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item3, price:4000.00, is_on_promotion:false}])
# R4- Chicken Cutlet Don
menu_category13_menu_item4 = SimpleMenuItem.create({name: "R4- Chicken Cutlet Don", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item4, price:5900.00, is_on_promotion:false}])
# R5-Egg and Chicken Don
menu_category13_menu_item5 = SimpleMenuItem.create({name: "R5-Egg and Chicken Don", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item5, price:5800.00, is_on_promotion:false}])
# R6-Fried Prawn Don
menu_category13_menu_item6 = SimpleMenuItem.create({name: "R6-Fried Prawn Don", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item6, price:6900.00, is_on_promotion:false}])
# R7-Fried Rice
menu_category13_menu_item7 = SimpleMenuItem.create({name: "R7-Fried Rice", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"R7-Fried Rice(Pork)",menu_item: menu_category13_menu_item7, price:3000.00, is_on_promotion:false}])
menu_item1_instance = MenuItemInstance.create([{item_instance_name:"R7-Fried Rice(Chicken)",menu_item: menu_category13_menu_item7, price:3000.00, is_on_promotion:false}])
# R8-Kimuchi Fried Rice
menu_category13_menu_item8 = SimpleMenuItem.create({name: "R8-Kimuchi Fried Rice", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item8, price:4500.00, is_on_promotion:false}])
# R9-Crab Tenshinhan
menu_category13_menu_item9 = SimpleMenuItem.create({name: "R9-Crab Tenshinhan", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item9, price:4500.00, is_on_promotion:false}])
# R10-Crab Fried Rice
menu_category13_menu_item10 = SimpleMenuItem.create({name: "R10-Crab Fried Rice", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item10, price:4500.00, is_on_promotion:false}])
# Beef Fried Rice
menu_category13_menu_item11 = SimpleMenuItem.create({name: "Beef Fried Rice", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item11, price:5000.00, is_on_promotion:false}])
# Mabo Fried Rice
menu_category13_menu_item12 = SimpleMenuItem.create({name: "Mabo Fried Rice", alt_name: " ",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item12, price:4500.00, is_on_promotion:false}])
# Seafood Fried Rice
menu_category13_menu_item13 = SimpleMenuItem.create({name: "Seafood Fried Rice", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item13, price:6000.00, is_on_promotion:false}])
# Mabo Tenshinhan
menu_category13_menu_item14 = SimpleMenuItem.create({name: "Mabo Tenshinhan", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item14, price:5500.00, is_on_promotion:false}])
# KatsuCurry Tenshinhan
menu_category13_menu_item15 = SimpleMenuItem.create({name: "KatsuCurry Tenshinhan", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item15, price:7000.00, is_on_promotion:false}])
# Fried Prawn Curry Tenshinhan
menu_category13_menu_item16 = SimpleMenuItem.create({name: "Fried Prawn Curry Tenshinhan", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item16, price:7900.00, is_on_promotion:false}])
# Fried Chicken Curry Tenshinhan
menu_category13_menu_item17 = SimpleMenuItem.create({name: "Fried Chicken Curry Tenshinhan", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item17, price:6500.00, is_on_promotion:false}])
# Chicken Cutlet Curry Tenshinhan
menu_category13_menu_item18 = SimpleMenuItem.create({name: "Chicken Cutlet Curry Tenshinhan", alt_name: "",menu_category: menu_category13 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category13_menu_item18, price:7000.00, is_on_promotion:false}])
# Kids Set
menu_category14 = MenuCategory.create({menu: menu, name: "Kids Set", alt_name: "Kids Set", order_by: 14,created_by: "SYSTEM DEFAULT"})
# Kids Set A (Fried Rice+Fried Potato+Gyoza 2pcs)
menu_category14_menu_item1 = SimpleMenuItem.create({name: "Kids Set A (Fried Rice+Fried Potato+Gyoza 2pcs)", alt_name: "",menu_category: menu_category14 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category14_menu_item1, price:3500.00, is_on_promotion:false}])
# Kids Set B (Ramen+Fried Potato+Gyoza 2pcs)
menu_category14_menu_item2 = SimpleMenuItem.create({name: "Kids Set B (Ramen+Fried Potato+Gyoza 2pcs)", alt_name: "",menu_category: menu_category14 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category14_menu_item2, price:4500.00, is_on_promotion:false}])
# Drink
menu_category20 = MenuCategory.create({menu: menu, name: "Drink", alt_name: "Drink", order_by: 20, created_by: "SYSTEM DEFAULT"})
# Lime Juice
menu_category20_menu_item1 = SimpleMenuItem.create({name: "Lime Juice", alt_name: " ",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item1, price:1500.00, is_on_promotion:false}])
# Pineapple Juice
menu_category20_menu_item2 = SimpleMenuItem.create({name: "Pineapple Juice", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item2, price:1500.00, is_on_promotion:false}])
# Watermelon Juice
menu_category20_menu_item3 = SimpleMenuItem.create({name: "Watermelon Juice", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item3, price:1500.00, is_on_promotion:false}])
# Honey Dew Melon Juice
menu_category20_menu_item4 = SimpleMenuItem.create({name: "Honey Dew Melon Juice", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item4, price:1500.00, is_on_promotion:false}])
# Banana Juice
menu_category20_menu_item5 = SimpleMenuItem.create({name: "Banana Juice", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item5, price:1500.00, is_on_promotion:false}])
# Papaya Juice
menu_category20_menu_item6 = SimpleMenuItem.create({name: "Papaya Juice", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item6, price:1500.00, is_on_promotion:false}])
# Avocado Juice
menu_category20_menu_item7 = SimpleMenuItem.create({name: "Avocado Juice", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Avocado Juice",menu_item: menu_category20_menu_item7, price:2000.00, is_on_promotion:false}])
# Kiwi Juice
menu_category20_menu_item9 = SimpleMenuItem.create({name: "Kiwi Juice", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item9, price:2000.00, is_on_promotion:false}])
# Mango Juice
menu_category20_menu_item10 = SimpleMenuItem.create({name: "Mango Juice", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item10, price:2000.00, is_on_promotion:false}])
# Lime Soda
menu_category20_menu_item11 = SimpleMenuItem.create({name: "Lime Soda", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item11, price:2000.00, is_on_promotion:false}])
# Ice
menu_category20_menu_item12 = SimpleMenuItem.create({name: "Ice", alt_name: " ",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item12, price:500.00, is_on_promotion:false}])
# Green Apple Juice
menu_category20_menu_item13 = SimpleMenuItem.create({name: "Green Apple Juice", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item13, price:1500.00, is_on_promotion:false}])
# Snow Tower
menu_category20_menu_item14 = SimpleMenuItem.create({name: "Snow Tower", alt_name: "",menu_category: menu_category20 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category20_menu_item14, price:200.00, is_on_promotion:false}])
# Hot Drinks
menu_category17 = MenuCategory.create({menu: menu, name: "Hot Drinks", alt_name: "Hot Drinks", order_by: 17,created_by: "SYSTEM DEFAULT"})
# Espresso
menu_category17_menu_item1 = SimpleMenuItem.create({name: "Espresso", alt_name: " ",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Espresso",menu_item: menu_category17_menu_item1, price:1500.00, is_on_promotion:false}])
# Green Tea Pot
menu_category17_menu_item2 = SimpleMenuItem.create({name: "Green Tea Pot", alt_name: "",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Green Tea Pot",menu_item: menu_category17_menu_item2, price:1500.00, is_on_promotion:false}])
# Cafe' Americano
menu_category17_menu_item3 = SimpleMenuItem.create({name: "Cafe' Americano", alt_name: "",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Cafe' Americano",menu_item: menu_category17_menu_item3, price:1800.00, is_on_promotion:false}])
# Double Espresso
menu_category17_menu_item4 = SimpleMenuItem.create({name: "Double Espresso", alt_name: "",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Double Espresso",menu_item: menu_category17_menu_item4, price:2000.00, is_on_promotion:false}])
# Cappuccino
menu_category17_menu_item5 = SimpleMenuItem.create({name: "Cappuccino", alt_name: "",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Cappuccino",menu_item: menu_category17_menu_item5, price:2500.00, is_on_promotion:false}])
# Cafe' latte
menu_category17_menu_item6 = SimpleMenuItem.create({name: "Cafe' latte", alt_name: "",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Cafe' latte",menu_item: menu_category17_menu_item6, price:2500.00, is_on_promotion:false}])
# Matcha latte
menu_category17_menu_item7 = SimpleMenuItem.create({name: "Matcha latte", alt_name: "",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Matcha latte",menu_item: menu_category17_menu_item7, price:2500.00, is_on_promotion:false}])
# Hot Chocolate
menu_category17_menu_item9 = SimpleMenuItem.create({name: "Hot Chocolate", alt_name: "",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Hot Chocolate",menu_item: menu_category17_menu_item9, price:2500.00, is_on_promotion:false}])
# Cafe' Mocha
menu_category17_menu_item10 = SimpleMenuItem.create({name: "Cafe' Mocha", alt_name: "",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Cafe' Mocha",menu_item: menu_category17_menu_item10, price:3000.00, is_on_promotion:false}])
# Flavor latte
menu_category17_menu_item11 = SimpleMenuItem.create({name: "Flavor latte", alt_name: "",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Flavor latte (Caramel)",menu_item: menu_category17_menu_item11, price:3000.00, is_on_promotion:false}])
menu_item1_instance = MenuItemInstance.create([{item_instance_name:"Flavor latte (Hazelnut)",menu_item: menu_category17_menu_item11, price:3000.00, is_on_promotion:false}])
menu_item2_instance = MenuItemInstance.create([{item_instance_name:"Flavor latte (Almond)",menu_item: menu_category17_menu_item11, price:3000.00, is_on_promotion:false}])
menu_item3_instance = MenuItemInstance.create([{item_instance_name:"Flavor latte (Butterscotch)",menu_item: menu_category17_menu_item11, price:3000.00, is_on_promotion:false}])
# Roasted Almond Matchal latte
menu_category17_menu_item12 = SimpleMenuItem.create({name: "Roasted Almond Matchal latte", alt_name: " ",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Roasted Almond Matchal latte",menu_item: menu_category17_menu_item12, price:3000.00, is_on_promotion:false}])
# Coconut Matcha latte
menu_category17_menu_item13 = SimpleMenuItem.create({name: "Coconut Matcha latte", alt_name: "",menu_category: menu_category17 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Coconut Matcha latte",menu_item: menu_category17_menu_item13, price:3000.00, is_on_promotion:false}])
# Cold Drinks
menu_category3 = MenuCategory.create({menu: menu,name: "Cold Drinks", alt_name: "Cold Drinks", order_by: 3,created_by: "SYSTEM DEFAULT"})
@@ -365,72 +522,322 @@ menu_category2 = MenuCategory.create({menu: menu, name: "Can Soda", alt_name: "C
# Cocktail
menu_category26 = MenuCategory.create({menu: menu, name: "Cocktail", alt_name: "Cocktail", order_by: 26,created_by: "SYSTEM DEFAULT"})
# U1 Ebi Ten udon
# Moscow's Sky
menu_category1_menu_item200 = SimpleMenuItem.create({name: "Moscow's Sky", alt_name: " ",menu_category: menu_category26 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category1_menu_item200, price:3500.00, is_on_promotion:false}])
# U2 Vegetable Fried Udon
# Tokyo Sunset
menu_category1_menu_item201 = SimpleMenuItem.create({name: "Tokyo Sunset", alt_name: "",menu_category: menu_category26 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category1_menu_item201, price:4500.00, is_on_promotion:false}])
# U3 Curry Udon
# Crane at Lakeside
menu_category1_menu_item202 = SimpleMenuItem.create({name: "Crane at Lakeside", alt_name: "",menu_category: menu_category26 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category1_menu_item202, price:2500.00, is_on_promotion:false}])
# U4 Pork Fried Udon
# Memoir of a Geisha
menu_category1_menu_item203 = SimpleMenuItem.create({name: "Memoir of a Geisha", alt_name: "",menu_category: menu_category26 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category1_menu_item203, price:2500.00, is_on_promotion:false}])
# U5 Spicy Pork Fried Udon
# Dawn to Dark
menu_category1_menu_item204 = SimpleMenuItem.create({name: "Dawn to Dark", alt_name: "",menu_category: menu_category26 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category1_menu_item204, price:2500.00, is_on_promotion:false}])
# U6 Seafood Fried Udon
# Sakura Night
menu_category1_menu_item205 = SimpleMenuItem.create({name: "Sakura Night", alt_name: "",menu_category: menu_category26 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category1_menu_item205, price:3500.00, is_on_promotion:false}])
# U7 Beef Frid Udon
# Kyoto Temptation
menu_category1_menu_item206 = SimpleMenuItem.create({name: "Kyoto Temptation", alt_name: "",menu_category: menu_category26 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category1_menu_item206, price:4500.00, is_on_promotion:false}])
# U8 Spicy Beef Fried Udon
# Love Potion
menu_category1_menu_item207 = SimpleMenuItem.create({name: "Love Potion", alt_name: "",menu_category: menu_category26 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"",menu_item: menu_category1_menu_item207, price:3500.00, is_on_promotion:false}])
# Whisky
menu_category21 = MenuCategory.create({menu: menu, name: "Whisky", alt_name: "Whisky", order_by: 21, created_by: "SYSTEM DEFAULT"})
# BLACK LABEL 1Lit
menu_category21_menu_item200 = SimpleMenuItem.create({name: "BLACK LABEL 1Lit", alt_name: " ",menu_category: menu_category21 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"BLACK LABEL 1Lit",menu_item: menu_category21_menu_item200, price:48000.00, is_on_promotion:false}])
# GOLD LABEL RESERVE
menu_category21_menu_item201 = SimpleMenuItem.create({name: "GOLD LABEL RESERVE", alt_name: "",menu_category: menu_category21 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"GOLD LABEL RESERVE",menu_item: menu_category21_menu_item201, price:70000.00, is_on_promotion:false}])
# BLUE LABEL 75cl
menu_category21_menu_item202 = SimpleMenuItem.create({name: "BLUE LABEL 75cl", alt_name: "",menu_category: menu_category21 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"BLUE LABEL 75cl",menu_item: menu_category21_menu_item202, price:188000.00, is_on_promotion:false}])
# CHIVAS 12year (1Lit)
menu_category21_menu_item203 = SimpleMenuItem.create({name: "CHIVAS 12year (1Lit)", alt_name: "",menu_category: menu_category21 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"CHIVAS 12year (1Lit)",menu_item: menu_category21_menu_item203, price:37000.00, is_on_promotion:false}])
# CHIVAS REGAL Extra (1Lit)
menu_category21_menu_item204 = SimpleMenuItem.create({name: "CHIVAS REGAL Extra (1Lit)", alt_name: "",menu_category: menu_category21 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"CHIVAS REGAL Extra (1Lit)",menu_item: menu_category21_menu_item204, price:67000.00, is_on_promotion:false}])
# Glenfiddich 12 years 1Lit
menu_category21_menu_item205 = SimpleMenuItem.create({name: "Glenfiddich 12 years 1Lit", alt_name: "",menu_category: menu_category21 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Glenfiddich 12 years 1Lit",menu_item: menu_category21_menu_item205, price:48000.00, is_on_promotion:false}])
# Glenfiddish 15 years 75cl
menu_category21_menu_item206 = SimpleMenuItem.create({name: "Glenfiddish 15 years 75cl", alt_name: "",menu_category: menu_category21 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Glenfiddish 15 years 75cl",menu_item: menu_category21_menu_item206, price:62000.00, is_on_promotion:false}])
# PLATINUM LABEL
menu_category21_menu_item207 = SimpleMenuItem.create({name: "PLATINUM LABEL", alt_name: "",menu_category: menu_category21 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"PLATINUM LABEL",menu_item: menu_category21_menu_item207, price:78000.00, is_on_promotion:false}])
# DOUBLE BLACK
menu_category21_menu_item208 = SimpleMenuItem.create({name: "DOUBLE BLACK", alt_name: "",menu_category: menu_category21 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"DOUBLE BLACK",menu_item: menu_category21_menu_item208, price:48000.00, is_on_promotion:false}])
#Japanese Sake & Shochu
menu_category25 = MenuCategory.create({menu: menu, name: "Japanese Sake", alt_name: "Japanese Sake", order_by: 25, created_by: "SYSTEM DEFAULT"})
# Iichiko Silhouette 720ml
menu_category25_menu_item200 = SimpleMenuItem.create({name: "Iichiko Silhouette 720ml", alt_name: " ",menu_category: menu_category25 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Iichiko Silhouette 720ml",menu_item: menu_category25_menu_item200, price:39000.00, is_on_promotion:false}])
# Kurokirishima Imo Shochu 720ml
menu_category25_menu_item201 = SimpleMenuItem.create({name: "Kurokirishima Imo Shochu 720ml", alt_name: "",menu_category: menu_category25 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Kurokirishima Imo Shochu 720ml",menu_item: menu_category25_menu_item201, price:29000.00, is_on_promotion:false}])
# Sawanotsuru Fresh 300ml
menu_category25_menu_item202 = SimpleMenuItem.create({name: "Sawanotsuru Fresh 300ml", alt_name: "",menu_category: menu_category25 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Sawanotsuru Fresh 300ml",menu_item: menu_category25_menu_item202, price:9000.00, is_on_promotion:false}])
# Kha Ka Bora Soba Fresh Shochu
menu_category25_menu_item203 = SimpleMenuItem.create({name: "Kha Ka Bora Soba Fresh Shochu", alt_name: "",menu_category: menu_category25 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Kha Ka Bora Soba Fresh Shochu",menu_item: menu_category25_menu_item203, price:2500.00, is_on_promotion:false}])
# Shwe Yi Soba Shochu
menu_category25_menu_item204 = SimpleMenuItem.create({name: "Shwe Yi Soba Shochu", alt_name: "",menu_category: menu_category25 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Shwe Yi Soba Shochu",menu_item: menu_category25_menu_item204, price:7000.00, is_on_promotion:false}])
#Breakfast Kitchen
menu_category28 = MenuCategory.create({menu: menu, name: "Breakfast Kitchen", alt_name: "Breakfast Kitchen", order_by: 28, created_by: "SYSTEM DEFAULT"})
# Ham and Cheese Sandwich with French Fries
menu_category28_menu_item200 = SimpleMenuItem.create({name: "Ham and Cheese Sandwich with French Fries", alt_name: " ",menu_category: menu_category28 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Ham and Cheese Sandwich with French Fries",menu_item: menu_category28_menu_item200, price:3500.00, is_on_promotion:false}])
# Grilled Cheese Sandwich with French Fries
menu_category28_menu_item201 = SimpleMenuItem.create({name: "Grilled Cheese Sandwich with French Fries", alt_name: "",menu_category: menu_category28 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Grilled Cheese Sandwich with French Fries",menu_item: menu_category28_menu_item201, price:3500.00, is_on_promotion:false}])
#Frappe
menu_category27 = MenuCategory.create({menu: menu, name: "Frappe", alt_name: "Frappe", order_by: 27, created_by: "SYSTEM DEFAULT"})
# Cappuccino Frappe
menu_category27_menu_item200 = SimpleMenuItem.create({name: "Cappuccino Frappe", alt_name: " ",menu_category: menu_category27 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Cappuccino Frappe",menu_item: menu_category27_menu_item200, price:3900.00, is_on_promotion:false}])
# Caramel frappe
menu_category27_menu_item201 = SimpleMenuItem.create({name: "Caramel frappe", alt_name: "",menu_category: menu_category27 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Caramel frappe",menu_item: menu_category27_menu_item201, price:3900.00, is_on_promotion:false}])
# Green Tea frappe
menu_category27_menu_item202 = SimpleMenuItem.create({name: "Green Tea frappe", alt_name: "",menu_category: menu_category27 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Green Tea frappe",menu_item: menu_category27_menu_item202, price:3900.00, is_on_promotion:false}])
# KBanoffee
menu_category27_menu_item203 = SimpleMenuItem.create({name: "KBanoffee", alt_name: "",menu_category: menu_category27 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"KBanoffee",menu_item: menu_category27_menu_item203, price:3900.00, is_on_promotion:false}])
# Butterscotch Popcorn frappe
menu_category27_menu_item204 = SimpleMenuItem.create({name: "Butterscotch Popcorn frappe", alt_name: "",menu_category: menu_category27 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Butterscotch Popcorn frappe",menu_item: menu_category27_menu_item204, price:3900.00, is_on_promotion:false}])
# Mocha frappe
menu_category27_menu_item205 = SimpleMenuItem.create({name: "Mocha frappe", alt_name: "",menu_category: menu_category27 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Mocha frappe",menu_item: menu_category27_menu_item205, price:3900.00, is_on_promotion:false}])
# Chocolate frappe
menu_category27_menu_item206 = SimpleMenuItem.create({name: "Chocolate frappe", alt_name: "",menu_category: menu_category27 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Chocolate frappe",menu_item: menu_category27_menu_item206, price:3900.00, is_on_promotion:false}])
#Smoothies
menu_category23 = MenuCategory.create({menu: menu, name: "Smoothies", alt_name: "Smoothies", order_by: 23, created_by: "SYSTEM DEFAULT"})
# Strawberry smoothie
menu_category23_menu_item200 = SimpleMenuItem.create({name: "Strawberry smoothie", alt_name: " ",menu_category: menu_category23 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Strawberry smoothie",menu_item: menu_category23_menu_item200, price:3500.00, is_on_promotion:false}])
# Passion fruit smoothie
menu_category23_menu_item201 = SimpleMenuItem.create({name: "Passion fruit smoothie", alt_name: "",menu_category: menu_category23 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Passion fruit smoothie",menu_item: menu_category23_menu_item201, price:3500.00, is_on_promotion:false}])
# Mixederry smoothie
menu_category23_menu_item202 = SimpleMenuItem.create({name: "Mixederry smoothie", alt_name: "",menu_category: menu_category23 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Mixederry smoothie",menu_item: menu_category23_menu_item202, price:3500.00, is_on_promotion:false}])
# Blueberry smoothie
menu_category23_menu_item203 = SimpleMenuItem.create({name: "Blueberry smoothie", alt_name: "",menu_category: menu_category23 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Blueberry smoothie",menu_item: menu_category23_menu_item203, price:3500.00, is_on_promotion:false}])
# Berry Sunshine Smoothie
menu_category23_menu_item204 = SimpleMenuItem.create({name: "Berry Sunshine Smoothie", alt_name: "",menu_category: menu_category23 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Berry Sunshine Smoothie",menu_item: menu_category23_menu_item204, price:3500.00, is_on_promotion:false}])
# Mango Smoothie
menu_category23_menu_item205 = SimpleMenuItem.create({name: "Mango Smoothie", alt_name: "",menu_category: menu_category23 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Mango Smoothie",menu_item: menu_category23_menu_item205, price:3500.00, is_on_promotion:false}])
#Sushi
menu_category30 = MenuCategory.create({menu: menu, name: "Sushi", alt_name: "Sushi", order_by: 30, created_by: "SYSTEM DEFAULT"})
# Grilled Salmon Roll
menu_category30_menu_item200 = SimpleMenuItem.create({name: "Grilled Salmon Roll", alt_name: " ",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Grilled Salmon Roll",menu_item: menu_category30_menu_item200, price:7500.00, is_on_promotion:false}])
# Avocado Roll
menu_category30_menu_item201 = SimpleMenuItem.create({name: "Avocado Roll", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Avocado Roll",menu_item: menu_category30_menu_item201, price:5000.00, is_on_promotion:false}])
# Sushi Tempura
menu_category30_menu_item202 = SimpleMenuItem.create({name: "Sushi Tempura", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Sushi Tempura",menu_item: menu_category30_menu_item202, price:6500.00, is_on_promotion:false}])
# Fried Prawn Roll
menu_category30_menu_item203 = SimpleMenuItem.create({name: "Fried Prawn Roll", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Fried Prawn Roll",menu_item: menu_category30_menu_item203, price:7000.00, is_on_promotion:false}])
# Jade Garden Roll
menu_category30_menu_item204 = SimpleMenuItem.create({name: "Jade Garden Roll", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Jade Garden Roll",menu_item: menu_category30_menu_item204, price:5000.00, is_on_promotion:false}])
# California Roll
menu_category30_menu_item205 = SimpleMenuItem.create({name: "California Roll", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"California Roll",menu_item: menu_category30_menu_item205, price:5000.00, is_on_promotion:false}])
# Philadelphia Roll
menu_category30_menu_item206 = SimpleMenuItem.create({name: "Philadelphia Roll", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Philadelphia Roll",menu_item: menu_category30_menu_item206, price:7500.00, is_on_promotion:false}])
# Soft Shell Crab Roll
menu_category30_menu_item207 = SimpleMenuItem.create({name: "Soft Shell Crab Roll", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Soft Shell Crab Roll",menu_item: menu_category30_menu_item207, price:5500.00, is_on_promotion:false}])
# Fried Chicken Roll
menu_category30_menu_item208 = SimpleMenuItem.create({name: "Fried Chicken Roll", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Fried Chicken Roll",menu_item: menu_category30_menu_item208, price:5500.00, is_on_promotion:false}])
# Apple Salad
menu_category30_menu_item209 = SimpleMenuItem.create({name: "Apple Salad", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Apple Salad",menu_item: menu_category30_menu_item209, price:3500.00, is_on_promotion:false}])
# Seaweed Salad
menu_category30_menu_item2010 = SimpleMenuItem.create({name: "Seaweed Salad", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Seaweed Salad",menu_item: menu_category30_menu_item2010, price:3000.00, is_on_promotion:false}])
# Salmon Skin Roll
menu_category30_menu_item2011 = SimpleMenuItem.create({name: "Salmon Skin Roll", alt_name: "",menu_category: menu_category30 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Salmon Skin Roll",menu_item: menu_category30_menu_item2011, price:6500.00, is_on_promotion:false}])
# Extra
menu_category16 = MenuCategory.create({menu: menu, name: "Extra", alt_name: "Extra", order_by: 16,created_by: "SYSTEM DEFAULT"})
# Rice
menu_category16_menu_item200 = SimpleMenuItem.create({name: "Rice", alt_name: " ",menu_category: menu_category16 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Rice",menu_item: menu_category16_menu_item200, price:500.00, is_on_promotion:false}])
# Soup
menu_category16_menu_item201 = SimpleMenuItem.create({name: "Soup", alt_name: "",menu_category: menu_category16 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Soup",menu_item: menu_category16_menu_item201, price:500.00, is_on_promotion:false}])
# Salad
menu_category16_menu_item202 = SimpleMenuItem.create({name: "Salad", alt_name: "",menu_category: menu_category16 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Salad",menu_item: menu_category16_menu_item202, price:500.00, is_on_promotion:false}])
# Curry
menu_category16_menu_item203 = SimpleMenuItem.create({name: "Curry", alt_name: "",menu_category: menu_category16 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Curry",menu_item: menu_category16_menu_item203, price:3000.00, is_on_promotion:false}])
# Beef
menu_category16_menu_item204 = SimpleMenuItem.create({name: "Beef", alt_name: "",menu_category: menu_category16 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Beef",menu_item: menu_category16_menu_item204, price:3500.00, is_on_promotion:false}])
# Pieces of Chicken
menu_category16_menu_item205 = SimpleMenuItem.create({name: "Pieces of Chicken", alt_name: "",menu_category: menu_category16 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Pieces of Chicken",menu_item: menu_category16_menu_item205, price:1000.00, is_on_promotion:false}])
# Pieces of Prawn
menu_category16_menu_item206 = SimpleMenuItem.create({name: "Pieces of Prawn", alt_name: "",menu_category: menu_category16 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Pieces of Prawn",menu_item: menu_category16_menu_item206, price:1500.00, is_on_promotion:false}])
# Ginger
menu_category16_menu_item207 = SimpleMenuItem.create({name: "Ginger", alt_name: "",menu_category: menu_category16 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Ginger",menu_item: menu_category16_menu_item207, price:500.00, is_on_promotion:false}])
# Bar Dessert
menu_category11 = MenuCategory.create({menu: menu, name: "Bar Dessert", alt_name: "Bar Dessert", order_by: 11, created_by: "SYSTEM DEFAULT"})
# D4-Banana Tempura With Ice Cream
menu_category11_menu_item200 = SimpleMenuItem.create({name: "D4-Banana Tempura With Ice Cream", alt_name: " ",menu_category: menu_category11 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"D4-Banana Tempura With Ice Cream",menu_item: menu_category11_menu_item200, price:3500.00, is_on_promotion:false}])
# D5-Ice Cream Chocolate
menu_category11_menu_item201 = SimpleMenuItem.create({name: "D5-Ice Cream", alt_name: "",menu_category: menu_category11 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"D5-Ice Cream Chocolate",menu_item: menu_category11_menu_item201, price:1500.00, is_on_promotion:false}])
menu_item1_instance = MenuItemInstance.create([{item_instance_name:"D5-Ice Cream Green Tea",menu_item: menu_category11_menu_item201, price:1500.00, is_on_promotion:false}])
menu_item2_instance = MenuItemInstance.create([{item_instance_name:"D5-Ice Cream Strawberry",menu_item: menu_category11_menu_item201, price:1500.00, is_on_promotion:false}])
menu_item3_instance = MenuItemInstance.create([{item_instance_name:"D5-Ice Cream Vanilla",menu_item: menu_category11_menu_item201, price:1500.00, is_on_promotion:false}])
# D6-Seasonal Fruits
menu_category11_menu_item202 = SimpleMenuItem.create({name: "D6-Seasonal Fruits", alt_name: "",menu_category: menu_category11 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"D6-Seasonal Fruits",menu_item: menu_category11_menu_item202, price:1500.00, is_on_promotion:false}])
# D7-Seasona Fruits with Ice Cream
menu_category11_menu_item203 = SimpleMenuItem.create({name: "D7-Seasona Fruits with Ice Cream", alt_name: "",menu_category: menu_category11 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"D7-Seasona Fruits with Ice Cream",menu_item: menu_category11_menu_item203, price:2000.00, is_on_promotion:false}])
# Ice Cream
menu_category11_menu_item204 = SimpleMenuItem.create({name: "Ice Cream", alt_name: "",menu_category: menu_category11 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Ice Cream",menu_item: menu_category11_menu_item204, price:800.00, is_on_promotion:false}])
# Kitchen Dessert
menu_category15 = MenuCategory.create({menu: menu, name: "Kitchen Dessert", alt_name: "Kitchen Dessert", order_by: 15, created_by: "SYSTEM DEFAULT"})
# D1-Peanuts Butter Gyoza
menu_category15_menu_item200 = SimpleMenuItem.create({name: "D1-Peanuts Butter Gyoza", alt_name: " ",menu_category: menu_category15 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"D1-Peanuts Butter Gyoza",menu_item: menu_category15_menu_item200, price:3000.00, is_on_promotion:false}])
# D2-Red Bean Gyoza
menu_category15_menu_item201 = SimpleMenuItem.create({name: "D2-Red Bean Gyoza", alt_name: "",menu_category: menu_category15 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"D2-Red Bean Gyoza",menu_item: menu_category15_menu_item201, price:2500.00, is_on_promotion:false}])
# D3-Banana Gyoza
menu_category15_menu_item202 = SimpleMenuItem.create({name: "D3-Banana Gyoza", alt_name: "",menu_category: menu_category15 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"D3-Banana Gyoza",menu_item: menu_category15_menu_item202, price:2500.00, is_on_promotion:false}])
# Dessert Gyoza 2Pcs
menu_category15_menu_item203 = SimpleMenuItem.create({name: "Dessert Gyoza 2Pcs", alt_name: "",menu_category: menu_category15 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Dessert Gyoza 2Pcs",menu_item: menu_category15_menu_item203, price:1000.00, is_on_promotion:false}])
# Beer
menu_category18 = MenuCategory.create({menu: menu, name: "Beer", alt_name: "Beer", order_by: 18,created_by: "SYSTEM DEFAULT"})
# Myanmar Premium Draft Beer
menu_category18_menu_item200 = SimpleMenuItem.create({name: "Myanmar Premium Draft Beer", alt_name: " ",menu_category: menu_category18 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Myanmar Premium Draft Beer",menu_item: menu_category18_menu_item200, price:1800.00, is_on_promotion:false}])
# Kirin Ichiban Draft Beer
menu_category18_menu_item201 = SimpleMenuItem.create({name: "Kirin Ichiban Draft Beer", alt_name: "",menu_category: menu_category18 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Kirin Ichiban Draft Beer",menu_item: menu_category18_menu_item201, price:2200.00, is_on_promotion:false}])
# Myanmar Beer
menu_category18_menu_item202 = SimpleMenuItem.create({name: "Myanmar Beer", alt_name: "",menu_category: menu_category18 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Myanmar Beer",menu_item: menu_category18_menu_item202, price:2300.00, is_on_promotion:false}])
# Tuborg Beer
menu_category18_menu_item203 = SimpleMenuItem.create({name: "Tuborg Beer", alt_name: "",menu_category: menu_category18 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Tuborg Beer",menu_item: menu_category18_menu_item203, price:2500.00, is_on_promotion:false}])
# Wine by the Glass
menu_category18_menu_item204 = SimpleMenuItem.create({name: "Wine by the Glass", alt_name: "",menu_category: menu_category18 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Wine by the Glass",menu_item: menu_category18_menu_item204, price:3000.00, is_on_promotion:false}])
# Green Tea
menu_category19 = MenuCategory.create({menu: menu, name: "Green Tea", alt_name: "Green Tea", order_by: 19, created_by: "SYSTEM DEFAULT"})
# Hot Green Tea
menu_category19_menu_item200 = SimpleMenuItem.create({name: "Hot Green Tea", alt_name: " ",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Hot Green Tea",menu_item: menu_category19_menu_item200, price:1500.00, is_on_promotion:false}])
# Ice Green Tea
menu_category19_menu_item201 = SimpleMenuItem.create({name: "Ice Green Tea", alt_name: "",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Ice Green Tea",menu_item: menu_category19_menu_item201, price:1500.00, is_on_promotion:false}])
# Chinese Tea
menu_category31 = MenuCategory.create({menu: menu, name: "Chinese Tea", alt_name: "Chinese Tea", order_by: 31, created_by: "SYSTEM DEFAULT"})
# Hot China Tea
menu_category19_menu_item200 = SimpleMenuItem.create({name: "Hot China Tea", alt_name: " ",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Hot China Tea",menu_item: menu_category19_menu_item200, price:500.00, is_on_promotion:false}])
# Cold China Tea
menu_category19_menu_item201 = SimpleMenuItem.create({name: "Cold China Tea", alt_name: "",menu_category: menu_category19 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Cold China Tea",menu_item: menu_category19_menu_item201, price:500.00, is_on_promotion:false}])
# Wine
menu_category32 = MenuCategory.create({menu: menu, name: "Wine", alt_name: "Wine", order_by: 32, created_by: "SYSTEM DEFAULT"})
# Viejo Vinedo (Arge;)
menu_category32_menu_item200 = SimpleMenuItem.create({name: "Viejo Vinedo (Arge;)", alt_name: " ",menu_category: menu_category32 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Viejo Vinedo (Arge;)",menu_item: menu_category32_menu_item200, price:15000.00, is_on_promotion:false}])
# Church Lane
menu_category32_menu_item201 = SimpleMenuItem.create({name: "Church Lane", alt_name: "",menu_category: menu_category32 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Church Lane (SHIRAZ)",menu_item: menu_category32_menu_item201, price:20000.00, is_on_promotion:false}])
menu_item1_instance = MenuItemInstance.create([{item_instance_name:"Church Lane (Cabernet Sauvignon)",menu_item: menu_category32_menu_item201, price:20000.00, is_on_promotion:false}])
# Chardonnay Layer Cake (Napa Valley)
menu_category32_menu_item202 = SimpleMenuItem.create({name: "Chardonnay Layer Cake (Napa Valley)", alt_name: "",menu_category: menu_category32 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Chardonnay Layer Cake (Napa Valley)",menu_item: menu_category32_menu_item202, price:30000.00, is_on_promotion:false}])
# PINOT NOIR
menu_category32_menu_item203 = SimpleMenuItem.create({name: "PINOT NOIR", alt_name: "",menu_category: menu_category32 , min_selectable_item: 1, max_selectable_item:1, account: beverage })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"PINOT NOIR",menu_item: menu_category32_menu_item203, price:25000.00, is_on_promotion:false}])
# Grilled
menu_category33 = MenuCategory.create({menu: menu, name: "Grilled", alt_name: "Grilled", order_by: 33, created_by: "SYSTEM DEFAULT"})
# Grilled Salmon
menu_category33_menu_item200 = SimpleMenuItem.create({name: "Grilled Salmon", alt_name: " ",menu_category: menu_category33 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Grilled Salmon",menu_item: menu_category33_menu_item200, price:13500.00, is_on_promotion:false}])
# Grilled Garlic
menu_category33_menu_item201 = SimpleMenuItem.create({name: "Grilled Garlic", alt_name: "",menu_category: menu_category33 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Grilled Garlic",menu_item: menu_category33_menu_item201, price:1500.00, is_on_promotion:false}])
# Grilled Shishamo
menu_category33_menu_item202 = SimpleMenuItem.create({name: "Grilled Shishamo", alt_name: "",menu_category: menu_category33 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Grilled Shishamo",menu_item: menu_category33_menu_item202, price:3800.00, is_on_promotion:false}])
# Grilled Saba
menu_category33_menu_item203 = SimpleMenuItem.create({name: "Grilled Saba", alt_name: "",menu_category: menu_category33 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Grilled Saba",menu_item: menu_category33_menu_item203, price:4800.00, is_on_promotion:false}])
# Pork Yakiniku
menu_category33_menu_item204 = SimpleMenuItem.create({name: "Pork Yakiniku", alt_name: "",menu_category: menu_category33 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Pork Yakiniku",menu_item: menu_category33_menu_item204, price:600.00, is_on_promotion:false}])
# Beef Yakiniku
menu_category33_menu_item205 = SimpleMenuItem.create({name: "Beef Yakiniku", alt_name: " ",menu_category: menu_category33 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Beef Yakiniku",menu_item: menu_category33_menu_item205, price:700.00, is_on_promotion:false}])
# Yakitori
menu_category33_menu_item206 = SimpleMenuItem.create({name: "Yakitori", alt_name: "",menu_category: menu_category33 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Yakitori (Chicken Liver)",menu_item: menu_category33_menu_item206, price:600.00, is_on_promotion:false}])
menu_item1_instance = MenuItemInstance.create([{item_instance_name:"Yakitori (Chicken Thigh)",menu_item: menu_category33_menu_item206, price:600.00, is_on_promotion:false}])
menu_item2_instance = MenuItemInstance.create([{item_instance_name:"Yakitori (Pork Liver)",menu_item: menu_category33_menu_item206, price:600.00, is_on_promotion:false}])
menu_item3_instance = MenuItemInstance.create([{item_instance_name:"Yakitori (Asparagus Bacon)",menu_item: menu_category33_menu_item206, price:3800.00, is_on_promotion:false}])
# Yakitori Assortment
menu_category33_menu_item207 = SimpleMenuItem.create({name: "Yakitori Assortment", alt_name: "",menu_category: menu_category33 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Yakitori Assortment",menu_item: menu_category33_menu_item207, price:5000.00, is_on_promotion:false}])
# Shiitake mushroom (1 piece)
menu_category33_menu_item208 = SimpleMenuItem.create({name: "Shiitake mushroom (1 piece)", alt_name: "",menu_category: menu_category33 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Shiitake mushroom (1 piece)",menu_item: menu_category33_menu_item208, price:600.00, is_on_promotion:false}])
# Lady finger (1 piece)
menu_category33_menu_item209 = SimpleMenuItem.create({name: "Lady finger (1 piece)", alt_name: "",menu_category: menu_category33 , min_selectable_item: 1, max_selectable_item:1, account: food })
menu_item0_instance = MenuItemInstance.create([{item_instance_name:"Lady finger (1 piece)",menu_item: menu_category33_menu_item209, price:600.00, is_on_promotion:false}])
#discount
# menu_category22 = MenuCategory.create({menu: menu, name: "Discount", alt_name: "Discount", order_by: 22, created_by: "SYSTEM DEFAULT"})

BIN
public/image/loading-ajax.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB