Merge branch 'r-1902001-01' into foodcourt

This commit is contained in:
Thein Lin Kyaw
2020-09-10 10:31:07 +06:30
184 changed files with 2672 additions and 1021 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View 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

View File

@@ -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?

View File

@@ -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: {

View File

@@ -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)

View File

@@ -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

View File

@@ -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!

View File

@@ -262,10 +262,7 @@
$("#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,6 +309,7 @@
$("#sxModal").hide(); $("#sxModal").hide();
//$("#filter_form").submit(); //$("#filter_form").submit();
} }
$("#sxModal").hide();
} }
$("#sxModal .btn_cancel").on('click',function(){ $("#sxModal .btn_cancel").on('click',function(){

View File

@@ -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) {

View File

@@ -1,4 +1,14 @@
<% 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">
@@ -230,4 +240,3 @@
</div> </div>
</div> </div>

View File

@@ -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">

View File

@@ -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 -->

View File

@@ -1,3 +1,15 @@
<div class="container-fluid"> <div class="container-fluid">
<%= render 'form', dining_queue: @dining_queue %> <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"><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> </div>

View File

@@ -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;">

View File

@@ -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">

View File

@@ -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">

View File

@@ -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 %>

View File

@@ -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">

View File

@@ -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>

View File

@@ -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>

View File

@@ -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 %>

View File

@@ -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>
@@ -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="";

View File

@@ -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 -->
@@ -252,74 +247,9 @@
// 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,8 +261,71 @@
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

View File

@@ -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 -->
@@ -248,74 +248,9 @@
// 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,8 +262,73 @@
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

View File

@@ -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

View File

@@ -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">

View File

@@ -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">

View File

@@ -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 %>

View File

@@ -1,7 +1,14 @@
<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">
@@ -80,4 +87,3 @@
</div> </div>
</div> </div>
</div> </div>

View File

@@ -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 %>

View File

@@ -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">
@@ -107,7 +116,3 @@
</div> </div>
</div> </div>
</div> </div>

View File

@@ -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 %>

View File

@@ -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 %>

View File

@@ -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"> -->

View File

@@ -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} %>

View 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>

View 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">&nbsp;</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">&nbsp;</td>
</tr>
<%end%>
<tr style="border-top:4px double #666;">
<td colspan="4">&nbsp;</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">&nbsp;</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>

View 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">&nbsp;</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">&nbsp;</td>
</tr>
<%end%>
<tr style="border-top:4px double #666;">
<td colspan="4">&nbsp;</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">&nbsp;</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>

View File

@@ -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 %>

View File

@@ -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 %>

View File

@@ -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',

View File

@@ -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',

View File

@@ -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">

View File

@@ -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 %>

View File

@@ -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 %>

View File

@@ -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">

View File

@@ -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',

View File

@@ -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',

View File

@@ -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">

View File

@@ -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',

View File

@@ -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">

View File

@@ -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"> -->

View File

@@ -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 %>

View File

@@ -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 %>

View File

@@ -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">

View File

@@ -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">
@@ -65,4 +74,3 @@
</div> </div>
</div> </div>
</div> </div>

View File

@@ -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">

View File

@@ -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">

View File

@@ -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">

View File

@@ -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.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 %> <%= render 'form', settings_cashier_terminal: @settings_cashier_terminal %>

View File

@@ -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">

View File

@@ -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 %>

View File

@@ -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">
@@ -120,4 +129,3 @@
</div> </div>
</div> </div>
</div> </div>

View File

@@ -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 %>

View File

@@ -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">

View File

@@ -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 %>

View File

@@ -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">

View File

@@ -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_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 %> <%= render 'form', commission: @commission %>

View File

@@ -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">

View File

@@ -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 %>

View File

@@ -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 %>

View File

@@ -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 %>

View File

@@ -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 %>

View File

@@ -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">

View File

@@ -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 %>

View File

@@ -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>
@@ -96,5 +105,3 @@
</div> </div>
</div> </div>
</div> </div>

View File

@@ -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">

View File

@@ -1,4 +1,13 @@
<% 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">
@@ -79,4 +88,3 @@
</div> </div>
</div> </div>
</div> </div>

View File

@@ -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">

View File

@@ -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">

View File

@@ -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 %>

View File

@@ -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">
@@ -65,4 +73,3 @@
</div> </div>
</div> </div>
</div> </div>

View File

@@ -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">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 %> <%= render 'form', settings_lookup: @settings_lookup %>

View File

@@ -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">

View File

@@ -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">

View File

@@ -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>

View File

@@ -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">

View File

@@ -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">

View File

@@ -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">

View File

@@ -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>

View File

@@ -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">

View File

@@ -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>

View File

@@ -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 %>

View File

@@ -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 %>

View File

@@ -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 %>

View File

@@ -1,4 +1,13 @@
<% 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">

View File

@@ -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