update oqs
This commit is contained in:
@@ -23,9 +23,13 @@ $(document).ready(function(){
|
|||||||
// setTimeout(function(){
|
// setTimeout(function(){
|
||||||
// window.location.reload(1);
|
// window.location.reload(1);
|
||||||
// }, 10000);
|
// }, 10000);
|
||||||
|
$(".nav-completed").on("click", function(){
|
||||||
|
$("#completed").removeClass('hide')
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
$(".oqs_click").on("click", function(){
|
$(".oqs_click").on("click", function(){
|
||||||
|
$("#completed").addClass('hide')
|
||||||
var oqs_id = $(this).find(".oqs-id").text();
|
var oqs_id = $(this).find(".oqs-id").text();
|
||||||
var url = 'oqs/get_items/'+oqs_id;
|
var url = 'oqs/get_items/'+oqs_id;
|
||||||
show_details(url);
|
show_details(url);
|
||||||
@@ -52,12 +56,13 @@ $(document).ready(function(){
|
|||||||
var options = data.options;
|
var options = data.options;
|
||||||
}
|
}
|
||||||
|
|
||||||
var date = data[field]["created_at"];
|
var date = new Date(data[field]["created_at"]);
|
||||||
|
var show_date = date.getDate() + "-" + date.getMonth() + "-" + date.getFullYear() + ' ' + date.getHours()+ ':' + date.getMinutes();
|
||||||
|
|
||||||
row ='<div class="card queue_station">'
|
row ='<div class="card queue_station">'
|
||||||
+'<div class="card-block">'
|
+'<div class="card-block">'
|
||||||
+'<h4 class="card-title">'
|
+'<h4 class="card-title">'
|
||||||
+'<span class="order-zone-type">'+data[field]["zone"]+'- </span>'
|
+'<span class="order-zone-type">'+data[field]["type"]+'- </span>'
|
||||||
+'<span class="order-zone">'+ data[field]["zone"] +'</span>'
|
+'<span class="order-zone">'+ data[field]["zone"] +'</span>'
|
||||||
+'<small class="pull-right">'+ data[field]["order_id"] +'- </small>'
|
+'<small class="pull-right">'+ data[field]["order_id"] +'- </small>'
|
||||||
+'</h4>'
|
+'</h4>'
|
||||||
@@ -71,7 +76,7 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
+'<p class="card-text">'
|
+'<p class="card-text">'
|
||||||
+'<small class="text-muted">Order at'
|
+'<small class="text-muted">Order at'
|
||||||
+'<span class="order-at">'+ date +'</span> - '
|
+'<span class="order-at">'+ show_date +'</span> - '
|
||||||
|
|
||||||
+'<span class="order-by">'+ data[field]["item_order_by"] +'</span> '
|
+'<span class="order-by">'+ data[field]["item_order_by"] +'</span> '
|
||||||
+'</small> '
|
+'</small> '
|
||||||
@@ -196,9 +201,6 @@ $(document).ready(function(){
|
|||||||
var assigned_item_id = $('.selected-item').children('.card-block').children('.assigned-order-item').text();
|
var assigned_item_id = $('.selected-item').children('.card-block').children('.assigned-order-item').text();
|
||||||
var options = $('.selected-item').children('.card-block').find('.item-options').text();
|
var options = $('.selected-item').children('.card-block').find('.item-options').text();
|
||||||
var params = { 'options':options };
|
var params = { 'options':options };
|
||||||
console.log(assigned_item_id);
|
|
||||||
console.log(options);
|
|
||||||
console.log(params);
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: '/oqs/print/print/'+assigned_item_id,
|
url: '/oqs/print/print/'+assigned_item_id,
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ class Crm::CustomersController < BaseCrmController
|
|||||||
|
|
||||||
# GET /crm/customers/1/edit
|
# GET /crm/customers/1/edit
|
||||||
def edit
|
def edit
|
||||||
|
@customer = Customer.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
# POST /crm/customers
|
# POST /crm/customers
|
||||||
@@ -78,7 +79,7 @@ class Crm::CustomersController < BaseCrmController
|
|||||||
if @crm_customers.save
|
if @crm_customers.save
|
||||||
# update tax profile
|
# update tax profile
|
||||||
customer = Customer.find(@crm_customers.customer_id)
|
customer = Customer.find(@crm_customers.customer_id)
|
||||||
customer.update_attributes(tax_profiles: params[:customer][:tax_profiles].to_json)
|
customer.update_attributes(tax_profiles: params[:customer][:tax_profiles])
|
||||||
name = customer_params[:name]
|
name = customer_params[:name]
|
||||||
phone = customer_params[:contact_no]
|
phone = customer_params[:contact_no]
|
||||||
email = customer_params[:email]
|
email = customer_params[:email]
|
||||||
@@ -195,10 +196,12 @@ end
|
|||||||
# PATCH/PUT /crm/customers/1
|
# PATCH/PUT /crm/customers/1
|
||||||
# PATCH/PUT /crm/customers/1.json
|
# PATCH/PUT /crm/customers/1.json
|
||||||
def update
|
def update
|
||||||
|
# Remove "" default first
|
||||||
|
params[:customer][:tax_profiles].delete_at(0)
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @crm_customer.update(customer_params)
|
if @crm_customer.update(customer_params)
|
||||||
|
# update tax profile
|
||||||
|
@crm_customer.update_attributes(tax_profiles: params[:customer][:tax_profiles])
|
||||||
name = customer_params[:name]
|
name = customer_params[:name]
|
||||||
phone = customer_params[:contact_no]
|
phone = customer_params[:contact_no]
|
||||||
email = customer_params[:email]
|
email = customer_params[:email]
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ class Oqs::HomeController < BaseOqsController
|
|||||||
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
||||||
left join bookings as bk on bk.booking_id = bo.booking_id
|
left join bookings as bk on bk.booking_id = bo.booking_id
|
||||||
left join dining_facilities as df on df.id = bk.dining_facility_id")
|
left join dining_facilities as df on df.id = bk.dining_facility_id")
|
||||||
.where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}'")
|
.where("assigned_order_items.delivery_status = 0 AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}'")
|
||||||
.group("assigned_order_items.assigned_order_item_id")
|
.group("assigned_order_items.assigned_order_item_id")
|
||||||
.order("assigned_order_items.created_at")
|
.order("assigned_order_items.created_at")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ class Oqs::HomeController < BaseOqsController
|
|||||||
if oqs_id == nil
|
if oqs_id == nil
|
||||||
oqs = ''
|
oqs = ''
|
||||||
else
|
else
|
||||||
oqs = " and assigned_order_items.order_queue_station_id = '#{oqs_id}' "
|
oqs = "and assigned_order_items.order_queue_station_id = '#{oqs_id}' "
|
||||||
end
|
end
|
||||||
AssignedOrderItem.select("assigned_order_items.assigned_order_item_id, oqs.id as station_id, oqs.station_name, oqs.is_active, oqpz.zone_id, df.name as zone, df.type, odt.order_id, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.options, cus.name as customer_name, odt.created_at")
|
AssignedOrderItem.select("assigned_order_items.assigned_order_item_id, oqs.id as station_id, oqs.station_name, oqs.is_active, oqpz.zone_id, df.name as zone, df.type as type, odt.order_id, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.options, cus.name as customer_name, odt.created_at")
|
||||||
.joins(" left join order_queue_stations as oqs on oqs.id = assigned_order_items.order_queue_station_id
|
.joins(" left join order_queue_stations as oqs on oqs.id = assigned_order_items.order_queue_station_id
|
||||||
left join order_queue_process_by_zones as oqpz on oqpz.order_queue_station_id = oqs.id
|
left join order_queue_process_by_zones as oqpz on oqpz.order_queue_station_id = oqs.id
|
||||||
left join orders as od ON od.order_id = assigned_order_items.order_id
|
left join orders as od ON od.order_id = assigned_order_items.order_id
|
||||||
@@ -112,8 +112,10 @@ class Oqs::HomeController < BaseOqsController
|
|||||||
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
|
||||||
left join bookings as bk on bk.booking_id = bo.booking_id
|
left join bookings as bk on bk.booking_id = bo.booking_id
|
||||||
left join dining_facilities as df on df.id = bk.dining_facility_id")
|
left join dining_facilities as df on df.id = bk.dining_facility_id")
|
||||||
.where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}'#{oqs}")
|
.where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' #{oqs}")
|
||||||
|
.group("assigned_order_items.assigned_order_item_id")
|
||||||
.order("assigned_order_items.created_at")
|
.order("assigned_order_items.created_at")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Completed Order
|
# Completed Order
|
||||||
|
|||||||
@@ -38,13 +38,13 @@ class Origami::CustomersController < BaseOrigamiController
|
|||||||
#@products = Product.order("name").page(params[:page]).per(5)
|
#@products = Product.order("name").page(params[:page]).per(5)
|
||||||
else
|
else
|
||||||
@crm_customers = Customer.search(filter)
|
@crm_customers = Customer.search(filter)
|
||||||
|
|
||||||
end
|
end
|
||||||
#@crm_customers = Customer.all
|
#@crm_customers = Customer.all
|
||||||
@crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(50)
|
@crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(50)
|
||||||
@crm_customer = Customer.new
|
@crm_customer = Customer.new
|
||||||
@count_customer = Customer.count_customer
|
@count_customer = Customer.count_customer
|
||||||
|
|
||||||
|
@taxes = TaxProfile.all.order("order_by asc")
|
||||||
# if flash["errors"]
|
# if flash["errors"]
|
||||||
# @crm_customer.valid?
|
# @crm_customer.valid?
|
||||||
# end
|
# end
|
||||||
|
|||||||
@@ -273,28 +273,34 @@ class Sale < ApplicationRecord
|
|||||||
total_tax_amount = 0
|
total_tax_amount = 0
|
||||||
#tax_profile - list by order_by
|
#tax_profile - list by order_by
|
||||||
tax_profiles = TaxProfile.all.order("order_by asc")
|
tax_profiles = TaxProfile.all.order("order_by asc")
|
||||||
|
customer = Customer.find(sale.customer_id)
|
||||||
|
|
||||||
# #Creat new tax records
|
# #Creat new tax records
|
||||||
tax_profiles.each do |tax|
|
tax_profiles.each do |tax|
|
||||||
sale_tax = SaleTax.new(:sale => sale)
|
customer.tax_profiles.each do |cus_tax|
|
||||||
sale_tax.tax_name = tax.name
|
if cus_tax.to_i == tax.id
|
||||||
sale_tax.tax_rate = tax.rate
|
sale_tax = SaleTax.new(:sale => sale)
|
||||||
|
sale_tax.tax_name = tax.name
|
||||||
|
sale_tax.tax_rate = tax.rate
|
||||||
|
|
||||||
# substract , to give after discount
|
# substract , to give after discount
|
||||||
total_tax = total_taxable - total_discount
|
total_tax = total_taxable - total_discount
|
||||||
#include or execulive
|
#include or execulive
|
||||||
if tax.inclusive
|
if tax.inclusive
|
||||||
sale_tax.tax_payable_amount = total_tax / 21
|
rate = tax.rate
|
||||||
else
|
divided_value = (100 + rate)/rate
|
||||||
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
|
sale_tax.tax_payable_amount = total_tax / divided_value
|
||||||
|
else
|
||||||
|
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
|
||||||
|
total_tax_amount = total_tax_amount + sale_tax.tax_payable_amount
|
||||||
|
end
|
||||||
|
#new taxable amount is standard rule for step by step
|
||||||
|
# total_taxable = total_taxable + sale_tax.tax_payable_amount
|
||||||
|
|
||||||
|
sale_tax.inclusive = tax.inclusive
|
||||||
|
sale_tax.save
|
||||||
|
end
|
||||||
end
|
end
|
||||||
#new taxable amount is standard rule for step by step
|
|
||||||
# total_taxable = total_taxable + sale_tax.tax_payable_amount
|
|
||||||
|
|
||||||
sale_tax.inclusive = tax.inclusive
|
|
||||||
sale_tax.save
|
|
||||||
|
|
||||||
total_tax_amount = total_tax_amount + sale_tax.tax_payable_amount
|
|
||||||
end
|
end
|
||||||
|
|
||||||
sale.total_tax = total_tax_amount
|
sale.total_tax = total_tax_amount
|
||||||
@@ -312,32 +318,37 @@ class Sale < ApplicationRecord
|
|||||||
#tax_profile - list by order_by
|
#tax_profile - list by order_by
|
||||||
tax_profiles = TaxProfile.all.order("order_by asc")
|
tax_profiles = TaxProfile.all.order("order_by asc")
|
||||||
|
|
||||||
# #Creat new tax records
|
customer = Customer.find(self.customer_id)
|
||||||
|
|
||||||
|
# #Create new tax records
|
||||||
tax_profiles.each do |tax|
|
tax_profiles.each do |tax|
|
||||||
sale_tax = SaleTax.new(:sale => self)
|
customer.tax_profiles.each do |cus_tax|
|
||||||
sale_tax.tax_name = tax.name
|
if cus_tax.to_i == tax.id
|
||||||
sale_tax.tax_rate = tax.rate
|
sale_tax = SaleTax.new(:sale => self)
|
||||||
|
sale_tax.tax_name = tax.name
|
||||||
|
sale_tax.tax_rate = tax.rate
|
||||||
|
|
||||||
# substract , to give after discount
|
# substract , to give after discount
|
||||||
total_tax = total_taxable - self.total_discount
|
total_tax = total_taxable - self.total_discount
|
||||||
#include or execulive
|
#include or execulive
|
||||||
if tax.inclusive
|
if tax.inclusive
|
||||||
sale_tax.tax_payable_amount = total_tax / 21
|
rate = tax.rate
|
||||||
else
|
divided_value = (100 + rate)/rate
|
||||||
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
|
sale_tax.tax_payable_amount = total_tax / divided_value
|
||||||
|
else
|
||||||
|
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
|
||||||
|
total_tax_amount = total_tax_amount + sale_tax.tax_payable_amount
|
||||||
|
end
|
||||||
|
|
||||||
|
#new taxable amount is standard rule for step by step
|
||||||
|
# total_taxable = total_taxable + sale_tax.tax_payable_amount
|
||||||
|
|
||||||
|
sale_tax.inclusive = tax.inclusive
|
||||||
|
sale_tax.save
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#new taxable amount is standard rule for step by step
|
|
||||||
# total_taxable = total_taxable + sale_tax.tax_payable_amount
|
|
||||||
|
|
||||||
sale_tax.inclusive = tax.inclusive
|
|
||||||
sale_tax.save
|
|
||||||
|
|
||||||
total_tax_amount = total_tax_amount + sale_tax.tax_payable_amount
|
|
||||||
end
|
end
|
||||||
|
|
||||||
self.total_tax = total_tax_amount
|
self.total_tax = total_tax_amount
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def product_get_unit_price(item_code)
|
def product_get_unit_price(item_code)
|
||||||
@@ -382,7 +393,6 @@ class Sale < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.search(filter,from,to)
|
def self.search(filter,from,to)
|
||||||
|
|
||||||
if filter.blank?
|
if filter.blank?
|
||||||
keyword = ''
|
keyword = ''
|
||||||
else
|
else
|
||||||
@@ -399,7 +409,6 @@ class Sale < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.search_credit_sales(customer,filter,from,to)
|
def self.search_credit_sales(customer,filter,from,to)
|
||||||
|
|
||||||
if filter.blank?
|
if filter.blank?
|
||||||
keyword = ''
|
keyword = ''
|
||||||
else
|
else
|
||||||
@@ -518,31 +527,25 @@ class Sale < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.get_by_range_by_saleitems(from,to,status,report_type)
|
def self.get_by_range_by_saleitems(from,to,status,report_type)
|
||||||
|
query = Sale.select("
|
||||||
|
mi.item_code as code,(SUM(i.qty) * i.unit_price) as grand_total,
|
||||||
|
SUM(i.qty) as total_item," +
|
||||||
|
" i.unit_price as unit_price,
|
||||||
|
mi.name as product_name,
|
||||||
|
mc.name as menu_category_name,
|
||||||
|
mc.id as menu_category_id ")
|
||||||
|
.group('mi.id')
|
||||||
|
.order("mi.menu_category_id")
|
||||||
|
|
||||||
query = Sale.select("
|
query = query.joins("JOIN sale_items i ON i.sale_id = sales.sale_id
|
||||||
mi.item_code as code,(SUM(i.qty) * i.unit_price) as grand_total,
|
JOIN menu_items mi ON i.product_code = mi.item_code" +
|
||||||
SUM(i.qty) as total_item," +
|
" JOIN menu_categories mc ON mc.id = mi.menu_category_id
|
||||||
" i.unit_price as unit_price,
|
JOIN employees ea ON ea.id = sales.cashier_id")
|
||||||
mi.name as product_name,
|
|
||||||
mc.name as menu_category_name,
|
|
||||||
mc.id as menu_category_id ")
|
|
||||||
.group('mi.id')
|
|
||||||
.order("mi.menu_category_id")
|
|
||||||
|
|
||||||
query = query.joins("JOIN sale_items i ON i.sale_id = sales.sale_id
|
|
||||||
JOIN menu_items mi ON i.product_code = mi.item_code" +
|
|
||||||
" JOIN menu_categories mc ON mc.id = mi.menu_category_id
|
|
||||||
JOIN employees ea ON ea.id = sales.cashier_id")
|
|
||||||
|
|
||||||
|
|
||||||
query = query.where("(receipt_date between ? and ? and sale_status=?) AND i.unit_price <> 0",from,to,status)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
query = query.where("(receipt_date between ? and ? and sale_status=?) AND i.unit_price <> 0",from,to,status)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def self.get_by_shiftsales(from,to,shift)
|
def self.get_by_shiftsales(from,to,shift)
|
||||||
if !shift.blank?
|
if !shift.blank?
|
||||||
ShiftSale.where("id =?",shift.id)
|
ShiftSale.where("id =?",shift.id)
|
||||||
|
|||||||
@@ -238,11 +238,9 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
end
|
end
|
||||||
|
|
||||||
def sale_payment(sale_data,precision,delimiter)
|
def sale_payment(sale_data,precision,delimiter)
|
||||||
|
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
move_down 5
|
move_down 5
|
||||||
SalePayment.where('sale_id = ?', sale_data.sale_id).each do |payment|
|
SalePayment.where('sale_id = ?', sale_data.sale_id).each do |payment|
|
||||||
|
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
if payment.payment_method == "paypar"
|
if payment.payment_method == "paypar"
|
||||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||||
@@ -270,14 +268,11 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
end
|
end
|
||||||
move_down 5
|
move_down 5
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# show member information
|
# show member information
|
||||||
def member_info(member_info,customer_name,rebate_amount,sale_data,precision,delimiter)
|
def member_info(member_info,customer_name,rebate_amount,sale_data,precision,delimiter)
|
||||||
|
|
||||||
if rebate_amount != nil
|
if rebate_amount != nil
|
||||||
|
|
||||||
if rebate_amount["status"] == true
|
if rebate_amount["status"] == true
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
total = 0
|
total = 0
|
||||||
@@ -429,6 +424,5 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
|
|
||||||
move_down 5
|
move_down 5
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -84,16 +84,6 @@
|
|||||||
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
|
||||||
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
|
||||||
<% flash.each do |name, msg| %>
|
|
||||||
<% str="[\"#{msg['card_no']}\"]"
|
|
||||||
str.gsub!('["', '')
|
|
||||||
str.gsub!('"]', '') %>
|
|
||||||
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Select Customer Type</label>
|
<label>Select Customer Type</label>
|
||||||
<select class="selectpicker form-control col-md-12" id="customer_type" name="customer[customer_type]" style="height: 40px" >
|
<select class="selectpicker form-control col-md-12" id="customer_type" name="customer[customer_type]" style="height: 40px" >
|
||||||
@@ -103,10 +93,21 @@
|
|||||||
<%end %>
|
<%end %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||||
|
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
||||||
|
<% flash.each do |name, msg| %>
|
||||||
|
<% str="[\"#{msg['card_no']}\"]"
|
||||||
|
str.gsub!('["', '')
|
||||||
|
str.gsub!('"]', '') %>
|
||||||
|
<span class="help-block" style="margin-top:-6px"><%= str %></span>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Paypar Account No:</label>
|
<label>Paypar Account No:</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
|||||||
4
app/views/crm/customers/edit.json.jbuilder
Normal file
4
app/views/crm/customers/edit.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
json.extract! @crm_customer, :id, :name, :company, :contact_no, :email, :date_of_birth,
|
||||||
|
:membership_id, :membership_type, :membership_authentication_code,
|
||||||
|
:salutation, :gender,:nrc_no,:address,:card_no, :paypar_account_no, :customer_type, :tax_profiles
|
||||||
|
json.url crm_customer_url(@crm_customer, format: :json)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="row">
|
<!-- <div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li><a href="<%= crm_root_path %>">Home</a></li>
|
<li><a href="<%= crm_root_path %>">Home</a></li>
|
||||||
@@ -7,10 +7,10 @@
|
|||||||
</li>
|
</li>
|
||||||
<!-- <a href="<%= new_crm_customer_path%>" class="btn btn-primary pull-right">
|
<!-- <a href="<%= new_crm_customer_path%>" class="btn btn-primary pull-right">
|
||||||
<i class="fa fa-plus-circle fa-lg"></i> Add Customer
|
<i class="fa fa-plus-circle fa-lg"></i> Add Customer
|
||||||
</a> -->
|
</a>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-7 col-md-7 col-sm-7">
|
<div class="col-lg-7 col-md-7 col-sm-7">
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ $(document).on('click',".customer_tr",function(){
|
|||||||
update_sale(customer_id,sale_id);
|
update_sale(customer_id,sale_id);
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
var url = "customers/"+customer_id;
|
var url = "customers/" + customer_id + "/edit";
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -131,8 +131,9 @@ $(document).on('click',".customer_tr",function(){
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
// Selected for Taxes
|
// Selected for Taxes
|
||||||
//var taxes = JSON.stringify(data.tax_profiles);
|
var taxes = JSON.stringify(data.tax_profiles);
|
||||||
var parse_taxes = JSON.parse(data.tax_profiles);
|
var parse_taxes = JSON.parse(taxes);
|
||||||
|
console.log(parse_taxes);
|
||||||
$.each(parse_taxes, function(i, value){
|
$.each(parse_taxes, function(i, value){
|
||||||
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected");
|
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected");
|
||||||
});
|
});
|
||||||
@@ -234,4 +235,3 @@ $(document).on('click',".customer_tr",function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="page-header">
|
<!-- <div class="page-header">
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li><a href="<%= %>">Home</a></li>
|
<li><a href="<%= %>">Home</a></li>
|
||||||
<li>Queue</li>
|
<li>Queue</li>
|
||||||
@@ -6,13 +6,13 @@
|
|||||||
<%= link_to t('.new', :default => t("helpers.links.new")),new_crm_dining_queue_path,:class => 'btn btn-primary btn-sm' %>
|
<%= link_to t('.new', :default => t("helpers.links.new")),new_crm_dining_queue_path,:class => 'btn btn-primary btn-sm' %>
|
||||||
</span>
|
</span>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Column One -->
|
<!-- Column One -->
|
||||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||||
|
|
||||||
<div class="tab-content" style="max-height:670px; overflow-y:scroll">
|
<div class="tab-content" style="max-height:670px; overflow-y:auto">
|
||||||
|
|
||||||
<!--- Panel 1 - Table Orders -->
|
<!--- Panel 1 - Table Orders -->
|
||||||
<div class="active" role="tabpanel">
|
<div class="active" role="tabpanel">
|
||||||
@@ -48,6 +48,8 @@
|
|||||||
<!-- tabs - End -->
|
<!-- tabs - End -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||||
|
<%= link_to t('.new', :default => t("helpers.links.new")),new_crm_dining_queue_path,:class => 'btn btn-primary btn-lg btn-block' %>
|
||||||
|
<hr>
|
||||||
<button type="button" id="assign" class="btn btn-primary btn-lg btn-block" disabled>Assign</button>
|
<button type="button" id="assign" class="btn btn-primary btn-lg btn-block" disabled>Assign</button>
|
||||||
<button type="button" id="cancel" class="btn btn-warning btn-lg btn-block" disabled>Cancel</button>
|
<button type="button" id="cancel" class="btn btn-warning btn-lg btn-block" disabled>Cancel</button>
|
||||||
<a href="<%= dashboard_path %>" class="btn btn-primary btn-lg btn-block" role="button" aria-haspopup="true" aria-expanded="false"> Back </a>
|
<a href="<%= dashboard_path %>" class="btn btn-primary btn-lg btn-block" role="button" aria-haspopup="true" aria-expanded="false"> Back </a>
|
||||||
|
|||||||
@@ -8,22 +8,25 @@
|
|||||||
<li class="navbar-nav mr-auto dropdown">
|
<li class="navbar-nav mr-auto dropdown">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Settings</a>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Settings</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
<li><%= link_to "Zones (Zone,Table,Rooms)", settings_zones_path, :tabindex =>"-1" %></li>
|
||||||
|
<hr class="hr_advance" />
|
||||||
|
<li><%= link_to "Order Queue Stations",settings_order_queue_stations_path, :tabindex =>"-1" %></li>
|
||||||
|
<hr class="hr_advance" />
|
||||||
<li><%= link_to "Menus ", settings_menus_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Menus ", settings_menus_path, :tabindex =>"-1" %></li>
|
||||||
<li><%= link_to "Menu Categories", settings_menu_categories_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Menu Categories", settings_menu_categories_path, :tabindex =>"-1" %></li>
|
||||||
<li><%= link_to "Menu Item Attributes", settings_menu_item_attributes_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Menu Item Attributes", settings_menu_item_attributes_path, :tabindex =>"-1" %></li>
|
||||||
<li><%= link_to "Menu Item Options",settings_menu_item_options_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Menu Item Options",settings_menu_item_options_path, :tabindex =>"-1" %></li>
|
||||||
<hr>
|
<hr class="hr_advance" />
|
||||||
<li><%= link_to "Order Queue Stations",settings_order_queue_stations_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Cashier Terminals", settings_cashier_terminals_path, :tabindex =>"-1" %></li>
|
||||||
<li><%= link_to "Zones", settings_zones_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Tax Profile", settings_tax_profiles_path, :tabindex =>"-1" %></li>
|
||||||
<hr>
|
<hr class="hr_advance" />
|
||||||
<li><%= link_to "Cashier Terminals ", settings_cashier_terminals_path, :tabindex =>"-1" %></li>
|
|
||||||
<li><%= link_to "Employees", settings_employees_path, :tabindex =>"-1" %></li>
|
|
||||||
<li><%= link_to "Membership Setting",settings_membership_settings_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Membership Setting",settings_membership_settings_path, :tabindex =>"-1" %></li>
|
||||||
<li><%= link_to "Membership Action",settings_membership_actions_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Membership Action",settings_membership_actions_path, :tabindex =>"-1" %></li>
|
||||||
<li><%= link_to "Payment Method", settings_payment_method_settings_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Payment Methods", settings_payment_method_settings_path, :tabindex =>"-1" %></li>
|
||||||
<li><%= link_to "Tax Profile", settings_tax_profiles_path, :tabindex =>"-1" %></li>
|
|
||||||
<li><%= link_to "Print Setting", print_settings_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Print Setting", print_settings_path, :tabindex =>"-1" %></li>
|
||||||
<hr>
|
<hr class="hr_advance" />
|
||||||
|
<li><%= link_to "Employees", settings_employees_path, :tabindex =>"-1" %></li>
|
||||||
|
<hr class="hr_advance" />
|
||||||
<li><%= link_to "Accounts", settings_accounts_path, :tabindex =>"-1" %></li>
|
<li><%= link_to "Accounts", settings_accounts_path, :tabindex =>"-1" %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@@ -76,3 +79,9 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
<style type="text/css">
|
||||||
|
hr.hr_advance {
|
||||||
|
margin-top: 10px !important;
|
||||||
|
margin-bottom: 10px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="col-lg-8 col-md-8 col-sm-8">
|
<div class="col-lg-8 col-md-8 col-sm-8">
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
<li class="nav-item">
|
<li class="nav-item nav-completed">
|
||||||
<a class="nav-link active" data-toggle="tab" href="#completed" role="tab">Processed <span class="badge badge-pill badge-default" id="completed_count"><%= @queue_completed_item.length %></span></a>
|
<a class="nav-link active" data-toggle="tab" href="#completed" role="tab">Processed <span class="badge badge-pill badge-default" id="completed_count"><%= @queue_completed_item.length %></span></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@@ -17,11 +17,12 @@
|
|||||||
<p class="hidden oqs-id"><%= qsi.id %></p>
|
<p class="hidden oqs-id"><%= qsi.id %></p>
|
||||||
<a class="nav-link" data-toggle="tab" href="" role="tab" <%= status %>>
|
<a class="nav-link" data-toggle="tab" href="" role="tab" <%= status %>>
|
||||||
<%= qsi.station_name %>
|
<%= qsi.station_name %>
|
||||||
<span class="badge badge-pill badge-default" id=""><%= qsi.assigned_order_items.count %>
|
<span class="badge badge-pill badge-default" id=""><%= qsi.assigned_order_items.count(:delivery_status) %>
|
||||||
</span>
|
</span>
|
||||||
<% if qsi.auto_print %>
|
<% if qsi.auto_print %>
|
||||||
<span>(ap)</span>
|
<span>(ap)</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<%= qsi.assigned_order_items.where("delivery_status=0").count %>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -77,13 +78,11 @@
|
|||||||
|
|
||||||
<!-- Order Item for Queue Station -->
|
<!-- Order Item for Queue Station -->
|
||||||
|
|
||||||
<!--- Order Items -->
|
<!--- Order Items -->
|
||||||
<div class="card-columns oqs_append" style="padding-top:10px; column-gap: 1.2rem;">
|
<div class="card-columns oqs_append" style="padding-top:10px; column-gap: 1.2rem;">
|
||||||
|
|
||||||
|
|
||||||
<!--- end of Items-->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!--- end of Items-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -144,4 +143,3 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||||
<h2> Payment Credit </h2>
|
<h2> Cash In </h2>
|
||||||
<br>
|
<br>
|
||||||
<table class='table table-striped'>
|
<table class='table table-striped'>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||||
<h2>Payment Debit</h2>
|
<h2>Cash Out</h2>
|
||||||
<table class='table table-striped'>
|
<table class='table table-striped'>
|
||||||
<tr>
|
<tr>
|
||||||
<td> Payment Reference
|
<td> Payment Reference
|
||||||
|
|||||||
@@ -82,22 +82,6 @@
|
|||||||
<input type="hidden" id="type" name="type" value="<%= @dining_facility.type %>" />
|
<input type="hidden" id="type" name="type" value="<%= @dining_facility.type %>" />
|
||||||
<%= f.error_notification %>
|
<%= f.error_notification %>
|
||||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
|
||||||
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
|
||||||
<% flash.each do |name, msg| %>
|
|
||||||
<% str="[\"#{msg['name']}\"]"
|
|
||||||
str.gsub!('["', '')
|
|
||||||
str.gsub!('"]', '') %>
|
|
||||||
<span class="help-block" style="margin-top:-10px"><%= str %></span>
|
|
||||||
<% end -%>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Paypar Account No:</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly />
|
|
||||||
<div class="input-group-addon"><span class="fa fa-credit-card"></span></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Salutation :</label><br>
|
<label>Salutation :</label><br>
|
||||||
<label>Mr</label>
|
<label>Mr</label>
|
||||||
@@ -176,6 +160,37 @@
|
|||||||
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Select Customer Type</label>
|
||||||
|
<select class="selectpicker form-control col-md-12" id="customer_type" name="customer[customer_type]" style="height: 40px" >
|
||||||
|
<% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %>
|
||||||
|
<option value="<%= ct.value %>">
|
||||||
|
<%= ct.name %></option>
|
||||||
|
<%end %>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||||
|
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
||||||
|
<% flash.each do |name, msg| %>
|
||||||
|
<% str="[\"#{msg['name']}\"]"
|
||||||
|
str.gsub!('["', '')
|
||||||
|
str.gsub!('"]', '') %>
|
||||||
|
<span class="help-block" style="margin-top:-10px"><%= str %></span>
|
||||||
|
<% end -%>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Paypar Account No:</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly />
|
||||||
|
<div class="input-group-addon"><span class="fa fa-credit-card"></span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Select Member Group</label>
|
<label>Select Member Group</label>
|
||||||
<select class="selectpicker form-control col-md-12" name="member_group_id">
|
<select class="selectpicker form-control col-md-12" name="member_group_id">
|
||||||
@@ -292,6 +307,12 @@
|
|||||||
data: {},
|
data: {},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
var taxes = JSON.stringify(data.tax_profiles);
|
||||||
|
var parse_taxes = JSON.parse(taxes);
|
||||||
|
$.each(parse_taxes, function(i, value){
|
||||||
|
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected");
|
||||||
|
});
|
||||||
|
|
||||||
$('#customer_id').val(data.id);
|
$('#customer_id').val(data.id);
|
||||||
$('#customer_name').val(data.name);
|
$('#customer_name').val(data.name);
|
||||||
$('#customer_company').val(data.company);
|
$('#customer_company').val(data.company);
|
||||||
@@ -301,7 +322,8 @@
|
|||||||
$('#customer_membership_type').val(data.membership_type);
|
$('#customer_membership_type').val(data.membership_type);
|
||||||
$('.select > option[value="'+data.membership_id+'"]').attr('selected','selected');
|
$('.select > option[value="'+data.membership_id+'"]').attr('selected','selected');
|
||||||
$('.membership_authentication_code').val(data.membership_authentication_code);
|
$('.membership_authentication_code').val(data.membership_authentication_code);
|
||||||
|
$('#customer_card_no').val(data.card_no);
|
||||||
|
$('#customer_type').val(data.customer_type);
|
||||||
$('#customer_salutation').val(data.salutation);
|
$('#customer_salutation').val(data.salutation);
|
||||||
$('#customer_nrc_no').val(data.nrc_no);
|
$('#customer_nrc_no').val(data.nrc_no);
|
||||||
$('#paypar_account_no').val(data.paypar_account_no);
|
$('#paypar_account_no').val(data.paypar_account_no);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="col-lg-11col-md-11 col-sm-11">
|
<div class="col-lg-11col-md-11 col-sm-11">
|
||||||
<div >
|
<div >
|
||||||
<div >
|
<div >
|
||||||
<% @payment_method_setting.each do |payment_method|%>
|
<% @payment_method_setting.where("is_active = true").each do |payment_method|%>
|
||||||
<div class="purple others-payment bottom left" data-type="<%= payment_method.payment_method %>" id="<%= payment_method.payment_method %>" data-url="<%=payment_method.gateway_url%>" data-sale-id="<%= @sale_id%>"><%= payment_method.payment_method %></div>
|
<div class="purple others-payment bottom left" data-type="<%= payment_method.payment_method %>" id="<%= payment_method.payment_method %>" data-url="<%=payment_method.gateway_url%>" data-sale-id="<%= @sale_id%>"><%= payment_method.payment_method %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li><a href="<%= dashboard_path %>">Home</a></li>
|
<li><a href="<%= dashboard_path %>">Home</a></li>
|
||||||
<li>Credit Payment List Report</li>
|
<li>Void Sale Report</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,9 @@
|
|||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width:40%">Name</th>
|
<th style="width:20%">Name</th>
|
||||||
<th style="width:40%">Role</th>
|
<th style="width:20%">Role</th>
|
||||||
|
<th style="width:20%">Created At</th>
|
||||||
<th style="width:20%">Action</th>
|
<th style="width:20%">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><%= link_to employee.name,settings_employee_path(employee) %></td>
|
<td><%= link_to employee.name,settings_employee_path(employee) %></td>
|
||||||
<td><%= employee.role %></td>
|
<td><%= employee.role %></td>
|
||||||
|
<td><%= employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to 'Edit', edit_settings_employee_path(employee) %>
|
<%= link_to 'Edit', edit_settings_employee_path(employee) %>
|
||||||
<%if employee.role != "administrator"%>
|
<%if employee.role != "administrator"%>
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
<%= f.input :gateway_communication_type %>
|
<%= f.input :gateway_communication_type %>
|
||||||
<%= f.input :gateway_url %>
|
<%= f.input :gateway_url %>
|
||||||
<%= f.input :auth_token %>
|
<%= f.input :auth_token %>
|
||||||
<%= f.input :discount %>
|
<label><%= f.check_box :discount %>Discount</label><br/>
|
||||||
<%= f.input :rebate %>
|
<label><%= f.check_box :rebate %>Rebate</label><br/>
|
||||||
<%= f.input :bonus %>
|
<label><%= f.check_box :bonus %>Bonus</label><br/>
|
||||||
<%= f.input :point %>
|
<label><%= f.check_box :point %>Points</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<th>Discount</th>
|
<th>Discount</th>
|
||||||
<th>Rebate</th>
|
<th>Rebate</th>
|
||||||
<th>Bonus</th>
|
<th>Bonus</th>
|
||||||
<th>Point</th>
|
<th>Points</th>
|
||||||
<th colspan="3"></th>
|
<th colspan="3"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -98,10 +98,9 @@ customer_type = Lookup.create([{lookup_type:'customer_type', name: 'Dinein', val
|
|||||||
{lookup_type:'customer_type', name: 'Takeaway', value: 'Takeaway'},
|
{lookup_type:'customer_type', name: 'Takeaway', value: 'Takeaway'},
|
||||||
{lookup_type:'customer_type', name: 'Delivery', value: 'Delivery'}])
|
{lookup_type:'customer_type', name: 'Delivery', value: 'Delivery'}])
|
||||||
|
|
||||||
#WALK CUSTOMER - Default CUSTOMER (take key 1)
|
# Default CUSTOMER
|
||||||
customer = Customer.create({name:"WALK-IN", email: "cus1@customer.com", contact_no:"000000000",card_no:"000",customer_type:"Dinein"})
|
customer = Customer.create({name:"WALK-IN", email: "cus1@customer.com", contact_no:"000000000",card_no:"000", customer_type:"Dinein", tax_profiles:["2", "1"]})
|
||||||
customer2 = Customer.create({name:"TAKEAWAY", email: "cus2@customer.com", contact_no:"111111111",card_no:"111",customer_type:"Takeaway"})
|
customer2 = Customer.create({name:"TAKEAWAY", email: "cus2@customer.com", contact_no:"111111111",card_no:"111", customer_type:"Takeaway", tax_profiles:["1"]})
|
||||||
|
|
||||||
|
|
||||||
#Default ZOne
|
#Default ZOne
|
||||||
# zone = Zone.create({id:1, name: "Normal Zone", is_active:true, created_by: "SYSTEM DEFAULT"})
|
# zone = Zone.create({id:1, name: "Normal Zone", is_active:true, created_by: "SYSTEM DEFAULT"})
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ namespace :menu do
|
|||||||
menu = Menu.create({name: "Main Menu", is_active: true, created_by: "SYSTEM DEFAULT"})
|
menu = Menu.create({name: "Main Menu", is_active: true, created_by: "SYSTEM DEFAULT"})
|
||||||
food = Account.create({title: "Food", account_type: "0"})
|
food = Account.create({title: "Food", account_type: "0"})
|
||||||
beverage = Account.create({title: "Beverage", account_type: "1"})
|
beverage = Account.create({title: "Beverage", account_type: "1"})
|
||||||
|
product = Account.create({title: "Product", account_type: "2"})
|
||||||
# Gyoza
|
# Gyoza
|
||||||
menu_category1 = MenuCategory.create({menu: menu, name: "Gyoza", alt_name: "Gyoza", order_by: 1,created_by: "SYSTEM DEFAULT"})
|
menu_category1 = MenuCategory.create({menu: menu, name: "Gyoza", alt_name: "Gyoza", order_by: 1,created_by: "SYSTEM DEFAULT"})
|
||||||
#Gyoza 6Pcs
|
#Gyoza 6Pcs
|
||||||
|
|||||||
Reference in New Issue
Block a user