Merge branch 'r-1902001-01' into foodcourt
This commit is contained in:
@@ -295,6 +295,10 @@ settings/lookups => { type:employee_roles, name: FoodCourt Cashier, value:foodco
|
|||||||
|
|
||||||
|
|
||||||
* ToDo list
|
* ToDo list
|
||||||
|
For Membership Type
|
||||||
|
settings/lookups => { type:membership_type, name: Timecity staff, value:8 }
|
||||||
|
|
||||||
|
- ToDo list
|
||||||
|
|
||||||
1. Migration
|
1. Migration
|
||||||
2. Quick Service
|
2. Quick Service
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ private
|
|||||||
crm_root_path
|
crm_root_path
|
||||||
elsif current_user.role == "account"
|
elsif current_user.role == "account"
|
||||||
reports_dailysale_index_path
|
reports_dailysale_index_path
|
||||||
elsif @current_user.role == "kitchen"
|
elsif current_user.role == "kitchen"
|
||||||
oqs_root_path
|
oqs_root_path
|
||||||
elsif @current_user.role == "foodcourt_cashier"
|
elsif @current_user.role == "foodcourt_cashier"
|
||||||
#check if cashier has existing open cashier
|
#check if cashier has existing open cashier
|
||||||
|
|||||||
@@ -31,47 +31,40 @@ class Origami::HomeController < BaseOrigamiController
|
|||||||
|
|
||||||
@status_order = ""
|
@status_order = ""
|
||||||
@status_sale = ""
|
@status_sale = ""
|
||||||
@sale_array = Array.new
|
|
||||||
|
|
||||||
@shop = current_shop
|
@shop = current_shop
|
||||||
@membership = MembershipSetting::MembershipSetting
|
@membership = MembershipSetting::MembershipSetting
|
||||||
@payment_methods = PaymentMethodSetting.all
|
@payment_methods = PaymentMethodSetting.all
|
||||||
|
|
||||||
@order_items = Array.new
|
@sale_array = @dining.current_sales
|
||||||
@dining.current_bookings.each do |booking|
|
if (booking = @dining.current_checkin_booking)
|
||||||
if @obj_sale || @booking.blank?
|
@booking = booking
|
||||||
@booking = booking
|
@order_items = booking.order_items
|
||||||
end
|
@obj_order = booking.orders.first
|
||||||
|
end
|
||||||
|
|
||||||
if booking.sale_id
|
if (booking = @dining.current_checkout_booking)
|
||||||
@sale_array.push(booking.sale)
|
@booking = booking
|
||||||
|
@obj_sale = booking.sale
|
||||||
|
@sale_taxes = @obj_sale.sale_taxes
|
||||||
|
@status_sale = 'sale'
|
||||||
|
end
|
||||||
|
|
||||||
if @obj_sale.blank?
|
if @obj_sale || @customer.blank?
|
||||||
@obj_sale = booking.sale
|
if obj = @obj_sale || @obj_order
|
||||||
@sale_taxes = @obj_sale.sale_taxes
|
@customer = obj.customer
|
||||||
@status_sale = 'sale'
|
@date = obj.created_at
|
||||||
end
|
|
||||||
else
|
|
||||||
@order_items += booking.order_items
|
|
||||||
@obj_order = booking.orders.first
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if @obj_sale || @customer.blank?
|
if @obj_sale
|
||||||
if obj = @obj_sale || @obj_order
|
@status_order = 'sale'
|
||||||
@customer = obj.customer
|
elsif @obj_order
|
||||||
@date = obj.created_at
|
@status_order = 'order'
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if @obj_sale
|
if (@obj_sale || @account_arr.blank?) && @customer
|
||||||
@status_order = 'sale'
|
@account_arr = TaxProfile.find_by(id: @customer.tax_profiles)
|
||||||
else
|
|
||||||
@status_order = 'order'
|
|
||||||
end
|
|
||||||
|
|
||||||
if (@obj_sale || @account_arr.blank?) && @customer
|
|
||||||
@account_arr = TaxProfile.find_by(id: @customer.tax_profiles)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#for bank integration
|
#for bank integration
|
||||||
|
|||||||
@@ -610,7 +610,7 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
end
|
end
|
||||||
|
|
||||||
# get printer info
|
# get printer info
|
||||||
print_settings = PrintSetting.find_by_unique_code(unique_code)
|
# print_settings = PrintSetting.find_by_unique_code(unique_code)
|
||||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||||
printer.print_receipt_pdf(filename,receipt_no,print_settings.print_copies,printer_name)
|
printer.print_receipt_pdf(filename,receipt_no,print_settings.print_copies,printer_name)
|
||||||
|
|
||||||
|
|||||||
58
app/controllers/reports/customer_controller.rb
Normal file
58
app/controllers/reports/customer_controller.rb
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
class Reports::CustomerController < BaseReportController
|
||||||
|
authorize_resource :class => false
|
||||||
|
def index
|
||||||
|
@membership_type = Lookup.where(lookup_type: 'membership_type')
|
||||||
|
from, to = get_date_range_from_params
|
||||||
|
customer_filter = params[:customer]
|
||||||
|
|
||||||
|
@shift_sale_range = ''
|
||||||
|
|
||||||
|
@shift = ''
|
||||||
|
if params[:shift_name].to_i != 0
|
||||||
|
|
||||||
|
@shift_sale_range = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED)
|
||||||
|
|
||||||
|
@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
|
||||||
|
if @shift_sale.shift_closed_at.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
|
||||||
|
end
|
||||||
|
|
||||||
|
@lookup = Lookup.find_by_lookup_type('reprint_receipt')
|
||||||
|
if @lookup.nil?
|
||||||
|
@lookup = Lookup.create_reprint_receipt_lookup
|
||||||
|
end
|
||||||
|
if params[:membership_type] == "0"
|
||||||
|
membership_type = ''
|
||||||
|
else
|
||||||
|
membership_type = params[:membership_type]
|
||||||
|
end
|
||||||
|
@sale_data = Sale.get_shift_sales_by_customer(@shift_sale_range, @shift, from, to, membership_type, customer_filter)
|
||||||
|
@sale_taxes = Sale.get_separate_tax(@shift_sale_range, @shift, from, to, nil)
|
||||||
|
@tax_profiles = TaxProfile.group('name').order('order_by asc') #.limit(2)
|
||||||
|
|
||||||
|
@from = from
|
||||||
|
@to = to
|
||||||
|
# get printer info
|
||||||
|
@print_settings = PrintSetting.get_precision_delimiter()
|
||||||
|
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
|
||||||
|
format.xls
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -59,9 +59,9 @@ class Booking < ApplicationRecord
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
scope :active, -> {where("booking_status != 'moved'")}
|
scope :active, -> { where('booking_status != ?', 'moved') }
|
||||||
scope :today, -> {where("created_at >= #{Time.now.utc}")}
|
scope :today, -> { where('created_at >= ?', Time.now) }
|
||||||
scope :assign, -> { where(booking_status: 'assign')}
|
scope :assign, -> { where(booking_status: 'assign') }
|
||||||
|
|
||||||
def self.sync_booking_records(bookings)
|
def self.sync_booking_records(bookings)
|
||||||
if !bookings.nil?
|
if !bookings.nil?
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
ActionCable.server.broadcast("print_channel_#{Shop.current_shop.shop_code}",
|
ActionCable.server.broadcast("print_channel_#{Shop.current_shop.shop_code}",
|
||||||
queue: oqs.station_name,
|
queue: oqs.printer_name,
|
||||||
unique_code: print_settings.unique_code,
|
unique_code: print_settings.unique_code,
|
||||||
print_copies: print_settings.print_copies,
|
print_copies: print_settings.print_copies,
|
||||||
data: {
|
data: {
|
||||||
@@ -73,7 +73,7 @@ class Printer::OrderQueuePrinter < Printer::PrinterWorker
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
ActionCable.server.broadcast("print_channel_#{Shop.current_shop.shop_code}",
|
ActionCable.server.broadcast("print_channel_#{Shop.current_shop.shop_code}",
|
||||||
queue: oqs.station_name,
|
queue: oqs.printer_name,
|
||||||
unique_code: print_settings.unique_code,
|
unique_code: print_settings.unique_code,
|
||||||
print_copies: print_settings.print_copies,
|
print_copies: print_settings.print_copies,
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -115,7 +115,8 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
|||||||
|
|
||||||
filename = "#{directory_name}/receipt_bill_#{sale_data.receipt_no}#{count != 1 ? "_#{count}" : ''}.pdf"
|
filename = "#{directory_name}/receipt_bill_#{sale_data.receipt_no}#{count != 1 ? "_#{count}" : ''}.pdf"
|
||||||
pdf.render_file filename
|
pdf.render_file filename
|
||||||
if !Lookup.where(lookup_type: "ReceiptPdfView").pluck(:value).include?('1')
|
|
||||||
|
if printed_status != 'Paid' || !Lookup.where(lookup_type: "ReceiptPdfView").pluck(:value).include?('1')
|
||||||
#no print in cloud server
|
#no print in cloud server
|
||||||
puts "SERVER_MODE #{ENV["SERVER_MODE"]}"
|
puts "SERVER_MODE #{ENV["SERVER_MODE"]}"
|
||||||
if ENV["SERVER_MODE"] != "cloud"
|
if ENV["SERVER_MODE"] != "cloud"
|
||||||
@@ -125,7 +126,7 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker
|
|||||||
|
|
||||||
Rails.logger.debug "############## filename::" + filename
|
Rails.logger.debug "############## filename::" + filename
|
||||||
else
|
else
|
||||||
if !Lookup.where(lookup_type: "ReceiptPdfView").pluck(:value).include?('1')
|
if printed_status != 'Paid' || !Lookup.where(lookup_type: "ReceiptPdfView").pluck(:value).include?('1')
|
||||||
sale_payments = SalePayment
|
sale_payments = SalePayment
|
||||||
.select(:payment_method, 'SUM(`sale_payments`.`payment_amount`) AS `payment_amount`')
|
.select(:payment_method, 'SUM(`sale_payments`.`payment_amount`) AS `payment_amount`')
|
||||||
.where(sale_id: sale_data.sale_id).group(:payment_method)
|
.where(sale_id: sale_data.sale_id).group(:payment_method)
|
||||||
|
|||||||
@@ -804,7 +804,7 @@ class Sale < ApplicationRecord
|
|||||||
SUM(case when (sale_payments.payment_method='foc') then sale_payments.payment_amount else 0 end) as foc_amount")
|
SUM(case when (sale_payments.payment_method='foc') then sale_payments.payment_amount else 0 end) as foc_amount")
|
||||||
.sale_payments_with_audit_except_void_between(from, to)
|
.sale_payments_with_audit_except_void_between(from, to)
|
||||||
.where("(sale_status = ? OR sale_status = ?) AND sales.receipt_date between ? AND ? ", 'completed', 'void', from, to)
|
.where("(sale_status = ? OR sale_status = ?) AND sales.receipt_date between ? AND ? ", 'completed', 'void', from, to)
|
||||||
.group("sale_id").to_sql
|
.group("sale_id")
|
||||||
|
|
||||||
sale_taxes = Sale.select('sales.sale_id, sale_taxes.tax_name')
|
sale_taxes = Sale.select('sales.sale_id, sale_taxes.tax_name')
|
||||||
.joins(:sale_taxes)
|
.joins(:sale_taxes)
|
||||||
@@ -829,13 +829,13 @@ class Sale < ApplicationRecord
|
|||||||
(IFNULL(SUM(case when (sale_status='completed') then grand_total else 0 end),0)) + (IFNULL(SUM(case when (sale_status='completed') then total_discount else 0 end),0)) as gross_sale,
|
(IFNULL(SUM(case when (sale_status='completed') then grand_total else 0 end),0)) + (IFNULL(SUM(case when (sale_status='completed') then total_discount else 0 end),0)) as gross_sale,
|
||||||
CAST((CONVERT_TZ(receipt_date,'+00:00','+06:30')) AS DATE) as sale_date,
|
CAST((CONVERT_TZ(receipt_date,'+00:00','+06:30')) AS DATE) as sale_date,
|
||||||
#{payment_methods.map { |method| pm = method == 'paypar' ? 'redeem' : method; "SUM(`#{pm}`) as `#{pm}`"}.push('').join(', ')}
|
#{payment_methods.map { |method| pm = method == 'paypar' ? 'redeem' : method; "SUM(`#{pm}`) as `#{pm}`"}.push('').join(', ')}
|
||||||
SUM(cash_amount) as cash_amount,
|
SUM(`cash_amount`) as `cash_amount`,
|
||||||
SUM(credit_amount) as credit_amount,
|
SUM(`credit_amount`) as `credit_amount`,
|
||||||
SUM(foc_amount) as foc_amount
|
SUM(`foc_amount`) as `foc_amount`
|
||||||
FROM (
|
FROM (
|
||||||
#{sales}
|
#{sales.to_sql}
|
||||||
) as s
|
) as s
|
||||||
JOIN (#{sale_taxes.to_sql}) AS st ON s.sale_id = st.sale_id
|
LEFT JOIN (#{sale_taxes.to_sql}) AS st ON s.sale_id = st.sale_id
|
||||||
GROUP BY DATE(CONVERT_TZ(receipt_date,'+00:00','+06:30'))").to_hash.map(&:symbolize_keys)
|
GROUP BY DATE(CONVERT_TZ(receipt_date,'+00:00','+06:30'))").to_hash.map(&:symbolize_keys)
|
||||||
return daily_total
|
return daily_total
|
||||||
end
|
end
|
||||||
@@ -1254,6 +1254,36 @@ def self.get_shift_sales_by_receipt_no(shift_sale_range, shift, from, to, paymen
|
|||||||
return query
|
return query
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.get_shift_sales_by_customer(shift_sale_range, shift, from, to, membership_type, customer_filter)
|
||||||
|
## => left join -> show all sales although no orders
|
||||||
|
query = Sale.includes(:sale_items).select("sales.*, sale_payments.*")
|
||||||
|
.select("customers.customer_id, customers.name as customer_name,customers.membership_type as membership_type, dining_facilities.name, dining_facilities.type")
|
||||||
|
.joins("INNER JOIN sale_payments ON sale_payments.sale_id = sales.sale_id")
|
||||||
|
.joins("INNER JOIN bookings ON bookings.sale_id = sales.sale_id")
|
||||||
|
.joins("LEFT JOIN dining_facilities ON dining_facilities.id = bookings.dining_facility_id")
|
||||||
|
.completed.where.not(total_amount: 0)
|
||||||
|
.group("sales.sale_id")
|
||||||
|
|
||||||
|
if customer_filter.present?
|
||||||
|
query = query.joins(sanitize_sql_array(["INNER JOIN customers ON customers.customer_id = sales.customer_id AND " +
|
||||||
|
"customers.name LIKE :filter", filter: "%#{customer_filter}%"]))
|
||||||
|
else
|
||||||
|
query = query.joins(:customer)
|
||||||
|
end
|
||||||
|
if !membership_type.blank?
|
||||||
|
query = query.where("customers.membership_type = (?)", membership_type)
|
||||||
|
end
|
||||||
|
|
||||||
|
if shift.present?
|
||||||
|
query = query.where("sales.shift_sale_id in (?)", shift.to_a)
|
||||||
|
elsif shift_sale_range.present?
|
||||||
|
query = query.where("sales.shift_sale_id in (?)", shift_sale_range.to_a)
|
||||||
|
else
|
||||||
|
query = query.where("sales.receipt_date between ? and ?", from, to)
|
||||||
|
end
|
||||||
|
return query.group_by(&:membership_type)
|
||||||
|
end
|
||||||
|
|
||||||
def self.get_shift_sales_by_receipt_no_detail(shift_sale_range, shift, from, to, payment_type, customer_filter)
|
def self.get_shift_sales_by_receipt_no_detail(shift_sale_range, shift, from, to, payment_type, customer_filter)
|
||||||
## => left join -> show all sales although no orders
|
## => left join -> show all sales although no orders
|
||||||
puts customer_filter
|
puts customer_filter
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
class SeedGenerator < ApplicationRecord
|
class SeedGenerator < ApplicationRecord
|
||||||
# Generate ID for Tables
|
# Generate ID for Tables
|
||||||
def self.generate_id(model, prefix)
|
def self.generate_id(model, prefix)
|
||||||
# model_name = self.get_model_name(model)
|
|
||||||
model_name = model
|
|
||||||
|
|
||||||
prefix ||= ''
|
prefix ||= ''
|
||||||
prefix << '-' if prefix.present?
|
prefix << '-' if prefix.present?
|
||||||
|
|
||||||
@@ -17,15 +14,12 @@ class SeedGenerator < ApplicationRecord
|
|||||||
prefix << shop.shop_code
|
prefix << shop.shop_code
|
||||||
end
|
end
|
||||||
|
|
||||||
seed = self.update_seed(model_name)
|
seed = self.update_seed(model)
|
||||||
length = 16 - prefix.length
|
length = 16 - prefix.length
|
||||||
prefix + seed.to_s.rjust(length, '0')
|
prefix + seed.to_s.rjust(length, '0')
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.generate_ids(model, prefix, count = 1)
|
def self.generate_ids(model, prefix, count = 1)
|
||||||
# model_name = self.get_model_name(model)
|
|
||||||
model_name = model
|
|
||||||
|
|
||||||
prefix ||= ''
|
prefix ||= ''
|
||||||
prefix << '-' if prefix.present?
|
prefix << '-' if prefix.present?
|
||||||
|
|
||||||
@@ -39,7 +33,7 @@ class SeedGenerator < ApplicationRecord
|
|||||||
prefix << shop.shop_code
|
prefix << shop.shop_code
|
||||||
end
|
end
|
||||||
|
|
||||||
start = self.update_seed(model_name, count)
|
start = self.update_seed(model, count)
|
||||||
stop = start + count - 1
|
stop = start + count - 1
|
||||||
length = 16 - prefix.length
|
length = 16 - prefix.length
|
||||||
(start..stop).map { |c| prefix + c.to_s.rjust(length, '0') }
|
(start..stop).map { |c| prefix + c.to_s.rjust(length, '0') }
|
||||||
@@ -129,7 +123,8 @@ class SeedGenerator < ApplicationRecord
|
|||||||
|
|
||||||
def self.update_seed(model, count = 1)
|
def self.update_seed(model, count = 1)
|
||||||
SeedGenerator.transaction do
|
SeedGenerator.transaction do
|
||||||
seed = SeedGenerator.lock.find_by_model(model)
|
seed = SeedGenerator.lock.find_by_model(get_model_name(model)) ||
|
||||||
|
SeedGenerator.lock.find_by_model(model)
|
||||||
seed.next = seed.next + (count * seed.increase_by)
|
seed.next = seed.next + (count * seed.increase_by)
|
||||||
seed.current = seed.next - seed.increase_by
|
seed.current = seed.next - seed.increase_by
|
||||||
seed.save!
|
seed.save!
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||||
<%= f.input :name, :class => "form-control name", :required => true %>
|
<%= f.input :name, :class => "form-control name", :required => true %>
|
||||||
<% flash.each do |test, msg| %>
|
<% flash.each do |test, msg| %>
|
||||||
<%
|
<%
|
||||||
str="[\"#{msg['name']}\"]"
|
str="[\"#{msg['name']}\"]"
|
||||||
str.gsub!('["', '')
|
str.gsub!('["', '')
|
||||||
str.gsub!('"]', '') %>
|
str.gsub!('"]', '') %>
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
|
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
|
||||||
<button type="button" class="btn btn-md bg-blue btn-info-full next-step">Next</button>
|
<button type="button" class="btn btn-md bg-blue btn-info-full next-step">Next</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" role="tabpanel" id="complete">
|
<div class="tab-pane" role="tabpanel" id="complete">
|
||||||
@@ -107,12 +107,12 @@
|
|||||||
<% if f.object.image_path? %>
|
<% if f.object.image_path? %>
|
||||||
<p><%= f.object.name %></p>
|
<p><%= f.object.name %></p>
|
||||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
<option value="<%= ct.value %>">
|
<option value="<%= ct.value %>">
|
||||||
<%= ct.name %></option>
|
<%= ct.name %></option>
|
||||||
<%end %>
|
<%end %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||||
<label class="control-label"><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
|
<label class="control-label"><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
|
||||||
<div class="-group">
|
<div class="-group">
|
||||||
<input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly/>
|
<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 class="input-group-addon"><span class="fa fa-credit-card"></span></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
<option value="<%= member.value %>">
|
<option value="<%= member.value %>">
|
||||||
<%= member.name %></option>
|
<%= member.name %></option>
|
||||||
<%end %>
|
<%end %>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
<button type="submit" class="btn btn-primary" id="submit_customer"><%= t("views.btn.submit") %></button>
|
<button type="submit" class="btn btn-primary" id="submit_customer"><%= t("views.btn.submit") %></button>
|
||||||
<button type="submit" class="btn btn-info" disabled id="update_customer"><%= t("views.btn.update") %></button>
|
<button type="submit" class="btn btn-info" disabled id="update_customer"><%= t("views.btn.update") %></button>
|
||||||
<button type="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button>
|
<button type="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
@@ -259,13 +259,10 @@
|
|||||||
console.log(paypar_account_no);
|
console.log(paypar_account_no);
|
||||||
|
|
||||||
// Read Card Reader
|
// Read Card Reader
|
||||||
$("#paypar_account_no").on('focus', function(e){
|
$("#paypar_account_no").on('focus', function(e){
|
||||||
if($(this).val() == ''){
|
if($(this).val() == ''){
|
||||||
$("#sxModal").show();
|
$("#sxModal").show();
|
||||||
setTimeout(function(){
|
getCardNo();
|
||||||
getCardNo();
|
|
||||||
$("#sxModal").hide();
|
|
||||||
},100);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -289,6 +286,7 @@
|
|||||||
$("#paypar_account_no").val(cardNo);
|
$("#paypar_account_no").val(cardNo);
|
||||||
$("#search").val(cardNo);
|
$("#search").val(cardNo);
|
||||||
$("#type").val("card");
|
$("#type").val("card");
|
||||||
|
$("#filter_form").submit();
|
||||||
}else{
|
}else{
|
||||||
if($.inArray(cardNo, paypar_account_no) !== -1){
|
if($.inArray(cardNo, paypar_account_no) !== -1){
|
||||||
swal({
|
swal({
|
||||||
@@ -311,9 +309,10 @@
|
|||||||
$("#sxModal").hide();
|
$("#sxModal").hide();
|
||||||
//$("#filter_form").submit();
|
//$("#filter_form").submit();
|
||||||
}
|
}
|
||||||
|
$("#sxModal").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#sxModal .btn_cancel").on('click',function(){
|
$("#sxModal .btn_cancel").on('click',function(){
|
||||||
$("#sxModal").hide();
|
$("#sxModal").hide();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
<!-- <div class="page-header">
|
<!-- <div class="page-header">
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t :crm %></li> -->
|
<li class="breadcrumb-item active"><%= t :crm %></li> -->
|
||||||
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
|
<!-- <li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li> -->
|
||||||
<!-- <span class="float-right">
|
<!-- <span class="float-right">
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
</span>
|
</span>
|
||||||
@@ -161,24 +161,19 @@
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#oqs_loading_wrapper").show();
|
$("#oqs_loading_wrapper").show();
|
||||||
localStorage.setItem("member_card",false);
|
localStorage.setItem("member_card",false);
|
||||||
/*$('.datepicker').datepicker({
|
|
||||||
format : 'dd-mm-yyyy',
|
|
||||||
autoclose: true
|
|
||||||
});
|
|
||||||
$('.datepicker').attr('ReadOnly','true');
|
|
||||||
$('.datepicker').css('cursor','pointer');*/
|
|
||||||
|
|
||||||
// Read Card Reader
|
// Read Card Reader
|
||||||
$("#member_acc_no").on('click', function(e){
|
$("#member_acc_no").on('click', function(e){
|
||||||
localStorage.setItem("member_card",true);
|
localStorage.setItem("member_card",true);
|
||||||
var cardNo = "";
|
|
||||||
$("#sxModal").show();
|
$("#sxModal").show();
|
||||||
|
<<<<<<< HEAD
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
getCardNo();
|
getCardNo();
|
||||||
},100);
|
},100);
|
||||||
|
=======
|
||||||
|
getCardNo();
|
||||||
|
>>>>>>> r-1902001-01
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// QR Code Reader
|
// QR Code Reader
|
||||||
$("#qr_code").on('click', function(e){
|
$("#qr_code").on('click', function(e){
|
||||||
var code = "";
|
var code = "";
|
||||||
@@ -238,88 +233,85 @@
|
|||||||
/*customer UI tab btn*/
|
/*customer UI tab btn*/
|
||||||
|
|
||||||
$(document).on('click',".customer_tr",function(){
|
$(document).on('click',".customer_tr",function(){
|
||||||
// if(this.checked){
|
// if(this.checked){
|
||||||
$(this).closest('tr').find('.checkbox_check').prop( "checked", true );
|
$(this).closest('tr').find('.checkbox_check').prop( "checked", true );
|
||||||
//$( "#checkbox_check" ).prop( "checked", true );
|
//$( "#checkbox_check" ).prop( "checked", true );
|
||||||
var sale_id = $("#sale_id").val() || 0;
|
var sale_id = $("#sale_id").val() || 0;
|
||||||
var customer_id = $(this).attr('data-ref');
|
var customer_id = $(this).attr('data-ref');
|
||||||
|
|
||||||
if(sale_id != 0){
|
if(sale_id != 0){
|
||||||
// var url = "/"+customer_id;
|
// var url = "/"+customer_id;
|
||||||
update_sale(customer_id,sale_id);
|
update_sale(customer_id,sale_id);
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
var url = "customers/" + customer_id + "/edit";
|
var url = "customers/" + customer_id + "/edit";
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#customer_tax_profiles").children().removeAttr("selected").css({'color':'#000','background':'none'});
|
$("#customer_tax_profiles").children().removeAttr("selected").css({'color':'#000','background':'none'});
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: url,
|
url: url,
|
||||||
data: {},
|
data: {},
|
||||||
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(taxes);
|
var parse_taxes = JSON.parse(taxes);
|
||||||
$.each(parse_taxes, function(i, value){
|
$.each(parse_taxes, function(i, value){
|
||||||
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected").css({'color':'#fff','background':'#215d9c'});
|
$("#customer_tax_profiles option[value='" + value + "']").attr("selected","selected").css({'color':'#fff','background':'#215d9c'});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#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);
|
||||||
$('#customer_contact_no').val(data.contact_no);
|
$('#customer_contact_no').val(data.contact_no);
|
||||||
$('#customer_email').val(data.email);
|
$('#customer_email').val(data.email);
|
||||||
$('#customer_salutation').val(data.salutation);
|
$('#customer_salutation').val(data.salutation);
|
||||||
$('#customer_nrc_no').val(data.nrc_no);
|
$('#customer_nrc_no').val(data.nrc_no);
|
||||||
$('#customer_card_no').val(data.card_no);
|
$('#customer_card_no').val(data.card_no);
|
||||||
$('#customer_type').val(data.customer_type);
|
$('#customer_type').val(data.customer_type);
|
||||||
$('#paypar_account_no').val(data.paypar_account_no);
|
$('#paypar_account_no').val(data.paypar_account_no);
|
||||||
$('#customer_address').val(data.address);
|
$('#customer_address').val(data.address);
|
||||||
$('#customer_date_of_birth').val(data.date_of_birth);
|
$('#customer_date_of_birth').val(data.date_of_birth);
|
||||||
if(data.image_path.url!=undefined && data.image_path.url!=null){
|
if(data.image_path.url!=undefined && data.image_path.url!=null){
|
||||||
$('.menu-item-img .img-thumbnail').attr('src',data.image_path.url);
|
$('.menu-item-img .img-thumbnail').attr('src',data.image_path.url);
|
||||||
}
|
}
|
||||||
$('#customer_membership_type').val(data.membership_type);
|
$('#customer_membership_type').val(data.membership_type);
|
||||||
$('.selectpicker > option[value="'+data.membership_type+'"]').attr('selected','selected');
|
$('.selectpicker > option[value="'+data.membership_type+'"]').attr('selected','selected');
|
||||||
if (data.gender == 'Male') {
|
if (data.gender == 'Male') {
|
||||||
$('.male').prop( "checked", true )
|
$('.male').prop( "checked", true )
|
||||||
}else{
|
}else{
|
||||||
$('.female').prop( "checked", true )
|
$('.female').prop( "checked", true )
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.salutation == 'Mr') {
|
if(data.salutation == 'Mr') {
|
||||||
$('.mr').prop( "checked", true )
|
$('.mr').prop( "checked", true )
|
||||||
}else if(data.salutation == 'Miss') {
|
}else if(data.salutation == 'Miss') {
|
||||||
$('.miss').prop( "checked", true )
|
$('.miss').prop( "checked", true )
|
||||||
}else if(data.salutation == 'Mrs'){
|
}else if(data.salutation == 'Mrs'){
|
||||||
$('.mrs').prop( "checked", true )
|
$('.mrs').prop( "checked", true )
|
||||||
}else{
|
}else{
|
||||||
$('.mdm').prop( "checked", true )
|
$('.mdm').prop( "checked", true )
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.membership_authentication_code').val(data.membership_authentication_code);
|
$('.membership_authentication_code').val(data.membership_authentication_code);
|
||||||
|
|
||||||
$('#update_customer').removeAttr('disabled').val('');
|
$('#update_customer').removeAttr('disabled').val('');
|
||||||
$('#update_customer').attr('value', 'Update');
|
$('#update_customer').attr('value', 'Update');
|
||||||
$('#submit_customer').attr('disabled','disabled');
|
$('#submit_customer').attr('disabled','disabled');
|
||||||
|
|
||||||
$("#new_customer").attr('class', 'simple_form edit_customer');
|
$("#new_customer").attr('class', 'simple_form edit_customer');
|
||||||
var id = "edit_customer_"+customer_id;
|
var id = "edit_customer_"+customer_id;
|
||||||
$("#new_customer").attr('id', id);
|
$("#new_customer").attr('id', id);
|
||||||
|
|
||||||
$(".edit_customer").attr('id', id);
|
$(".edit_customer").attr('id', id);
|
||||||
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
|
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
|
||||||
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
|
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
|
||||||
$(".patch_method").html('<input type="hidden" name="_method" value="patch">');
|
$(".patch_method").html('<input type="hidden" name="_method" value="patch">');
|
||||||
//$(".edit_customer").attr('method', 'PATCH');
|
//$(".edit_customer").attr('method', 'PATCH');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// }else{
|
|
||||||
|
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function update_sale(customer_id,sale_id) {
|
function update_sale(customer_id,sale_id) {
|
||||||
|
|||||||
@@ -1,11 +1,21 @@
|
|||||||
<% breadcrumb_add 'CRM', "", dashboard_path %>
|
<div class="container-fluid">
|
||||||
|
<div class="page-header">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
|
<li class="breadcrumb-item active">CRM</li>
|
||||||
|
<!-- <li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li> -->
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', crm_customers_path %>
|
||||||
|
</span>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||||
<!-- Column One -->
|
<!-- Column One -->
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
<ul class="nav nav-tabs tab-nav-right" role="tablist">
|
<ul class="nav nav-tabs tab-nav-right" role="tablist">
|
||||||
|
|
||||||
<li role="presentation" class="active nav-item">
|
<li role="presentation" class="active nav-item">
|
||||||
<a class="nav-link" data-toggle="tab" href="#customer" ><%= t :customer_details %></a>
|
<a class="nav-link" data-toggle="tab" href="#customer" ><%= t :customer_details %></a>
|
||||||
</li>
|
</li>
|
||||||
@@ -60,10 +70,10 @@
|
|||||||
<%else%>
|
<%else%>
|
||||||
<td>-</td>
|
<td>-</td>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr><th colspan="9"></th></tr>
|
<tr><th colspan="9"></th></tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -79,7 +89,7 @@
|
|||||||
<!-- <th>Balance</th> -->
|
<!-- <th>Balance</th> -->
|
||||||
<th><%= t("views.right_panel.detail.status") %></th>
|
<th><%= t("views.right_panel.detail.status") %></th>
|
||||||
<th><%= t("views.right_panel.detail.from_account") %></th>
|
<th><%= t("views.right_panel.detail.from_account") %></th>
|
||||||
|
|
||||||
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -94,7 +104,7 @@
|
|||||||
<td>(<%= transaction["withdraw"] %>)</td>
|
<td>(<%= transaction["withdraw"] %>)</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
<td><%= transaction["status"] %></td>
|
<td><%= transaction["status"] %></td>
|
||||||
<td><%= transaction["account_status"] %></td>
|
<td><%= transaction["account_status"] %></td>
|
||||||
<td><%= transaction["receipt_no"] %></td>
|
<td><%= transaction["receipt_no"] %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -126,7 +136,7 @@
|
|||||||
|
|
||||||
<h5><%= t :order_details %></h5>
|
<h5><%= t :order_details %></h5>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("views.right_panel.detail.order_id") %></th>
|
<th><%= t("views.right_panel.detail.order_id") %></th>
|
||||||
@@ -150,13 +160,13 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane" id="sale" role="tabpanel" style="min-height:670px; max-height:670px; ">
|
<div class="tab-pane" id="sale" role="tabpanel" style="min-height:670px; max-height:670px; ">
|
||||||
<h5><%= t :sale_details %></h5>
|
<h5><%= t :sale_details %></h5>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("views.right_panel.detail.sale_id") %></th>
|
<th><%= t("views.right_panel.detail.sale_id") %></th>
|
||||||
@@ -195,19 +205,19 @@
|
|||||||
<th colspan="4"><%= add_grand_total %></th>
|
<th colspan="4"><%= add_grand_total %></th>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane" id="credit" role="tabpanel" style="min-height:670px; max-height:670px; ">
|
<div class="tab-pane" id="credit" role="tabpanel" style="min-height:670px; max-height:670px; ">
|
||||||
<h5><%= t :credit %> <%= t :details %></h5>
|
<h5><%= t :credit %> <%= t :details %></h5>
|
||||||
<table class="table table-responsive tbl_credit_lists">
|
<table class="table table-responsive tbl_credit_lists">
|
||||||
<thead>
|
<thead>
|
||||||
<th><%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %></th>
|
<th><%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %></th>
|
||||||
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||||
<th> <%= t :cashier %></th>
|
<th> <%= t :cashier %></th>
|
||||||
<th> <%= t("views.right_panel.detail.credit_amount") %> </th>
|
<th> <%= t("views.right_panel.detail.credit_amount") %> </th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -230,4 +240,3 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<% breadcrumb_add 'Queue', crm_dining_queues_path, dashboard_path, "Assign Queue #{@queue.queue_no}" %>
|
<div class="page-header">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= crm_dining_queues_path %>">Queue</a></li>
|
||||||
|
<li class="breadcrumb-item active">Assign Queue <%=@queue.queue_no%></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', root_path %>
|
||||||
|
</span>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Column One -->
|
<!-- Column One -->
|
||||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
<% breadcrumb_add t('queue'), "", dashboard_path %>
|
<div class="container-fluid">
|
||||||
|
<div class="page-header">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("en.queue") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', root_path %>
|
||||||
|
</span>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Column One -->
|
<!-- Column One -->
|
||||||
@@ -9,7 +18,7 @@
|
|||||||
<div class="body">
|
<div class="body">
|
||||||
<% if @dining_queues.count > 0 %>
|
<% if @dining_queues.count > 0 %>
|
||||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||||
|
|
||||||
<% @dining_queues.each do |queue| %>
|
<% @dining_queues.each do |queue| %>
|
||||||
<% if queue.status == "Assign"
|
<% if queue.status == "Assign"
|
||||||
@bg_color = "assign"
|
@bg_color = "assign"
|
||||||
@@ -42,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p>There is no queue Now !</p>
|
<p>There is no queue Now !</p>
|
||||||
@@ -58,25 +67,25 @@
|
|||||||
<h6><i class="material-icons md-18">view_headline QUEUE DETAILs</i> </h6>
|
<h6><i class="material-icons md-18">view_headline QUEUE DETAILs</i> </h6>
|
||||||
<p>
|
<p>
|
||||||
1) Latest Queue No - <%= @complete_queue.last.queue_no rescue 0 %> <br>
|
1) Latest Queue No - <%= @complete_queue.last.queue_no rescue 0 %> <br>
|
||||||
2) Next Queue No - <% @next = (@complete_queue.last.queue_no.to_i rescue 0) + 1%>
|
2) Next Queue No - <% @next = (@complete_queue.last.queue_no.to_i rescue 0) + 1%>
|
||||||
<%= @next rescue 0 %> <br>
|
<%= @next rescue 0 %> <br>
|
||||||
3) Today Completed Queue - <strong> <%= @complete_queue.count %> </strong><br>
|
3) Today Completed Queue - <strong> <%= @complete_queue.count %> </strong><br>
|
||||||
|
|
||||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||||
<p>
|
<p>
|
||||||
1) <%= t("views.right_panel.button.cancel") %>
|
1) <%= t("views.right_panel.button.cancel") %>
|
||||||
<%= t("views.right_panel.button.queue") %> -
|
<%= t("views.right_panel.button.queue") %> -
|
||||||
<%= t("views.right_panel.detail.cancel_btn_txt") %>
|
<%= t("views.right_panel.detail.cancel_btn_txt") %>
|
||||||
<%= t("views.right_panel.detail.queue_txt") %> <br>
|
<%= t("views.right_panel.detail.queue_txt") %> <br>
|
||||||
|
|
||||||
2) <%= t("views.btn.new") %>
|
2) <%= t("views.btn.new") %>
|
||||||
<%= t("views.right_panel.button.queue") %> -
|
<%= t("views.right_panel.button.queue") %> -
|
||||||
<%= t("views.right_panel.detail.create_btn_txt") %>
|
<%= t("views.right_panel.detail.create_btn_txt") %>
|
||||||
<%= t("views.right_panel.detail.queue_txt") %><br>
|
<%= t("views.right_panel.detail.queue_txt") %><br>
|
||||||
|
|
||||||
2) <%= t("views.btn.assign") %>
|
2) <%= t("views.btn.assign") %>
|
||||||
<%= t("views.right_panel.button.queue") %> -
|
<%= t("views.right_panel.button.queue") %> -
|
||||||
<%= t("views.right_panel.detail.assign_txt") %>
|
<%= t("views.right_panel.detail.assign_txt") %>
|
||||||
<%= t("views.right_panel.detail.queue_txt") %><br>
|
<%= t("views.right_panel.detail.queue_txt") %><br>
|
||||||
</p>
|
</p>
|
||||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||||
@@ -85,7 +94,7 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</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("views.btn.new"),new_crm_dining_queue_path,:class => 'btn bg-green btn-block btn-lg btn-block', 'data-no-turbolink' => true %>
|
<%= link_to t("views.btn.new"),new_crm_dining_queue_path,:class => 'btn bg-green btn-block btn-lg btn-block', 'data-no-turbolink' => true %>
|
||||||
@@ -157,4 +166,4 @@ function cancel_queue(id,url) {
|
|||||||
-moz-column-count: 4;
|
-moz-column-count: 4;
|
||||||
column-count: 4;
|
column-count: 4;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<%= render 'form', dining_queue: @dining_queue %>
|
<div class="page-header">
|
||||||
</div>
|
<ul class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= crm_dining_queues_path %>"><%= t("en.queue") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', crm_dining_queues_path %>
|
||||||
|
</span>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= render 'form', dining_queue: @dining_queue %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
<% breadcrumb_add t('inventory'), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t :inventory %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row ">
|
<div class="row ">
|
||||||
<div class="col-lg-4 col-md-4 col-sm-4" style="padding-left: 17px;">
|
<div class="col-lg-4 col-md-4 col-sm-4" style="padding-left: 17px;">
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
<% breadcrumb_add t('inventory'), '', inventory_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t :inventory %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
||||||
@@ -62,4 +71,4 @@
|
|||||||
<%= paginate @stock_journals %>
|
<%= paginate @stock_journals %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!-- <div class="page-header">
|
<!-- <div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= inventory_path %>"><%= t :inventory %></a></li>
|
<li class="breadcrumb-item"><a href="<%= inventory_path %>"><%= t :inventory %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.stock_check") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.stock_check") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
|
<%= link_to t('.back', :default => t("views.btn.back")), inventory_path %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%=inventory_stock_checks_path%>"></a><%= t("views.right_panel.detail.stock_check") %></li>
|
<li class="breadcrumb-item"><a href="<%=inventory_stock_checks_path%>"></a><%= t("views.right_panel.detail.stock_check") %></li>
|
||||||
<li class="breadcrumb-item active"><%= t :details %></li>
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -18,26 +18,10 @@
|
|||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<!-- <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a> -->
|
<!-- <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a> -->
|
||||||
<%if current_login_employee.role !="waiter" %>
|
<%if current_login_employee.role !="waiter" %>
|
||||||
<a href="javascript:void(0);" class="bars <%= display_none %>"></a>
|
<a href="javascript:void(0);" class="bars"></a>
|
||||||
<% if current_login_employee.role == "administrator" || current_login_employee.role == "manager" || current_login_employee.role == "account" %>
|
<a class="navbar-brand mbl_view" href="<%= root_path %>" style="margin-left: 20px;">
|
||||||
<a class="navbar-brand mbl_view" href="<%=dashboard_path%>" style="margin-left: 20px;">
|
|
||||||
<% elsif current_login_employee.role == "supervisor" %>
|
|
||||||
<a class="navbar-brand mbl_view" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
|
|
||||||
<% elsif current_login_employee.role == "cashier" || current_login_employee.role == "waiter"%>
|
|
||||||
<%if ShiftSale.current_open_shift(current_login_employee) %>
|
|
||||||
<%if current_login_employee.role == "cashier" && food_court %>
|
|
||||||
<a class="navbar-brand mbl_view" href="<%=foodcourt_food_court_path%>" style="margin-left: -10px;">
|
|
||||||
<%else%>
|
|
||||||
<a class="navbar-brand mbl_view" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
|
|
||||||
<%end%>
|
|
||||||
<%else%>
|
|
||||||
<a class="navbar-brand mbl_view" href="" style="margin-left: 20px;">
|
|
||||||
<%end%>
|
|
||||||
<%else%>
|
|
||||||
<a class="navbar-brand mbl_view" href="" style="margin-left: 20px;">
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<a class="navbar-brand m-0 mbl_view" href="<%= origami_dashboard_path%>">
|
<a class="navbar-brand m-0 mbl_view" href="<%= root_path %>">
|
||||||
<%end%>
|
<%end%>
|
||||||
<img src="<%= asset_path('SX-Logo-small.png') %>" width="40" height="40" alt="Logo", class="<%= display_none.present? ? 'm-0' : '' %>" />
|
<img src="<%= asset_path('SX-Logo-small.png') %>" width="40" height="40" alt="Logo", class="<%= display_none.present? ? 'm-0' : '' %>" />
|
||||||
<span class="navbar-brand-txt">SX Restaurant</span>
|
<span class="navbar-brand-txt">SX Restaurant</span>
|
||||||
@@ -55,7 +39,7 @@
|
|||||||
<div class="mr-4">
|
<div class="mr-4">
|
||||||
<a class="pt-2" href="<%= settings_out_of_stock_index_path %>">
|
<a class="pt-2" href="<%= settings_out_of_stock_index_path %>">
|
||||||
<i class="material-icons" style="margin:25%; color:white;">phonelink_erase</i>
|
<i class="material-icons" style="margin:25%; color:white;">phonelink_erase</i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<%end%>
|
<%end%>
|
||||||
<!-- End Shop Info -->
|
<!-- End Shop Info -->
|
||||||
@@ -131,7 +115,7 @@
|
|||||||
<!-- End Quick Access for Cashier -->
|
<!-- End Quick Access for Cashier -->
|
||||||
|
|
||||||
<!-- Start Delete confirrm text !-->
|
<!-- Start Delete confirrm text !-->
|
||||||
|
|
||||||
<div class="navbar-right toggle_mbl">
|
<div class="navbar-right toggle_mbl">
|
||||||
<a href="javascript:void(0);" class="dropdown-toggle waves-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
<a href="javascript:void(0);" class="dropdown-toggle waves-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||||
<% if current_login_employee %>
|
<% if current_login_employee %>
|
||||||
|
|||||||
@@ -324,6 +324,9 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= reports_void_sale_index_path %>">Void Sales</a>
|
<a href="<%= reports_void_sale_index_path %>">Void Sales</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="<%= reports_customer_index_path %>">Customer Sales</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= reports_waste_and_spoilage_index_path %>">Wastes & Spoilages</a>
|
<a href="<%= reports_waste_and_spoilage_index_path %>">Wastes & Spoilages</a>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<!-- <div class="page-header">
|
<!-- <div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
<li class="breadcrumb-item active">OQS</li>
|
<li class="breadcrumb-item active">OQS</li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', oqs_root_path %>
|
<%= link_to 'Back', oqs_root_path %>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<!-- <div class="container-fluid">
|
<!-- <div class="container-fluid">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
<li class="breadcrumb-item active">CRM</li> -->
|
<li class="breadcrumb-item active">CRM</li> -->
|
||||||
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
|
<!-- <li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li> -->
|
||||||
<!-- <span class="float-right">
|
<!-- <span class="float-right">
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
</span>
|
</span>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||||
<td>
|
<td>
|
||||||
<% if crm_customer.customer_id != "" && crm_customer.customer_id != "" %>
|
<% if crm_customer.customer_id != "" && crm_customer.customer_id != "" %>
|
||||||
<%= @i += 1 %>
|
<%= @i += 1 %>
|
||||||
<%else%>
|
<%else%>
|
||||||
-
|
-
|
||||||
@@ -354,12 +354,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="sxModal">
|
<div id="sxModal">
|
||||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
||||||
<div class="m-r-20" align="right">
|
<div class="m-r-20" align="right">
|
||||||
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
|
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -368,6 +368,8 @@
|
|||||||
var page = "<%= @page %>";
|
var page = "<%= @page %>";
|
||||||
var paypar_account_no = [];
|
var paypar_account_no = [];
|
||||||
$(function() {
|
$(function() {
|
||||||
|
setHeaderBreadCrumb(_CUSTOMERS_);
|
||||||
|
|
||||||
paypar_account_no = JSON.parse('<%= @paypar_accountno.to_json.html_safe %>', function (key, value) {
|
paypar_account_no = JSON.parse('<%= @paypar_accountno.to_json.html_safe %>', function (key, value) {
|
||||||
var type;
|
var type;
|
||||||
if (value && typeof value === 'object') {
|
if (value && typeof value === 'object') {
|
||||||
@@ -378,7 +380,7 @@
|
|||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
});
|
});
|
||||||
console.log(paypar_account_no);
|
|
||||||
/* check webview loaded*/
|
/* check webview loaded*/
|
||||||
var webview = <%= @webview %>;
|
var webview = <%= @webview %>;
|
||||||
showHideNavbar(webview);
|
showHideNavbar(webview);
|
||||||
@@ -396,55 +398,15 @@
|
|||||||
$("#paypar_account_no").on('focus', function(e){
|
$("#paypar_account_no").on('focus', function(e){
|
||||||
if($(this).val() == ''){
|
if($(this).val() == ''){
|
||||||
$("#sxModal").show();
|
$("#sxModal").show();
|
||||||
setTimeout(function(){
|
getCardNo();
|
||||||
getCardNo();
|
|
||||||
},100);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
setHeaderBreadCrumb(_CUSTOMERS_);
|
|
||||||
|
|
||||||
});
|
|
||||||
// Read Card Reader
|
// Read Card Reader
|
||||||
$("#member_acc_no").on('click', function(e){
|
$("#member_acc_no").on('click', function(e){
|
||||||
localStorage.setItem("member_card",true);
|
localStorage.setItem("member_card",true);
|
||||||
var cardNo = "";
|
|
||||||
var customer_id = '';
|
|
||||||
var customer_name = '';
|
|
||||||
var sale_id = $("#sale_id").val() || 0;
|
|
||||||
var customer_mamber_card_no = 0;
|
|
||||||
$("#sxModal").show();
|
$("#sxModal").show();
|
||||||
setTimeout(function(){
|
getCardNo();
|
||||||
getCardNo();
|
|
||||||
customer_mamber_card_no = $("#search").val();
|
|
||||||
|
|
||||||
if(sale_id != 0 && customer_mamber_card_no != 0){
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "/origami/"+sale_id+"/get_customer" ,
|
|
||||||
data: { filter : customer_mamber_card_no ,type :"card"},
|
|
||||||
dataType: "json",
|
|
||||||
success: function(data) {
|
|
||||||
if (data[0].customer_id == false) {
|
|
||||||
swal("Alert!", data[0].message, "error");
|
|
||||||
// $.alert({
|
|
||||||
// title: 'Alert!',
|
|
||||||
// content: data[0].message,
|
|
||||||
// type: 'red',
|
|
||||||
// typeAnimated: true,
|
|
||||||
// btnClass: 'btn-danger',
|
|
||||||
// });
|
|
||||||
}else{
|
|
||||||
customer_id = data[0].customer_id;
|
|
||||||
customer_name = data[0].name;
|
|
||||||
update_sale(customer_id, customer_name,sale_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},100);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/*new customer UI func:*/
|
/*new customer UI func:*/
|
||||||
@@ -453,7 +415,6 @@
|
|||||||
|
|
||||||
//Wizard
|
//Wizard
|
||||||
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
|
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
|
||||||
|
|
||||||
var $target = $(e.target);
|
var $target = $(e.target);
|
||||||
|
|
||||||
if ($target.parent().hasClass('disabled')) {
|
if ($target.parent().hasClass('disabled')) {
|
||||||
@@ -467,6 +428,7 @@
|
|||||||
nextTab($active);
|
nextTab($active);
|
||||||
$('.wizard .nav-tabs li.active .connecting-line').css({"border-bottom-left-radius": 0, "border-top-left-radius": 0});
|
$('.wizard .nav-tabs li.active .connecting-line').css({"border-bottom-left-radius": 0, "border-top-left-radius": 0});
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".prev-step").click(function (e) {
|
$(".prev-step").click(function (e) {
|
||||||
|
|
||||||
var $active = $('.wizard .nav-tabs li a.active');
|
var $active = $('.wizard .nav-tabs li a.active');
|
||||||
@@ -478,17 +440,19 @@
|
|||||||
|
|
||||||
/*customer UI tab btn*/
|
/*customer UI tab btn*/
|
||||||
function nextTab(elem) {
|
function nextTab(elem) {
|
||||||
$(elem).parent().next().find('a[data-toggle="tab"]').click();
|
$(elem).parent().next().find('a[data-toggle="tab"]').click();
|
||||||
}
|
}
|
||||||
function prevTab(elem) {
|
function prevTab(elem) {
|
||||||
$(elem).parent().prev().find('a[data-toggle="tab"]').click();
|
$(elem).parent().prev().find('a[data-toggle="tab"]').click();
|
||||||
}
|
}
|
||||||
/*customer UI tab btn*/
|
/*customer UI tab btn*/
|
||||||
|
|
||||||
|
|
||||||
// Read NFC card no from java
|
// Read NFC card no from java
|
||||||
function getCardNo(){
|
function getCardNo(){
|
||||||
code2lab.readNFC();
|
if (typeof code2lab != 'undefined') {
|
||||||
|
code2lab.readNFC();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get CardNo from Java
|
// get CardNo from Java
|
||||||
@@ -499,6 +463,7 @@
|
|||||||
$("#paypar_account_no").val(cardNo);
|
$("#paypar_account_no").val(cardNo);
|
||||||
$("#search").val(cardNo);
|
$("#search").val(cardNo);
|
||||||
$("#type").val("card");
|
$("#type").val("card");
|
||||||
|
get_customer();
|
||||||
}else{
|
}else{
|
||||||
if($.inArray(cardNo, paypar_account_no) !== -1){
|
if($.inArray(cardNo, paypar_account_no) !== -1){
|
||||||
swal({
|
swal({
|
||||||
@@ -520,47 +485,76 @@
|
|||||||
}
|
}
|
||||||
$("#sxModal").hide();
|
$("#sxModal").hide();
|
||||||
}
|
}
|
||||||
|
$("#sxModal").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_customer() {
|
||||||
|
var cardNo = "";
|
||||||
|
var customer_id = '';
|
||||||
|
var customer_name = '';
|
||||||
|
var sale_id = $("#sale_id").val() || 0;
|
||||||
|
var customer_mamber_card_no = $("#search").val();
|
||||||
|
|
||||||
|
if(sale_id != 0 && customer_mamber_card_no != 0){
|
||||||
|
$('#loading_wrapper').show();
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/origami/"+sale_id+"/get_customer" ,
|
||||||
|
data: { filter : customer_mamber_card_no ,type :"card"},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data) {
|
||||||
|
if (data[0].customer_id == false) {
|
||||||
|
swal("Alert!", data[0].message, "error");
|
||||||
|
}else{
|
||||||
|
customer_id = data[0].customer_id;
|
||||||
|
customer_name = data[0].name;
|
||||||
|
update_sale(customer_id, customer_name,sale_id);
|
||||||
|
}
|
||||||
|
$('#loading_wrapper').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QR Code Reader
|
// QR Code Reader
|
||||||
$("#qr_code").on('click', function(e){
|
$("#qr_code").on('click', function(e){
|
||||||
var code = "";
|
var code = "";
|
||||||
var customer_id = '';
|
var customer_id = '';
|
||||||
var customer_name = '';
|
var customer_name = '';
|
||||||
var sale_id = $("#sale_id").val() || 0;
|
var sale_id = $("#sale_id").val() || 0;
|
||||||
var customer_mamber_card_no = 0;
|
var customer_mamber_card_no = 0;
|
||||||
|
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
code=getQRCode();
|
code=getQRCode();
|
||||||
setQRCode(code);
|
setQRCode(code);
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
customer_mamber_card_no = $("#search").val();
|
customer_mamber_card_no = $("#search").val();
|
||||||
|
|
||||||
if(sale_id != 0 && customer_mamber_card_no != 0){
|
if(sale_id != 0 && customer_mamber_card_no != 0){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "/origami/"+sale_id+"/get_customer" ,
|
url: "/origami/"+sale_id+"/get_customer" ,
|
||||||
data: { filter : customer_mamber_card_no ,type :"card"},
|
data: { filter : customer_mamber_card_no ,type :"card"},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if (data[0].customer_id == false) {
|
if (data[0].customer_id == false) {
|
||||||
swal("Alert!", data[0].message, "error");
|
swal("Alert!", data[0].message, "error");
|
||||||
// $.alert({
|
// $.alert({
|
||||||
// title: 'Alert!',
|
// title: 'Alert!',
|
||||||
// content: data[0].message,
|
// content: data[0].message,
|
||||||
// type: 'red',
|
// type: 'red',
|
||||||
// typeAnimated: true,
|
// typeAnimated: true,
|
||||||
// btnClass: 'btn-danger',
|
// btnClass: 'btn-danger',
|
||||||
// });
|
// });
|
||||||
}else{
|
}else{
|
||||||
customer_id = data[0].customer_id;
|
customer_id = data[0].customer_id;
|
||||||
customer_name = data[0].name;
|
customer_name = data[0].name;
|
||||||
update_sale(customer_id, customer_name,sale_id);
|
update_sale(customer_id, customer_name,sale_id);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Read qrcode from java
|
// Read qrcode from java
|
||||||
@@ -575,81 +569,75 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click',".customer_tr",function(){
|
$(document).on('click',".customer_tr",function(){
|
||||||
// if(this.checked){
|
$(this).closest('tr').find('.checkbox_check').prop( "checked", true );
|
||||||
$(this).closest('tr').find('.checkbox_check').prop( "checked", true );
|
var sale_id = $("#sale_id").val() || 0;
|
||||||
var sale_id = $("#sale_id").val() || 0;
|
var customer_id = $(this).attr('data-ref');
|
||||||
var customer_id = $(this).attr('data-ref');
|
var customer_name = $(this).children("td:nth-child(3)").text();
|
||||||
var customer_name = $(this).children("td:nth-child(3)").text();
|
|
||||||
console.log(sale_id);
|
|
||||||
if(sale_id != 0){
|
|
||||||
// var url = "/"+customer_id;
|
|
||||||
update_sale(customer_id, customer_name,sale_id);
|
|
||||||
}else{
|
|
||||||
|
|
||||||
var url = "customers/"+customer_id;
|
if(sale_id != 0){
|
||||||
}
|
update_sale(customer_id, customer_name,sale_id);
|
||||||
|
}else{
|
||||||
|
var url = "customers/"+customer_id;
|
||||||
|
}
|
||||||
|
|
||||||
// Need To Clean?
|
// Need To Clean?
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: url,
|
url: url,
|
||||||
data: {},
|
data: {},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var taxes = JSON.stringify(data.tax_profiles);
|
var taxes = JSON.stringify(data.tax_profiles);
|
||||||
var parse_taxes = JSON.parse(taxes);
|
var parse_taxes = JSON.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");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#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);
|
||||||
$('#customer_contact_no').val(data.contact_no);
|
$('#customer_contact_no').val(data.contact_no);
|
||||||
$('#customer_email').val(data.email);
|
$('#customer_email').val(data.email);
|
||||||
$('#customer_date_of_birth').val(data.date_of_birth);
|
$('#customer_date_of_birth').val(data.date_of_birth);
|
||||||
$('#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_card_no').val(data.card_no);
|
||||||
$('#customer_type').val(data.customer_type);
|
$('#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);
|
||||||
|
|
||||||
if (data.gender == 'Male') {
|
if (data.gender == 'Male') {
|
||||||
$('.male').prop( "checked", true )
|
$('.male').prop( "checked", true )
|
||||||
}else{
|
}else{
|
||||||
$('.female').prop( "checked", true )
|
$('.female').prop( "checked", true )
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.salutation == 'Mr') {
|
if (data.salutation == 'Mr') {
|
||||||
$('.mr').prop( "checked", true )
|
$('.mr').prop( "checked", true )
|
||||||
} else if(data.salutation == 'Miss') {
|
} else if(data.salutation == 'Miss') {
|
||||||
$('.miss').prop( "checked", true )
|
$('.miss').prop( "checked", true )
|
||||||
}else if(data.salutation == 'Mrs'){
|
}else if(data.salutation == 'Mrs'){
|
||||||
$('.mrs').prop( "checked", true )
|
$('.mrs').prop( "checked", true )
|
||||||
}else{
|
}else{
|
||||||
$('.mdm').prop( "checked", true )
|
$('.mdm').prop( "checked", true )
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#update_customer').removeAttr('disabled').val('');
|
$('#update_customer').removeAttr('disabled').val('');
|
||||||
$('#update_customer').attr('value', 'Update');
|
$('#update_customer').attr('value', 'Update');
|
||||||
// $('#submit_customer').attr('disabled','disabled');
|
// $('#submit_customer').attr('disabled','disabled');
|
||||||
|
|
||||||
$("#new_customer").attr('class', 'simple_form edit_customer');
|
$("#new_customer").attr('class', 'simple_form edit_customer');
|
||||||
var id = "edit_customer_"+$('#customer_id').val();
|
var id = "edit_customer_"+$('#customer_id').val();
|
||||||
$("#new_customer").attr('id', id);
|
$("#new_customer").attr('id', id);
|
||||||
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
|
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
|
||||||
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
|
$(".edit_customer").attr('action', '/crm/customers/' + $('#customer_id').val());
|
||||||
$(".patch_method").append('<input type="hidden" name="_method" value="patch">');
|
$(".patch_method").append('<input type="hidden" name="_method" value="patch">');
|
||||||
//$(".edit_customer").attr('method', 'PATCH');
|
//$(".edit_customer").attr('method', 'PATCH');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// }else{
|
})
|
||||||
|
|
||||||
// }
|
|
||||||
})
|
|
||||||
|
|
||||||
function update_sale(customer_id, customer_name, sale_id) {
|
function update_sale(customer_id, customer_name, sale_id) {
|
||||||
var customer="";
|
var customer="";
|
||||||
|
|||||||
@@ -106,19 +106,14 @@
|
|||||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||||
<button type="button" class="btn bg-default m-t-10 btn-lg btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/<%= @cashier_type %>/payment/others_payment';"> <i class="material-icons m-t--5">reply</i>Back </button>
|
<button type="button" class="btn bg-default m-t-10 btn-lg btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/<%= @cashier_type %>/payment/others_payment';"> <i class="material-icons m-t--5">reply</i>Back </button>
|
||||||
</div>
|
</div>
|
||||||
<div id="sxModal">
|
|
||||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
|
||||||
<div class="m-r-20" align="right">
|
|
||||||
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="sxModal">
|
|
||||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
<div id="sxModal">
|
||||||
<div class="m-r-20" align="right">
|
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
||||||
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
|
<div class="m-r-20" align="right">
|
||||||
</div>
|
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- customer light box -->
|
<!-- customer light box -->
|
||||||
@@ -145,10 +140,10 @@
|
|||||||
<div class="modal-footer"></div>
|
<div class="modal-footer"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var cashier_type = "<%= @cashier_type %>";
|
var cashier_type = "<%= @cashier_type %>";
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
setHeaderBreadCrumb(_DINGA_);
|
setHeaderBreadCrumb(_DINGA_);
|
||||||
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
||||||
@@ -251,75 +246,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Read Card Reader
|
// Read Card Reader
|
||||||
$(".btn_member").on('click', function(){
|
$(".btn_member").on('click', function(){
|
||||||
var cardNo = "";
|
|
||||||
var customer_id = '';
|
|
||||||
var customer_name = '';
|
|
||||||
var membership_id = '';
|
|
||||||
var membership_type = '';
|
|
||||||
var sale_id = $("#sale_id").text() || 0;
|
|
||||||
var receipt_no = $("#receipt_no").text() || 0;
|
|
||||||
var customer_mamber_card_no = 0;
|
|
||||||
|
|
||||||
$("#is_paymemberModal").hide();
|
$("#is_paymemberModal").hide();
|
||||||
$("#sxModal").show();
|
$("#sxModal").show();
|
||||||
setTimeout(function(){
|
getCardNo();
|
||||||
getCardNo();
|
|
||||||
customer_mamber_card_no = $("#paypar_account_no").val();
|
|
||||||
|
|
||||||
if(sale_id != 0 && customer_mamber_card_no != 0){
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "/origami/"+sale_id+"/send_account" ,
|
|
||||||
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
|
|
||||||
dataType: "json",
|
|
||||||
success: function(data) {
|
|
||||||
console.log(data)
|
|
||||||
if (data.status == true) {
|
|
||||||
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
|
|
||||||
$("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "<%=origami_payment_dinga_path%>",
|
|
||||||
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no :customer_mamber_card_no},
|
|
||||||
success: function(result){
|
|
||||||
console.log(result)
|
|
||||||
if(result.status == true){
|
|
||||||
swal({
|
|
||||||
title: "Information!",
|
|
||||||
text: result.message,
|
|
||||||
html: true,
|
|
||||||
closeOnConfirm: false,
|
|
||||||
closeOnCancel: false,
|
|
||||||
allowOutsideClick: false
|
|
||||||
}, function () {
|
|
||||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
|
|
||||||
});
|
|
||||||
|
|
||||||
}else{
|
|
||||||
swal ( "Opps",result.message ,"warning" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
swal({
|
|
||||||
title: 'Oops',
|
|
||||||
text: data.message.toString(),
|
|
||||||
type: 'error',
|
|
||||||
html: true,
|
|
||||||
closeOnConfirm: false,
|
|
||||||
closeOnCancel: false,
|
|
||||||
allowOutsideClick: false
|
|
||||||
}, function () {
|
|
||||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/DINGA";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},100);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Read NFC card no from java
|
// Read NFC card no from java
|
||||||
@@ -331,22 +261,85 @@
|
|||||||
function setCardNo(cardNo){
|
function setCardNo(cardNo){
|
||||||
if(cardNo.length == 16){
|
if(cardNo.length == 16){
|
||||||
$("#paypar_account_no").val(cardNo);
|
$("#paypar_account_no").val(cardNo);
|
||||||
$("#sxModal").hide();
|
send_account();
|
||||||
}
|
}
|
||||||
|
$("#sxModal").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function send_account() {
|
||||||
|
var cardNo = "";
|
||||||
|
var customer_id = '';
|
||||||
|
var customer_name = '';
|
||||||
|
var membership_id = '';
|
||||||
|
var membership_type = '';
|
||||||
|
var sale_id = $("#sale_id").text() || 0;
|
||||||
|
var receipt_no = $("#receipt_no").text() || 0;
|
||||||
|
var customer_mamber_card_no = $("#paypar_account_no").val();
|
||||||
|
|
||||||
|
if(sale_id != 0 && customer_mamber_card_no != 0){
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/origami/"+sale_id+"/send_account" ,
|
||||||
|
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data) {
|
||||||
|
console.log(data)
|
||||||
|
if (data.status == true) {
|
||||||
|
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
|
||||||
|
$("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<%=origami_payment_dinga_path%>",
|
||||||
|
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no :customer_mamber_card_no},
|
||||||
|
success: function(result){
|
||||||
|
console.log(result)
|
||||||
|
if(result.status == true){
|
||||||
|
swal({
|
||||||
|
title: "Information!",
|
||||||
|
text: result.message,
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
|
||||||
|
});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
swal ( "Opps",result.message ,"warning" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
swal({
|
||||||
|
title: 'Oops',
|
||||||
|
text: data.message.toString(),
|
||||||
|
type: 'error',
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/DINGA";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QR Code Reader
|
// QR Code Reader
|
||||||
$(".btn_qr_code").on('click', function(e){
|
$(".btn_qr_code").on('click', function(e){
|
||||||
$("#is_memberModal").hide();
|
$("#is_memberModal").hide();
|
||||||
var code = "";
|
var code = "";
|
||||||
var customer_id = '';
|
var customer_id = '';
|
||||||
var customer_name = '';
|
var customer_name = '';
|
||||||
var membership_id = '';
|
var membership_id = '';
|
||||||
var membership_type = '';
|
var membership_type = '';
|
||||||
var receipt_no = $("#receipt_no").text() || 0;
|
var receipt_no = $("#receipt_no").text() || 0;
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
code=getQRCode();
|
code=getQRCode();
|
||||||
if(sale_id != 0 && code != ""){
|
if(sale_id != 0 && code != ""){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "/origami/"+sale_id+"/send_account" ,
|
url: "/origami/"+sale_id+"/send_account" ,
|
||||||
@@ -394,15 +387,15 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},100);
|
},100);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Read qrcode from java
|
// Read qrcode from java
|
||||||
function getQRCode(){
|
function getQRCode(){
|
||||||
return code2lab.readQRCode();
|
return code2lab.readQRCode();
|
||||||
$("#qr_code").val(code);
|
$("#qr_code").val(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_sale(membership_id, customer_id, customer_name, sale_id) {
|
function update_sale(membership_id, customer_id, customer_name, sale_id) {
|
||||||
@@ -437,7 +430,7 @@
|
|||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,11 +110,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="sxModal">
|
<div id="sxModal">
|
||||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
||||||
<div class="m-r-20" align="right">
|
<div class="m-r-20" align="right">
|
||||||
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
|
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- customer light box -->
|
<!-- customer light box -->
|
||||||
@@ -141,10 +141,10 @@
|
|||||||
<div class="modal-footer"></div>
|
<div class="modal-footer"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var cashier_type = "<%= @cashier_type %>";
|
var cashier_type = "<%= @cashier_type %>";
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
setHeaderBreadCrumb(_PAYMAL_);
|
setHeaderBreadCrumb(_PAYMAL_);
|
||||||
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
||||||
@@ -247,75 +247,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Read Card Reader
|
// Read Card Reader
|
||||||
$(".btn_member").on('click', function(){
|
$(".btn_member").on('click', function(){
|
||||||
var cardNo = "";
|
|
||||||
var sale_id = $("#sale_id").text() || 0;
|
|
||||||
var receipt_no = $("#receipt_no").val() || "";
|
|
||||||
|
|
||||||
var customer_mamber_card_no = 0;
|
|
||||||
var payment_amount = parseFloat($("#used_amount").text());
|
|
||||||
|
|
||||||
$("#is_paymemberModal").hide();
|
$("#is_paymemberModal").hide();
|
||||||
$("#sxModal").show();
|
$("#sxModal").show();
|
||||||
setTimeout(function(){
|
getCardNo();
|
||||||
getCardNo();
|
|
||||||
customer_mamber_card_no = $("#paypar_account_no").val();
|
|
||||||
if (customer_mamber_card_no == 0) {
|
|
||||||
customer_mamber_card_no = $("#membership_id").text() || 0;
|
|
||||||
}
|
|
||||||
if(sale_id != 0 && customer_mamber_card_no !=0){
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "/origami/"+sale_id+"/send_account" ,
|
|
||||||
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
|
|
||||||
dataType: "json",
|
|
||||||
success: function(data) {
|
|
||||||
if (data.status == true) {
|
|
||||||
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
|
|
||||||
$("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "<%=origami_payment_paymal_path%>",
|
|
||||||
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:customer_mamber_card_no},
|
|
||||||
success: function(result){
|
|
||||||
if(result.status == true){
|
|
||||||
swal({
|
|
||||||
title: "Information!",
|
|
||||||
text: result.message,
|
|
||||||
html: true,
|
|
||||||
closeOnConfirm: false,
|
|
||||||
closeOnCancel: false,
|
|
||||||
allowOutsideClick: false
|
|
||||||
}, function () {
|
|
||||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
|
|
||||||
});
|
|
||||||
|
|
||||||
}else{
|
|
||||||
swal ( "Opps",result.message ,"warning" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
swal({
|
|
||||||
title: 'Oops',
|
|
||||||
text: data.message.toString(),
|
|
||||||
type: 'error',
|
|
||||||
html: true,
|
|
||||||
closeOnConfirm: false,
|
|
||||||
closeOnCancel: false,
|
|
||||||
allowOutsideClick: false
|
|
||||||
}, function () {
|
|
||||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/PAYMAL";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
swal("Opp","Please Check Member","warning")
|
|
||||||
}
|
|
||||||
},100);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Read NFC card no from java
|
// Read NFC card no from java
|
||||||
@@ -327,20 +262,85 @@
|
|||||||
function setCardNo(cardNo){
|
function setCardNo(cardNo){
|
||||||
if(cardNo.length == 16){
|
if(cardNo.length == 16){
|
||||||
$("#paypar_account_no").val(cardNo);
|
$("#paypar_account_no").val(cardNo);
|
||||||
$("#sxModal").hide();
|
$("#sxModal").hide();
|
||||||
}
|
}
|
||||||
|
$("#sxModal").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function send_account() {
|
||||||
|
var cardNo = "";
|
||||||
|
var sale_id = $("#sale_id").text() || 0;
|
||||||
|
var receipt_no = $("#receipt_no").val() || "";
|
||||||
|
var payment_amount = parseFloat($("#used_amount").text());
|
||||||
|
var customer_mamber_card_no = $("#paypar_account_no").val();
|
||||||
|
|
||||||
|
if (customer_mamber_card_no == 0) {
|
||||||
|
customer_mamber_card_no = $("#membership_id").text() || 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sale_id != 0 && customer_mamber_card_no !=0){
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/origami/"+sale_id+"/send_account" ,
|
||||||
|
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data) {
|
||||||
|
if (data.status == true) {
|
||||||
|
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
|
||||||
|
$("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<%=origami_payment_paymal_path%>",
|
||||||
|
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:customer_mamber_card_no},
|
||||||
|
success: function(result){
|
||||||
|
if(result.status == true){
|
||||||
|
swal({
|
||||||
|
title: "Information!",
|
||||||
|
text: result.message,
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
|
||||||
|
});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
swal ( "Opps",result.message ,"warning" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
swal({
|
||||||
|
title: 'Oops',
|
||||||
|
text: data.message.toString(),
|
||||||
|
type: 'error',
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment/others_payment/PAYMAL";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
swal("Opp","Please Check Member","warning")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QR Code Reader
|
// QR Code Reader
|
||||||
$(".btn_qr_code").on('click', function(e){
|
$(".btn_qr_code").on('click', function(e){
|
||||||
$("#is_paymemberModal").hide();
|
$("#is_paymemberModal").hide();
|
||||||
var code = "";
|
var code = "";
|
||||||
var sale_id = $("#sale_id").text() || 0;
|
var sale_id = $("#sale_id").text() || 0;
|
||||||
var receipt_no = $("#receipt_no").val() || "";
|
var receipt_no = $("#receipt_no").val() || "";
|
||||||
var payment_amount = parseFloat($("#used_amount").text());
|
var payment_amount = parseFloat($("#used_amount").text());
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
code=getQRCode();
|
code=getQRCode();
|
||||||
if(sale_id != 0 && code != ""){
|
if(sale_id != 0 && code != ""){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "/origami/"+sale_id+"/send_account" ,
|
url: "/origami/"+sale_id+"/send_account" ,
|
||||||
@@ -387,15 +387,15 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},100);
|
},100);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Read qrcode from java
|
// Read qrcode from java
|
||||||
function getQRCode(){
|
function getQRCode(){
|
||||||
return code2lab.readQRCode();
|
return code2lab.readQRCode();
|
||||||
$("#qr_code").val(code);
|
$("#qr_code").val(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#sxModal .btn_cancel").on('click',function(){
|
$("#sxModal .btn_cancel").on('click',function(){
|
||||||
|
|||||||
@@ -1109,42 +1109,9 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
// Read Card Reader
|
// Read Card Reader
|
||||||
$(".btn_member").on('click', function(){
|
$(".btn_member").on('click', function(){
|
||||||
var cardNo = "";
|
|
||||||
var customer_id = '';
|
|
||||||
var customer_name = '';
|
|
||||||
var membership_id = '';
|
|
||||||
var membership_type = '';
|
|
||||||
var sale_id = $("#sale_id").text() || 0;
|
|
||||||
var customer_mamber_card_no = 0;
|
|
||||||
|
|
||||||
$("#is_memberModal").hide();
|
$("#is_memberModal").hide();
|
||||||
$("#sxModal").show();
|
$("#sxModal").show();
|
||||||
setTimeout(function(){
|
getCardNo();
|
||||||
getCardNo();
|
|
||||||
$("#sxModal").hide();
|
|
||||||
customer_mamber_card_no = $("#paypar_account_no").val();
|
|
||||||
|
|
||||||
if(sale_id != 0 && customer_mamber_card_no != 0){
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "/origami/"+sale_id+"/get_customer" ,
|
|
||||||
data: { filter : customer_mamber_card_no ,type :"card"},
|
|
||||||
dataType: "json",
|
|
||||||
success: function(data) {
|
|
||||||
if (data[0].customer_id == false) {
|
|
||||||
swal("Alert!", data[0].message, "error");
|
|
||||||
}else{
|
|
||||||
customer_id = data[0].customer_id;
|
|
||||||
customer_name = data[0].name;
|
|
||||||
membership_id = data[0].membership_id;
|
|
||||||
membership_type = data[0].membership_type;
|
|
||||||
update_sale(membership_id, customer_id, customer_name,sale_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},100);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Read NFC card no from java
|
// Read NFC card no from java
|
||||||
@@ -1158,6 +1125,132 @@ $(document).ready(function(){
|
|||||||
function setCardNo(cardNo){
|
function setCardNo(cardNo){
|
||||||
if(cardNo.length == 16){
|
if(cardNo.length == 16){
|
||||||
$("#paypar_account_no").val(cardNo);
|
$("#paypar_account_no").val(cardNo);
|
||||||
|
if (cashier_type == "food_court") {
|
||||||
|
send_account();
|
||||||
|
} else {
|
||||||
|
get_customer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$("#sxModal").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_customer() {
|
||||||
|
var cardNo = "";
|
||||||
|
var customer_id = '';
|
||||||
|
var customer_name = '';
|
||||||
|
var membership_id = '';
|
||||||
|
var membership_type = '';
|
||||||
|
var sale_id = $("#sale_id").text() || 0;
|
||||||
|
var customer_mamber_card_no = $("#paypar_account_no").val();
|
||||||
|
|
||||||
|
if(sale_id != 0 && customer_mamber_card_no != 0){
|
||||||
|
$('#loading_wrapper').show();
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/origami/"+sale_id+"/get_customer" ,
|
||||||
|
data: { filter : customer_mamber_card_no ,type :"card"},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data) {
|
||||||
|
if (data[0].customer_id == false) {
|
||||||
|
swal("Alert!", data[0].message, "error");
|
||||||
|
}else{
|
||||||
|
customer_id = data[0].customer_id;
|
||||||
|
customer_name = data[0].name;
|
||||||
|
membership_id = data[0].membership_id;
|
||||||
|
membership_type = data[0].membership_type;
|
||||||
|
update_sale(membership_id, customer_id, customer_name,sale_id);
|
||||||
|
}
|
||||||
|
$('#loading_wrapper').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function send_account() {
|
||||||
|
var cardNo = "";
|
||||||
|
var sale_id = $("#sale_id").text() || 0;
|
||||||
|
var receipt_no = "";
|
||||||
|
|
||||||
|
if(($("#receipt_no").html()!=undefined) && ($("#receipt_no").html()!="")){
|
||||||
|
receipt_no = ($("#receipt_no").html()).trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
var payment_amount = parseFloat($("#grand_total").text());
|
||||||
|
|
||||||
|
var customer_mamber_card_no = $("#paypar_account_no").val();
|
||||||
|
if (customer_mamber_card_no == 0) {
|
||||||
|
customer_mamber_card_no = $("#membership_id").text() || 0;
|
||||||
|
}
|
||||||
|
if(sale_id != 0 && customer_mamber_card_no !=0){
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/origami/"+sale_id+"/send_account" ,
|
||||||
|
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data) {
|
||||||
|
if (data.status == true) {
|
||||||
|
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
|
||||||
|
// $("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<%=origami_payment_paymal_path%>",
|
||||||
|
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:customer_mamber_card_no},
|
||||||
|
success: function(result){
|
||||||
|
if(result.status == true){
|
||||||
|
swal({
|
||||||
|
title: "Information!",
|
||||||
|
text: result.message,
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
|
||||||
|
});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
swal({
|
||||||
|
title: 'Oops',
|
||||||
|
text: result.message,
|
||||||
|
type: 'warning',
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
swal({
|
||||||
|
title: 'Oops',
|
||||||
|
text: data.message.toString(),
|
||||||
|
type: 'error',
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
swal({
|
||||||
|
title: 'Oops',
|
||||||
|
text: 'Please Check Member',
|
||||||
|
type: 'warning',
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1216,6 +1309,7 @@ $(document).ready(function(){
|
|||||||
cancelButtonClass: 'btn btn-danger',
|
cancelButtonClass: 'btn btn-danger',
|
||||||
closeOnConfirm: false,
|
closeOnConfirm: false,
|
||||||
}, function () {
|
}, function () {
|
||||||
|
$('#loading_wrapper').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "/origami/"+sale_id+"/"+cashier_type+"/customers/update_sale" ,
|
url: "/origami/"+sale_id+"/"+cashier_type+"/customers/update_sale" ,
|
||||||
@@ -1511,104 +1605,15 @@ $(document).ready(function(){
|
|||||||
$("#customer_name").on("click",function(){
|
$("#customer_name").on("click",function(){
|
||||||
//start customer modal popup
|
//start customer modal popup
|
||||||
if((cashier_type=='quick_service' || cashier_type=='food_court') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
|
if((cashier_type=='quick_service' || cashier_type=='food_court') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
|
||||||
|
|
||||||
$("#is_memberModal").modal({show : true, backdrop: false, keyboard : false});
|
$("#is_memberModal").modal({show : true, backdrop: false, keyboard : false});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Read Card Reader - Paymal payment for FoodCourt
|
// Read Card Reader - Paymal payment for FoodCourt
|
||||||
$(".btn_paymal_member").on('click', function (){
|
$(".btn_paymal_member").on('click', function (){
|
||||||
var cardNo = "";
|
|
||||||
var sale_id = $("#sale_id").text() || 0;
|
|
||||||
var receipt_no = "";
|
|
||||||
if(($("#receipt_no").html()!=undefined) && ($("#receipt_no").html()!="")){
|
|
||||||
receipt_no = ($("#receipt_no").html()).trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
var customer_mamber_card_no = 0;
|
|
||||||
var payment_amount = parseFloat($("#grand_total").text());
|
|
||||||
|
|
||||||
$("#is_paymemberModal").hide();
|
$("#is_paymemberModal").hide();
|
||||||
$("#sxModal").show();
|
$("#sxModal").show();
|
||||||
setTimeout(function(){
|
getCardNo();
|
||||||
getCardNo();
|
|
||||||
$("#sxModal").hide();
|
|
||||||
customer_mamber_card_no = $("#paypar_account_no").val();
|
|
||||||
if (customer_mamber_card_no == 0) {
|
|
||||||
customer_mamber_card_no = $("#membership_id").text() || 0;
|
|
||||||
}
|
|
||||||
if(sale_id != 0 && customer_mamber_card_no !=0){
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "/origami/"+sale_id+"/send_account" ,
|
|
||||||
data: { account_no : customer_mamber_card_no, amount : payment_amount, receipt_no : receipt_no},
|
|
||||||
dataType: "json",
|
|
||||||
success: function(data) {
|
|
||||||
if (data.status == true) {
|
|
||||||
var valid_amount = parseFloat(data.old_balance_amount) - parseFloat(data.reload_amount);
|
|
||||||
// $("#valid_amount").val((valid_amount > 0) ? parseFloat(valid_amount) : 0);
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: "<%=origami_payment_paymal_path%>",
|
|
||||||
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:customer_mamber_card_no},
|
|
||||||
success: function(result){
|
|
||||||
if(result.status == true){
|
|
||||||
swal({
|
|
||||||
title: "Information!",
|
|
||||||
text: result.message,
|
|
||||||
html: true,
|
|
||||||
closeOnConfirm: false,
|
|
||||||
closeOnCancel: false,
|
|
||||||
allowOutsideClick: false
|
|
||||||
}, function () {
|
|
||||||
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/payment";
|
|
||||||
});
|
|
||||||
|
|
||||||
}else{
|
|
||||||
swal({
|
|
||||||
title: 'Oops',
|
|
||||||
text: result.message,
|
|
||||||
type: 'warning',
|
|
||||||
html: true,
|
|
||||||
closeOnConfirm: false,
|
|
||||||
closeOnCancel: false,
|
|
||||||
allowOutsideClick: false
|
|
||||||
}, function () {
|
|
||||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
swal({
|
|
||||||
title: 'Oops',
|
|
||||||
text: data.message.toString(),
|
|
||||||
type: 'error',
|
|
||||||
html: true,
|
|
||||||
closeOnConfirm: false,
|
|
||||||
closeOnCancel: false,
|
|
||||||
allowOutsideClick: false
|
|
||||||
}, function () {
|
|
||||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
swal({
|
|
||||||
title: 'Oops',
|
|
||||||
text: 'Please Check Member',
|
|
||||||
type: 'warning',
|
|
||||||
html: true,
|
|
||||||
closeOnConfirm: false,
|
|
||||||
closeOnCancel: false,
|
|
||||||
allowOutsideClick: false
|
|
||||||
}, function () {
|
|
||||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type + "/payment";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},100);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// QR Code Reader
|
// QR Code Reader
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t :details %></li>
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= print_settings_path %>"><%= t("views.right_panel.header.print_settings") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), print_settings_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= render 'form', print_setting: @print_setting %>
|
<%= render 'form', print_setting: @print_setting %>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
<p id="notice"><%= notice %></p>
|
<p id="notice"><%= notice %></p>
|
||||||
|
|
||||||
<% breadcrumb_add t("views.right_panel.header.print_settings"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.header.print_settings") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||||
<div class="m-b-10 clearfix">
|
<div class="m-b-10 clearfix">
|
||||||
<%= link_to t("views.btn.new"),new_print_setting_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
|
<%= link_to t("views.btn.new"),new_print_setting_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,7 +50,7 @@
|
|||||||
<!-- <td><%= print_setting.delimiter %></td> -->
|
<!-- <td><%= print_setting.delimiter %></td> -->
|
||||||
<!-- <td><%= print_setting.heading_space %></td> -->
|
<!-- <td><%= print_setting.heading_space %></td> -->
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t("views.btn.show"), print_setting,:class => 'btn btn-primary btn-sm waves-effect' %>
|
<%= link_to t("views.btn.show"), print_setting,:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||||
<%= link_to t("views.btn.edit"), edit_print_setting_path(print_setting),:class => 'btn btn-info btn-sm waves-effect' %></td>
|
<%= link_to t("views.btn.edit"), edit_print_setting_path(print_setting),:class => 'btn btn-info btn-sm waves-effect' %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -77,7 +84,6 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= print_settings_path %>"><%= t("views.right_panel.header.print_settings") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), print_settings_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= render 'form', print_setting: @print_setting %>
|
<%= render 'form', print_setting: @print_setting %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.header.print_settings"), print_settings_path, print_settings_path, t('details') %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= print_settings_path %>"><%= t("views.right_panel.header.print_settings") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), print_settings_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -68,7 +77,7 @@
|
|||||||
|
|
||||||
<span class="hidden" id="delete_text">
|
<span class="hidden" id="delete_text">
|
||||||
<h6>Are you sure you want to delete this row ?</h6>
|
<h6>Are you sure you want to delete this row ?</h6>
|
||||||
<h6>This action can't be undo. </h6>
|
<h6>This action can't be undo. </h6>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -83,7 +92,7 @@
|
|||||||
<div class="body">
|
<div class="body">
|
||||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||||
<p>
|
<p>
|
||||||
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.print_settings_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.print_settings_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||||
2) <%= t("views.right_panel.detail.unique_code") %> - <%= t("views.right_panel.detail.unique_code_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
|
2) <%= t("views.right_panel.detail.unique_code") %> - <%= t("views.right_panel.detail.unique_code_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
|
||||||
3) <%= t("views.right_panel.detail.template") %> - <%= t("views.right_panel.detail.template_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
|
3) <%= t("views.right_panel.detail.template") %> - <%= t("views.right_panel.detail.template_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
|
||||||
4) <%= t("views.right_panel.detail.printer_name") %> - <%= t("views.right_panel.detail.printer_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
|
4) <%= t("views.right_panel.detail.printer_name") %> - <%= t("views.right_panel.detail.printer_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
|
||||||
@@ -104,10 +113,6 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.print_settings_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.cb_payments") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.cb_payments") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.cb_payments") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.cb_payments") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.commission_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.commission_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<!-- <div class="container"> -->
|
<!-- <div class="container"> -->
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.credit_payment_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.credit_payment_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<!-- <div class="container"> -->
|
<!-- <div class="container"> -->
|
||||||
<%= render :partial=>'shift_sale_report_filter',
|
<%= render :partial=>'shift_sale_report_filter',
|
||||||
:locals=>{ :period_type => true, :filter_for_credit => true, :shift_name => true, :report_path =>reports_credit_payment_index_path} %>
|
:locals=>{ :period_type => true, :filter_for_credit => true, :shift_name => true, :report_path =>reports_credit_payment_index_path} %>
|
||||||
|
|||||||
144
app/views/reports/customer/_shift_sale_report_filter.html.erb
Executable file
144
app/views/reports/customer/_shift_sale_report_filter.html.erb
Executable file
@@ -0,0 +1,144 @@
|
|||||||
|
<div class="p-l-15">
|
||||||
|
<%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %>
|
||||||
|
<% if period_type != false %>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
|
||||||
|
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.select_period") %></label>
|
||||||
|
<select name="period" id="sel_period" class="form-control m-t-3" style="height: 32px;>
|
||||||
|
<option value=""><%= t("views.right_panel.detail.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>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
|
||||||
|
<label class="font-14"><%= t :customer_name %></label>
|
||||||
|
<input type="text" placeholder="Customer name" class="form-control m-t-3" name="customer" value="<%= params[:customer] %>" id="customer_filter" style="height: 32px;">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% if defined? @membership_type %>
|
||||||
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||||
|
<label class="font-14"><%= t("views.right_panel.detail.select_member_group") %></label>
|
||||||
|
|
||||||
|
<select name="membership_type" id="membership_type" class="form-control m-t-3" style="height: 32px;">
|
||||||
|
<option value="0">--- All Group ---</option>
|
||||||
|
<% @membership_type.each do |mt| %>
|
||||||
|
<option class="<%=mt.name.downcase%>" value="<%=mt.value%>"><%=mt.name%></option>
|
||||||
|
<%end %>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
|
||||||
|
<!-- <label class="">Select Shift Period</label> -->
|
||||||
|
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.from") %></label>
|
||||||
|
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="from" id="from" type="text" placeholder="From date" style="height: 32px;">
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2 col-md-2 col-sm-2 col-mbl-view mbl-style">
|
||||||
|
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.to") %></label>
|
||||||
|
<input data-behaviour='datepicker' class="form-control datepicker m-t-3" name="to" id="to" type="text" placeholder="To date" style="height: 32px;">
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2 col-md-2 col-sm-2 mbl-style">
|
||||||
|
<label class="font-14 mbl_lbl"><%= t("views.right_panel.detail.all_shift") %></label>
|
||||||
|
<select class="form-control select m-t-3" name="shift_name" id="shift_name" style="height: 32px;">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2 col-md-2 col-sm-2 margin-top-20 mbl-style mbl-right-btn" style="margin-top: 20px;">
|
||||||
|
<input type="submit" value="Generate Report" class='btn btn-primary'>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
</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');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
<% 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 '-'%>);
|
||||||
|
|
||||||
|
$(".<%=params[:payment_type]%>").attr('selected','selected')
|
||||||
|
|
||||||
|
// 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");
|
||||||
|
<% 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>
|
||||||
286
app/views/reports/customer/index.html.erb
Normal file
286
app/views/reports/customer/index.html.erb
Normal file
@@ -0,0 +1,286 @@
|
|||||||
|
<style>
|
||||||
|
.header-label{
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.customer_sales_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<!-- <div class="container"> -->
|
||||||
|
<%= render :partial=>'shift_sale_report_filter',
|
||||||
|
:locals=>{ :period_type => true, :shift_name => true,:payments => true, :report_path =>reports_customer_index_path} %>
|
||||||
|
<hr />
|
||||||
|
<!-- </div> -->
|
||||||
|
|
||||||
|
<!-- <div class="container"> -->
|
||||||
|
<!-- <div class="row"> -->
|
||||||
|
<div class="text-right">
|
||||||
|
<a href="javascript:export_to('<%=reports_customer_index_path%>.xls')" class = "btn btn-info wave-effects"><%= t("views.btn.exp_to_excel") %></a>
|
||||||
|
</div>
|
||||||
|
<!-- </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
|
|
||||||
|
<div class="margin-top-20 mbl-table">
|
||||||
|
<div class="card mbl-table-card">
|
||||||
|
<table class="table table-striped" border="0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="11"> <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
|
||||||
|
</tr>
|
||||||
|
<% if @shift_from %>
|
||||||
|
<tr>
|
||||||
|
<% if @shift_data.employee %>
|
||||||
|
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
|
||||||
|
<% end %>
|
||||||
|
<th colspan="10"><%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th><%= t("views.right_panel.detail.dining") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||||
|
<th><%= t :customer %></th>
|
||||||
|
<th><%= t :cashier %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %> </th>
|
||||||
|
<% @tax_profiles.each do |tax| %>
|
||||||
|
<th><%= tax.name %></th>
|
||||||
|
<% end %>
|
||||||
|
<th><%= t("views.right_panel.detail.grand_total") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.rnd_adj_sh") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.grand_total") %> +<br/>
|
||||||
|
<%= t("views.right_panel.detail.rnd_adj_sh") %>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% t_grand_total = 0 %>
|
||||||
|
<% t_old_grand_total = 0 %>
|
||||||
|
<% t_total_sum = 0 %>
|
||||||
|
<% t_discount_amt = 0 %>
|
||||||
|
<% t_rounding_adj = 0%>
|
||||||
|
|
||||||
|
<% if !@sale_data.nil? %>
|
||||||
|
|
||||||
|
<% @sale_data.each do |member_group| %>
|
||||||
|
<% grand_total = 0 %>
|
||||||
|
<% old_grand_total = 0 %>
|
||||||
|
<% total_tax = [] %>
|
||||||
|
<% total_sum = 0 %>
|
||||||
|
<% discount_amt = 0 %>
|
||||||
|
<% rounding_adj = 0%>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<%if member_group[0].nil?%>
|
||||||
|
<th colspan="10"> <span class="header-label">Group Type : Normal</span></th>
|
||||||
|
<%else%>
|
||||||
|
<th colspan="10"> <span class="header-label">Group Type : <%= Lookup.where(:lookup_type=>'membership_type', :value=>member_group[0]).last.name %></span></th>
|
||||||
|
<%end%>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<% member_group[1].each do |result|%>
|
||||||
|
<% grand_total += result.grand_total.to_f %>
|
||||||
|
<% t_grand_total += result.grand_total.to_f %>
|
||||||
|
<% old_grand_total += result.grand_total.to_f - result.rounding_adjustment.to_f %>
|
||||||
|
<% t_old_grand_total += result.grand_total.to_f - result.rounding_adjustment.to_f%>
|
||||||
|
<% total_sum += result.total_amount.to_f %>
|
||||||
|
<% t_total_sum += result.total_amount.to_f %>
|
||||||
|
<% discount_amt += result.total_discount.to_f %>
|
||||||
|
<% t_discount_amt += result.total_discount.to_f %>
|
||||||
|
<% rounding_adj += result.rounding_adjustment.to_f %>
|
||||||
|
<% t_rounding_adj += result.rounding_adjustment.to_f %>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<%if result.type %>
|
||||||
|
<%= result.type %> - <%= result.name %>
|
||||||
|
<% else %>
|
||||||
|
-
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td><%= result.receipt_no rescue '-' %> </td>
|
||||||
|
<td><%= result.customer_name rescue '-' %></td>
|
||||||
|
<td><%= result.cashier_name rescue '-' %></td>
|
||||||
|
<td><%= number_format(result.total_amount, precision: precision.to_i, delimiter: delimiter) %></td>
|
||||||
|
<td><%= number_format(result.total_discount, precision: precision.to_i, delimiter: delimiter) rescue '0' %></td>
|
||||||
|
<% @tax_profiles.each do |tax| %>
|
||||||
|
<%tax_value=0%>
|
||||||
|
<% if sale_tax = result.sale_taxes.find { |sale_tax| sale_tax.tax_name == tax.name } %>
|
||||||
|
<%tax_value=sale_tax.tax_payable_amount%>
|
||||||
|
<td><%= number_format(sale_tax.tax_payable_amount, precision: precision.to_i, delimiter: delimiter) rescue '-' %> </td>
|
||||||
|
<% else %>
|
||||||
|
<td><%= number_format(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
|
||||||
|
<% end %>
|
||||||
|
<%total_tax << {
|
||||||
|
tax.name => tax_value
|
||||||
|
}%>
|
||||||
|
<% end %>
|
||||||
|
<td><%= number_format(result.grand_total - result.rounding_adjustment, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
|
||||||
|
<td><%= number_format(result.rounding_adjustment.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
|
||||||
|
<td><%= number_format(result.grand_total, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<tr>
|
||||||
|
<% total_tax = total_tax.reduce {|acc, h| acc.merge(h) {|_,v1,v2| v1 + v2 }}%>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
<td><b><%= number_format(total_sum, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<td><b><%= number_format(discount_amt, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<% @tax_profiles.each do |tax| %>
|
||||||
|
<%if total_tax.has_key?(tax.name)%>
|
||||||
|
<td><b><%= number_format(total_tax[tax.name], precision: precision.to_i, delimiter: delimiter) rescue '-' %> </b></td>
|
||||||
|
<%end%>
|
||||||
|
<% end %>
|
||||||
|
<td><b><%= number_format(old_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '0' %></b></td>
|
||||||
|
<td><b><%= number_format(rounding_adj.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<td><b><%= number_format(grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="11"> </td>
|
||||||
|
</tr>
|
||||||
|
<%end%>
|
||||||
|
<tr style="border-top:4px double #666;">
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||||
|
<td><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||||
|
|
||||||
|
<% @tax_profiles.each do |tax| %>
|
||||||
|
<td><%= tax.name %></td>
|
||||||
|
<% end %>
|
||||||
|
<td><%= t("views.right_panel.detail.grand_total") %></td>
|
||||||
|
<td><%= t("views.right_panel.detail.rnd_adj_sh") %></td>
|
||||||
|
<td><%= t("views.right_panel.detail.grand_total") %> +<br/>
|
||||||
|
<%= t("views.right_panel.detail.rnd_adj_sh") %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%end%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
<td><b><%= number_format(t_total_sum, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<td><b><%= number_format(t_discount_amt, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<% @tax_profiles.each do |tax| %>
|
||||||
|
<% if sale_tax = @sale_taxes.find { |sale_tax| sale_tax.tax_name == tax.name } %>
|
||||||
|
<td><b><%= number_format(sale_tax.st_amount, precision: precision.to_i, delimiter: delimiter) rescue '-' %> </b></td>
|
||||||
|
<% else %>
|
||||||
|
<td><b><%= number_format(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<td><b><%= number_format(t_old_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '0' %></b></td>
|
||||||
|
<td><b><%= number_format(t_rounding_adj.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<td><b><%= number_format(t_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
|
||||||
|
var check_arr = [];
|
||||||
|
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 = "";
|
||||||
|
|
||||||
|
show_shift_name(period,period_type,from,to,'shift_item');
|
||||||
|
}
|
||||||
|
|
||||||
|
// OK button is clicked
|
||||||
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
from = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#from').val(from)
|
||||||
|
search_by_date();
|
||||||
|
});
|
||||||
|
$('#to').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
|
new_date = new Date(date) ;
|
||||||
|
month = parseInt(new_date.getMonth()+1)
|
||||||
|
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
|
$('#to').val(to)
|
||||||
|
search_by_date();
|
||||||
|
});
|
||||||
|
|
||||||
|
function search_by_date(){
|
||||||
|
|
||||||
|
from = $("#from").val();
|
||||||
|
to = $("#to").val();
|
||||||
|
|
||||||
|
var period = 0;
|
||||||
|
var period_type = 1;
|
||||||
|
|
||||||
|
if(to != '' && from != ''){
|
||||||
|
shift_name = from + ',' + to;
|
||||||
|
|
||||||
|
check_arr.push(to);
|
||||||
|
|
||||||
|
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 '-'%>';
|
||||||
|
if (from == '' && to == '') {
|
||||||
|
from = $("#from").val();
|
||||||
|
to = $("#to").val();
|
||||||
|
}
|
||||||
|
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>
|
||||||
165
app/views/reports/customer/index.xls.erb
Normal file
165
app/views/reports/customer/index.xls.erb
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
<!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="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="margin-top-20">
|
||||||
|
<div class="card">
|
||||||
|
<table class="table table-striped" border="0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="11"> <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%></th>
|
||||||
|
</tr>
|
||||||
|
<% if @shift_from %>
|
||||||
|
<tr>
|
||||||
|
<% if @shift_data.employee %>
|
||||||
|
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
|
||||||
|
<% end %>
|
||||||
|
<th colspan="10"><%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<tr>
|
||||||
|
<th><%= t("views.right_panel.detail.dining") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||||
|
<th><%= t :customer %></th>
|
||||||
|
<th><%= t :cashier %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %> </th>
|
||||||
|
<% @tax_profiles.each do |tax| %>
|
||||||
|
<th><%= tax.name %></th>
|
||||||
|
<% end %>
|
||||||
|
<!-- <th>Other Amount</th> -->
|
||||||
|
<th><%= t("views.right_panel.detail.grand_total") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.rnd_adj_sh") %></th>
|
||||||
|
<th><%= t("views.right_panel.detail.grand_total") %> +<br/>
|
||||||
|
<%= t("views.right_panel.detail.rnd_adj_sh") %>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<% t_grand_total = 0 %>
|
||||||
|
<% t_old_grand_total = 0 %>
|
||||||
|
<% t_total_sum = 0 %>
|
||||||
|
<% t_discount_amt = 0 %>
|
||||||
|
<% t_rounding_adj = 0%>
|
||||||
|
|
||||||
|
<% if @sale_data %>
|
||||||
|
<% @sale_data.each do |member_group| %>
|
||||||
|
<% grand_total = 0 %>
|
||||||
|
<% old_grand_total = 0 %>
|
||||||
|
<% total_tax = [] %>
|
||||||
|
<% total_sum = 0 %>
|
||||||
|
<% discount_amt = 0 %>
|
||||||
|
<% rounding_adj = 0%>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<%if member_group[0].nil?%>
|
||||||
|
<td colspan="10"> <b>Group Type : Normal</b></td>
|
||||||
|
<%else%>
|
||||||
|
<td colspan="10"> <b>Group Type : <%= Lookup.where(:lookup_type=>'membership_type', :value=>member_group[0]).last.name %></b></td>
|
||||||
|
<%end%>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<% member_group[1].each do |result|%>
|
||||||
|
<% grand_total += result.grand_total.to_f %>
|
||||||
|
<% t_grand_total += result.grand_total.to_f %>
|
||||||
|
<% old_grand_total += result.grand_total.to_f - result.rounding_adjustment.to_f %>
|
||||||
|
<% t_old_grand_total += result.grand_total.to_f - result.rounding_adjustment.to_f%>
|
||||||
|
<% total_sum += result.total_amount.to_f %>
|
||||||
|
<% t_total_sum += result.total_amount.to_f %>
|
||||||
|
<% discount_amt += result.total_discount.to_f %>
|
||||||
|
<% t_discount_amt += result.total_discount.to_f %>
|
||||||
|
<% rounding_adj += result.rounding_adjustment.to_f %>
|
||||||
|
<% t_rounding_adj += result.rounding_adjustment.to_f %>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<%if result.type %>
|
||||||
|
<%= result.type %> - <%= result.name %>
|
||||||
|
<% else %>
|
||||||
|
-
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td><%= result.receipt_no rescue '-' %> </td>
|
||||||
|
<td><%= result.customer_name rescue '-' %></td>
|
||||||
|
<td><%= result.cashier_name rescue '-' %></td>
|
||||||
|
<td><%= number_format(result.total_amount, precision: precision.to_i, delimiter: delimiter) %></td>
|
||||||
|
<td><%= number_format(result.total_discount, precision: precision.to_i, delimiter: delimiter) rescue '0' %></td>
|
||||||
|
<% @tax_profiles.each do |tax| %>
|
||||||
|
<%tax_value=0%>
|
||||||
|
<% if sale_tax = result.sale_taxes.find { |sale_tax| sale_tax.tax_name == tax.name } %>
|
||||||
|
<%tax_value=sale_tax.tax_payable_amount%>
|
||||||
|
<td><%= number_format(sale_tax.tax_payable_amount, precision: precision.to_i, delimiter: delimiter) rescue '-' %> </td>
|
||||||
|
<% else %>
|
||||||
|
<td><%= number_format(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
|
||||||
|
<% end %>
|
||||||
|
<%total_tax << {
|
||||||
|
tax.name => tax_value
|
||||||
|
}%>
|
||||||
|
<% end %>
|
||||||
|
<td><%= number_format(result.grand_total - result.rounding_adjustment, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
|
||||||
|
<td><%= number_format(result.rounding_adjustment.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
|
||||||
|
<td><%= number_format(result.grand_total, precision: precision.to_i, delimiter: delimiter) rescue '-' %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
<tr>
|
||||||
|
<% total_tax = total_tax.reduce {|acc, h| acc.merge(h) {|_,v1,v2| v1 + v2 }}%>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
<td><b><%= number_format(total_sum, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<td><b><%= number_format(discount_amt, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<% @tax_profiles.each do |tax| %>
|
||||||
|
<%if total_tax.has_key?(tax.name)%>
|
||||||
|
<td><b><%= number_format(total_tax[tax.name], precision: precision.to_i, delimiter: delimiter) rescue '-' %> </b></td>
|
||||||
|
<%end%>
|
||||||
|
<% end %>
|
||||||
|
<td><b><%= number_format(old_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '0' %></b></td>
|
||||||
|
<td><b><%= number_format(rounding_adj.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<td><b><%= number_format(grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="11"> </td>
|
||||||
|
</tr>
|
||||||
|
<%end%>
|
||||||
|
<tr style="border-top:4px double #666;">
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||||
|
<td><%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %></td>
|
||||||
|
|
||||||
|
<% @tax_profiles.each do |tax| %>
|
||||||
|
<td><%= tax.name %></td>
|
||||||
|
<% end %>
|
||||||
|
<td><%= t("views.right_panel.detail.grand_total") %></td>
|
||||||
|
<td><%= t("views.right_panel.detail.rnd_adj_sh") %></td>
|
||||||
|
<td><%= t("views.right_panel.detail.grand_total") %> +<br/>
|
||||||
|
<%= t("views.right_panel.detail.rnd_adj_sh") %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%end%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"> </td>
|
||||||
|
<td><b><%= number_format(t_total_sum, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<td><b><%= number_format(t_discount_amt, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<% @tax_profiles.each do |tax| %>
|
||||||
|
<% if sale_tax = @sale_taxes.find { |sale_tax| sale_tax.tax_name == tax.name } %>
|
||||||
|
<td><b><%= number_format(sale_tax.st_amount, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b> </td>
|
||||||
|
<% else %>
|
||||||
|
<td><b><%= number_format(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<td><b><%= number_format(t_old_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '0' %></b></td>
|
||||||
|
<td><b><%= number_format(t_rounding_adj.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
<td><b><%= number_format(t_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %></b></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.daily_sale_report") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.daily_sale_report") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.waste_spoilage_report") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.waste_spoilage_report") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<% breadcrumb_add t("views.right_panel.detail.hourly_saleitem_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.hourly_saleitem_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<%= render :partial=>'hourly_saleitem_report_filter',
|
<%= render :partial=>'hourly_saleitem_report_filter',
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.induty_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.induty_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<%= render :partial=>'shift_sale_report_filter',
|
<%= render :partial=>'shift_sale_report_filter',
|
||||||
@@ -9,11 +16,11 @@
|
|||||||
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<a href="javascript:export_to('<%=reports_induty_index_path%>.xls')" class = "btn btn-info wave-effects "><%= t("views.btn.exp_to_excel") %></a>
|
<a href="javascript:export_to('<%=reports_induty_index_path%>.xls')" class = "btn btn-info wave-effects "><%= t("views.btn.exp_to_excel") %></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="margin-top-20">
|
<div class="margin-top-20">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped" id="items_table" border="0">
|
<table class="table table-striped" id="items_table" border="0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -21,9 +28,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<% if @shift_from %>
|
<% if @shift_from %>
|
||||||
<tr>
|
<tr>
|
||||||
<% if @shift_data.employee %>
|
<% if @shift_data.employee %>
|
||||||
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
|
<% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<th colspan="7"> <%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
|
<th colspan="7"> <%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )</th>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -34,7 +41,7 @@
|
|||||||
<th><%= t :table %></th>
|
<th><%= t :table %></th>
|
||||||
<th><%= t("views.right_panel.detail.in_time") %></th>
|
<th><%= t("views.right_panel.detail.in_time") %></th>
|
||||||
<th><%= t("views.right_panel.detail.out_time") %></th>
|
<th><%= t("views.right_panel.detail.out_time") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% if !@induty_data.nil? %>
|
<% if !@induty_data.nil? %>
|
||||||
@@ -69,14 +76,14 @@
|
|||||||
if(search){
|
if(search){
|
||||||
|
|
||||||
if(parseInt(search) == 0){
|
if(parseInt(search) == 0){
|
||||||
search_by_period();
|
search_by_period();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
search_by_date();
|
search_by_date();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
search_by_period();
|
search_by_period();
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#sel_period').change(function(){
|
$('#sel_period').change(function(){
|
||||||
search_by_period();
|
search_by_period();
|
||||||
@@ -88,8 +95,8 @@
|
|||||||
var from = "";
|
var from = "";
|
||||||
var to = "";
|
var to = "";
|
||||||
|
|
||||||
show_shift_name(period,period_type,from,to,'shift_item');
|
show_shift_name(period,period_type,from,to,'shift_item');
|
||||||
}
|
}
|
||||||
|
|
||||||
// OK button is clicked
|
// OK button is clicked
|
||||||
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
|
||||||
@@ -105,13 +112,13 @@
|
|||||||
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear();
|
||||||
$('#to').val(to)
|
$('#to').val(to)
|
||||||
search_by_date();
|
search_by_date();
|
||||||
});
|
});
|
||||||
|
|
||||||
function search_by_date(){
|
function search_by_date(){
|
||||||
from = $("#from").val();
|
from = $("#from").val();
|
||||||
to = $("#to").val();
|
to = $("#to").val();
|
||||||
var period = 0;
|
var period = 0;
|
||||||
var period_type = 1;
|
var period_type = 1;
|
||||||
|
|
||||||
if(to != '' && from != ''){
|
if(to != '' && from != ''){
|
||||||
shift_name = from + ',' + to;
|
shift_name = from + ',' + to;
|
||||||
@@ -119,7 +126,7 @@
|
|||||||
check_arr.push(to);
|
check_arr.push(to);
|
||||||
|
|
||||||
if(check_arr.length == 1){
|
if(check_arr.length == 1){
|
||||||
show_shift_name(period,period_type,from,to,'shift_item');
|
show_shift_name(period,period_type,from,to,'shift_item');
|
||||||
}
|
}
|
||||||
if(check_arr.length == 3){
|
if(check_arr.length == 3){
|
||||||
check_arr = [];
|
check_arr = [];
|
||||||
@@ -138,12 +145,12 @@
|
|||||||
var selected = '';
|
var selected = '';
|
||||||
var str = '';
|
var str = '';
|
||||||
var param_shift = '<%= params[:shift_name]%>';
|
var param_shift = '<%= params[:shift_name]%>';
|
||||||
|
|
||||||
url = '<%= reports_get_shift_by_induty_path %>';
|
url = '<%= reports_get_shift_by_induty_path %>';
|
||||||
$.get(url, {period :period, period_type :period_type, from :from, to :to, report_type :shift_item} , function(data){
|
$.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>';
|
str = '<option value="0">--- All Shift ---</option>';
|
||||||
$(data.message).each(function(index){
|
$(data.message).each(function(index){
|
||||||
|
|
||||||
var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date;
|
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 sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date;
|
||||||
@@ -154,21 +161,21 @@
|
|||||||
selected = 'selected = "selected"';
|
selected = 'selected = "selected"';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
selected = '';
|
selected = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
selected = '';
|
selected = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
str += '<option value="'+ shift_id +'" '+ selected +'>' + local_date + '</option>';
|
str += '<option value="'+ shift_id +'" '+ selected +'>' + local_date + '</option>';
|
||||||
|
|
||||||
// console.log(sh_date)
|
// console.log(sh_date)
|
||||||
})
|
})
|
||||||
shift.append(str);
|
shift.append(str);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.order_reservation_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.order_reservation_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active">Payment Method Report</li>
|
<li class="breadcrumb-item active">Payment Method Report</li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.product_sale_report") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.product_sale_report") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.receipt_no_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.receipt_no_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<% breadcrumb_add t("views.right_panel.detail.receipt_no_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.receipt_no_report") %> Details</li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<%= render :partial=>'shift_sale_report_filter',
|
<%= render :partial=>'shift_sale_report_filter',
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.sale_item_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.sale_item_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<%= render :partial=>'shift_sale_report_filter',
|
<%= render :partial=>'shift_sale_report_filter',
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.shift_sale_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.shift_sale_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.staff_meal_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.staff_meal_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<%= render :partial=>'staff_meal_report_filter',
|
<%= render :partial=>'staff_meal_report_filter',
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add 'Stock Check Report', "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
|
<li class="breadcrumb-item active">Stock Check Report</li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.void_sale_report"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.void_sale_report") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<!-- <div class="container"> -->
|
<!-- <div class="container"> -->
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.waste_spoilage_report") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.waste_spoilage_report") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.waste_spoilage_report") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.waste_spoilage_report") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.account"), '', dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.account") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||||
<div class="m-b-10 clearfix">
|
<div class="m-b-10 clearfix">
|
||||||
@@ -29,7 +38,7 @@
|
|||||||
<td><%= account.rebate %></td>
|
<td><%= account.rebate %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t("views.btn.show"), settings_account_path(account),:class => 'btn btn-info btn-sm waves-effect' %>
|
<%= link_to t("views.btn.show"), settings_account_path(account),:class => 'btn btn-info btn-sm waves-effect' %>
|
||||||
<%= link_to t("views.btn.edit"), edit_settings_account_path(account),:class => 'btn btn-primary btn-sm waves-effect' %>
|
<%= link_to t("views.btn.edit"), edit_settings_account_path(account),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -62,7 +71,6 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_accounts_path %>"><%= t("views.right_panel.detail.account") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t :details %></li>
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>">Commissions</a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>">Commissions</a></li>
|
||||||
<li class="breadcrumb-item active"><%= @commission.name %></li>
|
<li class="breadcrumb-item active"><%= @commission.name %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1 +1,11 @@
|
|||||||
<%= render 'form', settings_cashier_terminal: @settings_cashier_terminal %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_cashier_terminals_path %>"><%= t("views.right_panel.header.cashier_terminal") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_cashier_terminals_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<%= render 'form', settings_cashier_terminal: @settings_cashier_terminal %>
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.header.cashier_terminal"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.header.cashier_terminal") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||||
<div class="m-b-10 clearfix">
|
<div class="m-b-10 clearfix">
|
||||||
@@ -69,6 +76,6 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1 +1,11 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_cashier_terminals_path %>"><%= t("views.right_panel.header.cashier_terminal") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_cashier_terminals_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<%= render 'form', settings_cashier_terminal: @settings_cashier_terminal %>
|
<%= render 'form', settings_cashier_terminal: @settings_cashier_terminal %>
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.header.cashier_terminal"), settings_cashier_terminals_path, settings_cashier_terminals_path, t('details') %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_cashier_terminals_path %>"><%= t("views.right_panel.header.cashier_terminal") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_cashier_terminals_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -79,7 +88,7 @@
|
|||||||
|
|
||||||
<span class="hidden" id="delete_text">
|
<span class="hidden" id="delete_text">
|
||||||
<h6>Are you sure you want to delete this row ?</h6>
|
<h6>Are you sure you want to delete this row ?</h6>
|
||||||
<h6>This action can't be undo. </h6>
|
<h6>This action can't be undo. </h6>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -93,7 +102,7 @@
|
|||||||
<div class="body">
|
<div class="body">
|
||||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||||
<p>
|
<p>
|
||||||
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.cashier_terminal_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.cashier_terminal_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||||
2) <%= t("views.right_panel.detail.is_active") %> - <%= t("views.right_panel.detail.status_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.is_active_txt") %> <br>
|
2) <%= t("views.right_panel.detail.is_active") %> - <%= t("views.right_panel.detail.status_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.is_active_txt") %> <br>
|
||||||
3) <%= t("views.right_panel.detail.is_currently_login") %> - <%= t("views.right_panel.detail.status_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.is_currently_login_txt") %> <br>
|
3) <%= t("views.right_panel.detail.is_currently_login") %> - <%= t("views.right_panel.detail.status_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.is_currently_login_txt") %> <br>
|
||||||
4) <%= t("views.right_panel.detail.auto_print_receipt") %> - <%= t("views.right_panel.detail.status_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.auto_print_receipt_txt") %> <br>
|
4) <%= t("views.right_panel.detail.auto_print_receipt") %> - <%= t("views.right_panel.detail.status_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.auto_print_receipt_txt") %> <br>
|
||||||
@@ -117,7 +126,6 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.cashier_terminal_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.cashier_terminal_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,12 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_commissioners_path %>"><%= t("en.commissioners") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissioners_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= render 'form', commissioner: @commissioner %>
|
<%= render 'form', commissioner: @commissioner %>
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t('commissioners'), '', dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("en.commissioners") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||||
<div class="m-b-10 clearfix">
|
<div class="m-b-10 clearfix">
|
||||||
@@ -64,6 +71,6 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,2 +1,12 @@
|
|||||||
<%= render 'form', commissioner: @commissioner %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_commissioners_path %>"><%= t("en.commissioners") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissioners_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= render 'form', commissioner: @commissioner %>
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
<% breadcrumb_add t('commissioners'), settings_commissioners_path, settings_commissioners_path, t("details") %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_commissioners_path %>"><%= t("en.commissioners") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissioners_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Nav tabs -->
|
<!-- Nav tabs -->
|
||||||
<ul class="nav nav-tabs" role="tablist">
|
<ul class="nav nav-tabs" role="tablist">
|
||||||
@@ -61,13 +70,13 @@
|
|||||||
|
|
||||||
<span class="hidden" id="delete_text">
|
<span class="hidden" id="delete_text">
|
||||||
<h6>Are you sure you want to delete this row ?</h6>
|
<h6>Are you sure you want to delete this row ?</h6>
|
||||||
<h6>This action can't be undo. </h6>
|
<h6>This action can't be undo. </h6>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1 +1,11 @@
|
|||||||
<%= render 'form', commission: @commission %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>"><%= t("en.commissions") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissions_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<%= render 'form', commission: @commission %>
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
<% breadcrumb_add t('commissions'), '', dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("en.commissions") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||||
@@ -57,6 +65,6 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1 +1,11 @@
|
|||||||
<%= render 'form', commission: @commission %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_commissions_path %>"><%= t("en.commissions") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_commissions_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<%= render 'form', commission: @commission %>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
<% if @table %>
|
<% if @table %>
|
||||||
<li class="breadcrumb-item"><a href="<%= edit_settings_zone_table_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
|
<li class="breadcrumb-item"><a href="<%= edit_settings_zone_table_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
|
||||||
<% elsif @room %>
|
<% elsif @room %>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
<% if @table %>
|
<% if @table %>
|
||||||
<li class="breadcrumb-item"><a href="<%= edit_settings_zone_table_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
|
<li class="breadcrumb-item"><a href="<%= edit_settings_zone_table_path(@zone,@settings_dining_facility) %>">Table / Room</a></li>
|
||||||
<% elsif @room %>
|
<% elsif @room %>
|
||||||
|
|||||||
@@ -1 +1,12 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_employees_path %>"><%= t("views.right_panel.detail.employees") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_employees_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= render 'form', employee: @employee %>
|
<%= render 'form', employee: @employee %>
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.employee"), "", dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.employee") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||||
<div class="m-b-10 clearfix">
|
<div class="m-b-10 clearfix">
|
||||||
@@ -69,6 +76,6 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1 +1,11 @@
|
|||||||
<%= render 'form', employee: @employee %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_employees_path %>"><%= t("views.right_panel.detail.employees") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_employees_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<%= render 'form', employee: @employee %>
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.employee"), settings_employees_path, settings_employees_path, t('details') %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_employees_path %>"><%= t("views.right_panel.detail.employee") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_employees_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
||||||
@@ -60,7 +69,7 @@
|
|||||||
|
|
||||||
<span class="hidden" id="delete_text">
|
<span class="hidden" id="delete_text">
|
||||||
<h6>Are you sure you want to delete this row ?</h6>
|
<h6>Are you sure you want to delete this row ?</h6>
|
||||||
<h6>This action can't be undo. </h6>
|
<h6>This action can't be undo. </h6>
|
||||||
</span>
|
</span>
|
||||||
<%end%>
|
<%end%>
|
||||||
</td>
|
</td>
|
||||||
@@ -75,7 +84,7 @@
|
|||||||
<div class="body">
|
<div class="body">
|
||||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||||
<p>
|
<p>
|
||||||
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.employee_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
1) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.employee_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||||
2) <%= t("views.right_panel.detail.role") %> - <%= t("views.right_panel.detail.role_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
|
2) <%= t("views.right_panel.detail.role") %> - <%= t("views.right_panel.detail.role_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
|
||||||
3) <%= t("views.right_panel.detail.created_at") %> - <%= t("views.right_panel.detail.created_at_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
|
3) <%= t("views.right_panel.detail.created_at") %> - <%= t("views.right_panel.detail.created_at_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
|
||||||
4) <%= t("views.right_panel.detail.updated_at") %> - <%= t("views.right_panel.detail.updated_at_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
|
4) <%= t("views.right_panel.detail.updated_at") %> - <%= t("views.right_panel.detail.updated_at_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
|
||||||
@@ -93,8 +102,6 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.employee_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_item_sets_path %>"><%= t("views.right_panel.detail.item_set") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_item_sets_path %>"><%= t("views.right_panel.detail.item_set") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,11 +1,20 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.detail.item_set"), '', dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.item_set") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t("views.btn.back"), root_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
|
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item"><%= link_to (t :accounts), settings_accounts_path %></li>
|
<li class="list-group-item"><%= link_to (t :accounts), settings_accounts_path %></li>
|
||||||
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
|
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
|
||||||
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
|
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
|
||||||
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
|
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
|
||||||
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
|
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
|
||||||
@@ -76,7 +85,6 @@
|
|||||||
8) <%= t("views.right_panel.button.item_options") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.item_options_txt") %> <br>
|
8) <%= t("views.right_panel.button.item_options") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.item_options_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_item_sets_path %>"><%= t("views.right_panel.detail.item_set") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_item_sets_path %>"><%= t("views.right_panel.detail.item_set") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_item_sets_path %>"><%= t("views.right_panel.detail.item_set") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_item_sets_path %>"><%= t("views.right_panel.detail.item_set") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t :details %></li>
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1 +1,11 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_lookups_path %>">Lookup</a></li>
|
||||||
|
<li class="breadcrumb-item active">Edit</li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_lookups_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
<%= render 'form', settings_lookup: @settings_lookup %>
|
<%= render 'form', settings_lookup: @settings_lookup %>
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
<% breadcrumb_add 'LookUp', '', dashboard_path %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
|
<li class="breadcrumb-item active">LookUp</li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||||
@@ -24,14 +32,14 @@
|
|||||||
<td><%= settings_lookup.value %></td>
|
<td><%= settings_lookup.value %></td>
|
||||||
<!-- <td><%= link_to t("views.btn.show"), settings_lookup_path(settings_lookup),:class => 'btn btn-info btn-sm waves-effect' %></td> -->
|
<!-- <td><%= link_to t("views.btn.show"), settings_lookup_path(settings_lookup),:class => 'btn btn-info btn-sm waves-effect' %></td> -->
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t("views.btn.edit"), edit_settings_lookup_path(settings_lookup),:class => 'btn btn-primary btn-sm waves-effect' %>
|
<%= link_to t("views.btn.edit"), edit_settings_lookup_path(settings_lookup),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||||
<!-- <button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_lookup_path(settings_lookup)%>" data-method="delete">
|
<!-- <button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_lookup_path(settings_lookup)%>" data-method="delete">
|
||||||
<%= t("views.btn.delete") %>
|
<%= t("views.btn.delete") %>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<span class="hidden" id="delete_text">
|
<span class="hidden" id="delete_text">
|
||||||
<h6>Are you sure you want to delete this row ?</h6>
|
<h6>Are you sure you want to delete this row ?</h6>
|
||||||
<h6>This action can't be undo. </h6>
|
<h6>This action can't be undo. </h6>
|
||||||
</span> -->
|
</span> -->
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
@@ -62,7 +70,6 @@
|
|||||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,11 @@
|
|||||||
<%= render 'form', settings_lookup: @settings_lookup %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_lookups_path %>">Lookup</a></li>
|
||||||
|
<li class="breadcrumb-item active">New</li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to t('.back', :default => t("views.btn.back")), settings_lookups_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<%= render 'form', settings_lookup: @settings_lookup %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_lookups_path %>">Lookups</a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_lookups_path %>">Lookups</a></li>
|
||||||
<li class="breadcrumb-item active">Details</li>
|
<li class="breadcrumb-item active">Details</li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_membership_actions_path %>"><%= t("views.right_panel.detail.setting_membership_actions") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_membership_actions_path %>"><%= t("views.right_panel.detail.setting_membership_actions") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.setting_membership_actions") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.setting_membership_actions") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
|
||||||
</span>
|
</span>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_membership_actions_path %>"><%= t("views.right_panel.detail.setting_membership_actions") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_membership_actions_path %>"><%= t("views.right_panel.detail.setting_membership_actions") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_membership_actions_path %>"><%= t("views.right_panel.detail.setting_membership_actions") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_membership_actions_path %>"><%= t("views.right_panel.detail.setting_membership_actions") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t :details %></li>
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_membership_settings_path %>">Membership Setting</a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_membership_settings_path %>">Membership Setting</a></li>
|
||||||
<li class="breadcrumb-item active">Edit</li>
|
<li class="breadcrumb-item active">Edit</li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><%= t("views.right_panel.detail.membership_setting") %></li>
|
<li class="breadcrumb-item"><%= t("views.right_panel.detail.membership_setting") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
|
||||||
</span>
|
</span>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>">Home</a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_membership_settings_path %>">Membership Setting</a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_membership_settings_path %>">Membership Setting</a></li>
|
||||||
<li class="breadcrumb-item active">New</li>
|
<li class="breadcrumb-item active">New</li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><%= t("views.right_panel.detail.membership_setting") %></li>
|
<li class="breadcrumb-item"><%= t("views.right_panel.detail.membership_setting") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
|
<%= link_to t('.back', :default => t("views.btn.back")), root_path %>
|
||||||
</span>
|
</span>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1 +1,12 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_menu_categories_path %>"><%= t("views.right_panel.detail.menu_categories") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', settings_menu_categories_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
<%= render 'form', settings_menu_category: @settings_menu_category %>
|
<%= render 'form', settings_menu_category: @settings_menu_category %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.menu_category") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.menu_category") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%= link_to 'Back', settings_menus_path %>
|
<%= link_to 'Back', settings_menus_path %>
|
||||||
|
|||||||
@@ -1 +1,12 @@
|
|||||||
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_menu_categories_path %>"><%= t("views.right_panel.detail.menu_categories") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t("views.btn.new") %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', settings_menu_categories_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
<%= render 'form', settings_menu_category: @settings_menu_category %>
|
<%= render 'form', settings_menu_category: @settings_menu_category %>
|
||||||
|
|||||||
@@ -1,11 +1,20 @@
|
|||||||
<% breadcrumb_add t("views.right_panel.header.menu_category"), settings_menu_categories_path, settings_menu_categories_path, t('details') %>
|
<div class="page-header">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="<%= settings_menu_categories_path %>"><%= t("views.right_panel.detail.menu_category") %></a></li>
|
||||||
|
<li class="breadcrumb-item active"><%= t :details %></li>
|
||||||
|
<span class="float-right">
|
||||||
|
<%= link_to 'Back', settings_menu_categories_path %>
|
||||||
|
</span>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
|
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item"><%= link_to (t :accounts), settings_accounts_path %></li>
|
<li class="list-group-item"><%= link_to (t :accounts), settings_accounts_path %></li>
|
||||||
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
|
<li class="list-group-item"><%= link_to 'Menu ', settings_menus_path %></li>
|
||||||
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
|
<li class="list-group-item"><%= link_to 'Menu Categories', settings_menu_categories_path %></li>
|
||||||
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
|
<!-- <li class="list-group-item"><%= link_to 'Menu Item', dashboard_path %></li> -->
|
||||||
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
|
<li class="list-group-item"><%= link_to 'Item Set', settings_item_sets_path %></li>
|
||||||
@@ -40,14 +49,14 @@
|
|||||||
<!-- <td><%= @settings_menu_category.order_by %></td> -->
|
<!-- <td><%= @settings_menu_category.order_by %></td> -->
|
||||||
<td><%= @settings_menu_category.created_at.utc.getlocal.strftime("%Y-%m-%d") %></td>
|
<td><%= @settings_menu_category.created_at.utc.getlocal.strftime("%Y-%m-%d") %></td>
|
||||||
<td><%= link_to t("views.btn.edit"), edit_settings_menu_menu_category_path(@settings_menu_category, @settings_menu_category),:class => 'btn btn-primary btn-sm waves-effect' %>
|
<td><%= link_to t("views.btn.edit"), edit_settings_menu_menu_category_path(@settings_menu_category, @settings_menu_category),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||||
|
|
||||||
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_menu_category_path(@settings_menu_category)%>" data-method="delete">
|
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_menu_category_path(@settings_menu_category)%>" data-method="delete">
|
||||||
<%= t("views.btn.delete") %>
|
<%= t("views.btn.delete") %>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<span class="hidden" id="delete_text">
|
<span class="hidden" id="delete_text">
|
||||||
<h6>Are you sure you want to delete this row ?</h6>
|
<h6>Are you sure you want to delete this row ?</h6>
|
||||||
<h6>This action can't be undo. </h6>
|
<h6>This action can't be undo. </h6>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -158,6 +167,6 @@
|
|||||||
8) <%= t("views.right_panel.button.item_options") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.item_options_txt") %> <br>
|
8) <%= t("views.right_panel.button.item_options") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.item_options_txt") %> <br>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= root_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item"><a href="<%= settings_menu_item_attributes_path %>"><%= t("views.right_panel.header.menu_item_attributes") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= settings_menu_item_attributes_path %>"><%= t("views.right_panel.header.menu_item_attributes") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
<li class="breadcrumb-item active"><%= t("views.btn.edit") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user