diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 48bb8b12..5b0c6845 100755 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -215,4 +215,12 @@ i.logout_icon{ overflow: scroll; display: inline-block; } + + .p-l-15{ + padding: 0px 10px; + } + + #order_by{ + width: 100% !important; + } } diff --git a/app/controllers/reports/shiftsale_controller.rb b/app/controllers/reports/shiftsale_controller.rb index 27645d83..0a969ca0 100755 --- a/app/controllers/reports/shiftsale_controller.rb +++ b/app/controllers/reports/shiftsale_controller.rb @@ -52,14 +52,11 @@ class Reports::ShiftsaleController < BaseReportController shift_id = params[:id] @shift = ShiftSale.find_by_id(shift_id) shift_obj = ShiftSale.where('id =?',shift_id) - puts "shift obj!!!!!" - puts shift_obj.to_json + if ENV["SERVER_MODE"] != "cloud" #no print in cloud server close_cashier_pdf = Lookup.collection_of("print_settings") - puts "close !!!!" - puts close_cashier_pdf unique_code = "CloseCashierPdf" diff --git a/app/models/sale.rb b/app/models/sale.rb index 21836a6f..40518815 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -959,7 +959,8 @@ def self.get_by_shiftsales(from,to,shift) :credit_sales => shift_sale.credit_sales, :other_sales => shift_sale.other_sales.to_f, :foc_sales => foc, - :grand_total => shift_sale.grand_total + :grand_total => shift_sale.grand_total, + :shift_id => shift_sale.id } end diff --git a/app/views/reports/receipt_no/index.html.erb b/app/views/reports/receipt_no/index.html.erb index 96747cd8..6ce18cb3 100755 --- a/app/views/reports/receipt_no/index.html.erb +++ b/app/views/reports/receipt_no/index.html.erb @@ -24,8 +24,8 @@ -
-
+
+
diff --git a/app/views/reports/receipt_no_detail/index.html.erb b/app/views/reports/receipt_no_detail/index.html.erb index ebabad70..144f9a8d 100755 --- a/app/views/reports/receipt_no_detail/index.html.erb +++ b/app/views/reports/receipt_no_detail/index.html.erb @@ -15,10 +15,10 @@
+ -
-
+
+
@@ -27,9 +27,9 @@ <% if @shift_from %> - <% if @shift_data.employee %> + <% if @shift_data.employee %> <% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %> - <% end %> + <% end %> <% end %> @@ -37,9 +37,9 @@ - + - + @@ -48,7 +48,7 @@ <% table_name=nil table_type =nil if result.table_id.to_i>0 - table = DiningFacility.find(result.table_id) + table = DiningFacility.find(result.table_id) table_type = table.type table_name = table.name end %> @@ -57,7 +57,7 @@ - + @@ -76,8 +76,8 @@ <% if item.price.to_i < 0.to_i %> <% if item.qty.to_i < 0.to_i%> [PROMO QTY]<%= item.product_name rescue '-' %> - <% else %> - [PROMO PRICE]<%= item.product_name rescue '-' %> + <% else %> + [PROMO PRICE]<%= item.product_name rescue '-' %> <% end %> <% else %> <%= item.product_name rescue '-' %> @@ -86,70 +86,70 @@ - + <% end %> - + <%survey = Survey.find_by_receipt_no(result.receipt_no)%> <% if !survey.nil?%> - + - - - <% end %> - + + + <% end %> + <% if !result.total_amount.nil?%> - + - - + + <% end %> <% if result.total_discount.to_f > 0 %> - + - - + + <% end %> - + <% if !result.total_tax.nil? %> - + - + <% end %> <% sale_payments = SalePayment.get_sale_payments(result) %> - <% if sale_payments.length > 0%> + <% if sale_payments.length > 0%> <% sale_payments.each do |rec| %> <%if rec.payment_amount.to_f > 0 %> - + - + - <% if !rec.payment_reference.nil? %> + <% if !rec.payment_reference.nil? %> - + @@ -157,10 +157,10 @@ <% end %> <% end %> <% end %> - <% if result.amount_changed != 0 && !result.amount_changed.nil? %> + <% if result.amount_changed != 0 && !result.amount_changed.nil? %> - + @@ -169,25 +169,25 @@ <% if !result.customer_id.nil?%> - + - <% end %> <% end %> - + <% end %> - + - +
<%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )
<%= t("views.right_panel.detail.shift_name") %> <%= t("views.right_panel.detail.table") %> <%= t("views.right_panel.detail.receipt_no") %><%= t :cashier %> <%= t("views.right_panel.detail.name") %><%= t :cashier %> <%= t("views.right_panel.detail.name") %> <%= t("views.right_panel.detail.revenue") %>  
<%= @shift_from %> - <%= @shift_to %> <%= table_type %> - <%= table_name %> <%= result.receipt_no rescue '-' %> <%= result.cashier_name rescue '-' %><%= result.cashier_name rescue '-' %> <%=result.grand_total%>
<%= item.qty rescue '-' %> <%= item.unit_price rescue '-' %> <%= item.price rescue '-' %><%=l item.created_at.utc.getlocal, :format => :short rescue '-' %> <%=l item.created_at.utc.getlocal, :format => :short rescue '-' %>
 
    No. of Guest <%= survey.total_customer rescue '-' %> 
 
    <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> <%= result.total_amount %> 
 
    <%= t("views.right_panel.detail.total") %> - <%= t("views.right_panel.detail.discount") %> + <%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %> - <%= result.total_discount %>  
 
    Tax Amount <%= result.total_tax %>   
    Payment <%= rec.payment_method.upcase %> <%= rec.payment_amount %> ( <%= rec.payment_status %> )  
    Payment Ref. <%= rec.payment_reference %>  
    <%= t("views.right_panel.detail.change") %> <%= t("views.right_panel.detail.amount") %> <%= result.amount_changed %>  
    Customer<%= result.customer.name rescue '-'%> + <%= result.customer.name rescue '-'%> (<%= result.customer.company rescue '-' %>)  
      Total Nett - <%= grand_total %>  
@@ -201,20 +201,20 @@ 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'); - } - + 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) ; @@ -229,50 +229,50 @@ 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; + 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'); + 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 = ''; 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 = ''; - $(data.message).each(function(index){ - + $(data.message).each(function(index){ + var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date; var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date; var shift_id = data.message[index].shift_id ; @@ -281,18 +281,18 @@ selected = 'selected = "selected"'; } else{ - selected = ''; - } + selected = ''; + } }else{ - selected = ''; - } + selected = ''; + } str += ''; - + // console.log(sh_date) - }) + }) shift.append(str); }); } }); - \ No newline at end of file + diff --git a/app/views/reports/shiftsale/index.html.erb b/app/views/reports/shiftsale/index.html.erb index 2db05f6e..40f928f9 100755 --- a/app/views/reports/shiftsale/index.html.erb +++ b/app/views/reports/shiftsale/index.html.erb @@ -65,7 +65,7 @@ <%= t("views.right_panel.detail.grand_total") %> - Print + Action diff --git a/app/views/transactions/bookings/index.html.erb b/app/views/transactions/bookings/index.html.erb index 47cc60db..b5f598e5 100755 --- a/app/views/transactions/bookings/index.html.erb +++ b/app/views/transactions/bookings/index.html.erb @@ -7,6 +7,13 @@
+
@@ -17,20 +24,20 @@ <%= form_tag transactions_bookings_path, :method => :get do %>
-
+
-
- +
+
-
- +
+
- -
+ +

@@ -96,7 +103,3 @@ }); - - - - diff --git a/app/views/transactions/bookings/show.html.erb b/app/views/transactions/bookings/show.html.erb index 4aae7c79..2ac8532f 100755 --- a/app/views/transactions/bookings/show.html.erb +++ b/app/views/transactions/bookings/show.html.erb @@ -23,7 +23,7 @@ <%= t :sale_details %> - +
@@ -78,7 +78,7 @@
- +
@@ -167,7 +167,7 @@ if(order_id!=undefined && order_id!=null && order_id!=""){ if($('#request_bill').is(":visible")) { $('#request_bill').prop("disabled",true); - } + } $.ajax({ type: "GET", url: ajax_url, @@ -176,11 +176,11 @@ $('#request_bill').prop("disabled",false); swal("Information!", result.error_message); } - else { + else { location.reload(); } } - }); + }); }else{ swal("Opps","There is no orders!","warning"); } @@ -198,10 +198,10 @@ $('#change_booking_status').prop("disabled",false); swal("Opps",result.error_message,"warning"); } - else { + else { swal({ - title: "Information", - text: result.message, + title: "Information", + text: result.message, type: "success", html: true, closeOnConfirm: false, @@ -213,8 +213,6 @@ }); } } - }); + }); }); - - diff --git a/app/views/transactions/card_sale_trans/index.html.erb b/app/views/transactions/card_sale_trans/index.html.erb index d35ef116..b9c929e8 100644 --- a/app/views/transactions/card_sale_trans/index.html.erb +++ b/app/views/transactions/card_sale_trans/index.html.erb @@ -7,6 +7,13 @@ +
@@ -17,40 +24,40 @@
- + - +
<%= form_tag transactions_card_sale_trans_path, :method => :get do %>
-
+
<% if defined? @payment_method %> -
+
- <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %> + <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %>
<% end %> <% if not defined? status %> - -
+ +
- + -
+
<% end %> -
- +
+
-
- +
+
- -
+ +

@@ -58,12 +65,12 @@ <% end %>
- +
@@ -102,7 +109,7 @@ UnionPay <% else %> <%= cardSale.app %> - <% end %> + <% end %> <%= cardSale.sale.customer.name rescue '-' %> <%= cardSale.sale.cashier_name rescue '-' %> @@ -111,18 +118,18 @@ TID : <%= cardSale.terminal_id %>
<% end %> - <% if cardSale.merchant_id != '' %> + <% if cardSale.merchant_id != '' %> MID : <%= cardSale.merchant_id %>
<% end %> - <% if cardSale.batch_no != '' %> + <% if cardSale.batch_no != '' %> Batch : <%= cardSale.batch_no %>
<% end %> - <% if cardSale.trace != '' %> + <% if cardSale.trace != '' %> Trace : <%= cardSale.trace %> - <% end %> - + <% end %> + <%= cardSale.status %> <% end %> @@ -150,24 +157,24 @@ $('#status_type').val("<%= params[:status_type] %>"); $('#sale_id').val("<%= params[:sale_id] %>"); $('#sel_period').val("<%= params[:period] %>"); - + 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'); - } - + 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) ; @@ -182,32 +189,32 @@ to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear(); $('#to').val(to); search_by_date(); - }); - + }); + function search_by_date(){ from = $("#from").val(); - to = $("#to").val(); + to = $("#to").val(); var period = 0; - var period_type = 1; + var period_type = 1; if(to != '' && from != ''){ shift_name = from + ',' + to; check_arr.push(to); - + console.log(check_arr.length) if(check_arr.length == 1){ - show_shift_name(period,period_type,from,to,'shift_item'); + 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'); if (from == '' && to == '') { @@ -215,18 +222,18 @@ to = $("#to").val(); } shift.empty(); - + var str = ''; - var param_shift = ''; + var param_shift = ''; var param_shift = '<%= params[:shift_name] rescue '-'%>'; url = '<%= reports_get_shift_by_date_path %>'; - + $.get(url, {period :period, period_type :period_type, from :from, to :to, report_type :shift_item} , function(data){ str = ''; - $(data.message).each(function(index){ - + $(data.message).each(function(index){ + var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date; var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date; var shift_id = data.message[index].shift_id ; @@ -235,18 +242,18 @@ selected = 'selected = "selected"'; } else{ - selected = ''; - } + selected = ''; + } }else{ - selected = ''; - } + selected = ''; + } str += ''; - + // console.log(sh_date) - }) + }) shift.append(str); }); } }); - \ No newline at end of file + diff --git a/app/views/transactions/card_settle_trans/index.html.erb b/app/views/transactions/card_settle_trans/index.html.erb index 7cbc3573..d6597d08 100644 --- a/app/views/transactions/card_settle_trans/index.html.erb +++ b/app/views/transactions/card_settle_trans/index.html.erb @@ -7,6 +7,13 @@
+
@@ -17,40 +24,40 @@ <%= form_tag transactions_card_settle_trans_path, :method => :get do %>
-
+
<% if defined? @payment_method %> -
+
- <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %> + <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %>
<% end %> <% if not defined? status %> - -
+ +
- + -
+
<% end %> -
- +
+
-
- +
+
- -
+ +

@@ -58,14 +65,14 @@ <% end %> - + - + - +
-
+
@@ -128,20 +135,20 @@ 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'); - } - + 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) ; @@ -156,50 +163,50 @@ 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; + 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'); + 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 = ''; 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 = ''; - $(data.message).each(function(index){ - + $(data.message).each(function(index){ + var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date; var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date; var shift_id = data.message[index].shift_id ; @@ -208,19 +215,19 @@ selected = 'selected = "selected"'; } else{ - selected = ''; - } + selected = ''; + } }else{ - selected = ''; - } + selected = ''; + } str += ''; - + // console.log(sh_date) - }) + }) shift.append(str); }); } }); - \ No newline at end of file + diff --git a/app/views/transactions/credit_notes/index.html.erb b/app/views/transactions/credit_notes/index.html.erb index 2df29368..754cffb9 100755 --- a/app/views/transactions/credit_notes/index.html.erb +++ b/app/views/transactions/credit_notes/index.html.erb @@ -5,7 +5,7 @@
  • Credit Note
  • - + --> @@ -18,6 +18,13 @@ +
    @@ -28,11 +35,11 @@
    - + - +
    <%= form_tag transactions_credit_notes_path, :method => :get do %>
    -
    +
    -
    +
    +
    -
    +
    - <%= select_tag "order_source", options_for_select(@sources, :selected => params[:order_source]), :class => "form-control" %> + <%= select_tag "order_source", options_for_select(@sources, :selected => params[:order_source]), :class => "form-control" %>
    -
    - +
    +
    -
    - +
    +
    - -
    + +

    @@ -63,10 +70,10 @@ <% end %>
    @@ -109,14 +116,14 @@ <%= sale.cashier_name rescue '-' %> <%= link_to sale.customer.name, crm_customer_path(sale.customer_id) %> - + <%if sale.source == "cashier" || sale.source == "emenu" %> Cashier <% elsif sale.source == "quick_service" %> Quick Service <% else %> Online Order - <% end %> + <% end %> <%= sale.receipt_date.strftime("%d-%m-%Y %I:%M %p") %> @@ -152,7 +159,7 @@ } // console.log(arr_sale); }); - + $(".credit_payment").on('click', function(){ $.ajax({ type: 'POST', @@ -194,8 +201,3 @@ return arr_item; } - - - - - diff --git a/app/views/transactions/order_reservations/index.html.erb b/app/views/transactions/order_reservations/index.html.erb index dc0f9564..d7ba3527 100644 --- a/app/views/transactions/order_reservations/index.html.erb +++ b/app/views/transactions/order_reservations/index.html.erb @@ -7,6 +7,13 @@
    +
    @@ -17,13 +24,13 @@ <%= form_tag transactions_order_reservations_path, :method => :get do %>
    -
    +
    -
    - +
    +
    -
    - +
    +
    -
    - +
    +
    -
    +

    @@ -56,18 +63,18 @@ <% end %> - + - + - +
    - + @@ -112,8 +119,8 @@ %> <% if @order_reservations != 0 %> <% @order_reservations.each do |order_reservation| %> - <% - provider = "" + <% + provider = "" discount_amount = order_reservation.discount_amount delivery_fee = order_reservation.delivery_fee ? order_reservation.delivery_fee : 0.0 convenience_charge = order_reservation.convenience_charge @@ -187,4 +194,4 @@ $('#sel_period').val("<%= params[:period] %>"); $('#filter').val("<%= params[:filter] %>"); }); - \ No newline at end of file + diff --git a/app/views/transactions/orders/index.html.erb b/app/views/transactions/orders/index.html.erb index 41aa63e6..47216911 100755 --- a/app/views/transactions/orders/index.html.erb +++ b/app/views/transactions/orders/index.html.erb @@ -8,12 +8,19 @@ +
    <%= form_tag transactions_orders_path, :method => :get do %>
    -
    +
    @@ -24,31 +31,31 @@ 0
    - +
    --> -
    - +
    +
    -
    - +
    +
    - -
    + +

    -
    -
    +
    +
    <% end %>
    <%= t("views.right_panel.detail.order_reservation_id") %> <%= t("views.right_panel.detail.sale_id") %>
    - + - + @@ -60,7 +67,7 @@ - <% @orders.each do |order| + <% @orders.each do |order| @dining = BookingOrder.find_by_order_id(order.order_id).booking.dining_facility %> @@ -73,13 +80,13 @@ - + <% end %>
    <%= t("views.right_panel.detail.order_id") %><%= t :table %>/<%= t :room %> <%= t("views.right_panel.detail.order_by") %> <%= t("views.right_panel.detail.type") %>
    <%= order.status %> <%= order.date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> <%= order.item_count %>

    - + <%if !@orders.nil?%> <%= paginate @orders %> <%end%> diff --git a/app/views/transactions/sales/index.html.erb b/app/views/transactions/sales/index.html.erb index 8e815b32..7ca7c08f 100644 --- a/app/views/transactions/sales/index.html.erb +++ b/app/views/transactions/sales/index.html.erb @@ -7,6 +7,13 @@
    +
    @@ -17,13 +24,13 @@ <%= form_tag transactions_sales_path, :method => :get do %>
    -
    +
    -
    - +
    +
    -
    - +
    +
    -
    - +
    +
    -
    - +
    +
    - -
    + +

    @@ -62,18 +69,18 @@ <% end %> - + - + - +
    - + @@ -144,24 +151,24 @@ $('#from').val("<%= params[:from] %>"); $('#to').val("<%= params[:to] %>"); $('#sel_period').val("<%= params[:period] %>"); - + 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'); - } - + 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) ; @@ -176,32 +183,32 @@ to = new_date.getDate() + "-" + month + "-" + new_date.getFullYear(); $('#to').val(to); search_by_date(); - }); - + }); + function search_by_date(){ from = $("#from").val(); - to = $("#to").val(); + to = $("#to").val(); var period = 0; - var period_type = 1; + var period_type = 1; if(to != '' && from != ''){ shift_name = from + ',' + to; check_arr.push(to); - + console.log(check_arr.length) if(check_arr.length == 1){ - show_shift_name(period,period_type,from,to,'shift_item'); + 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'); if (from == '' && to == '') { @@ -209,18 +216,18 @@ to = $("#to").val(); } shift.empty(); - + var str = ''; - var param_shift = ''; + var param_shift = ''; var param_shift = '<%= params[:shift_name] rescue '-'%>'; url = '<%= reports_get_shift_by_date_path %>'; - + $.get(url, {period :period, period_type :period_type, from :from, to :to, report_type :shift_item} , function(data){ str = ''; - $(data.message).each(function(index){ - + $(data.message).each(function(index){ + var local_date = data.message[index].local_opening_date + ' - ' + data.message[index].local_closing_date; var sh_date = data.message[index].opening_date + ' - ' + data.message[index].closing_date; var shift_id = data.message[index].shift_id ; @@ -229,18 +236,18 @@ selected = 'selected = "selected"'; } else{ - selected = ''; - } + selected = ''; + } }else{ - selected = ''; - } + selected = ''; + } str += ''; - + // console.log(sh_date) - }) + }) shift.append(str); }); } }); - \ No newline at end of file + diff --git a/app/views/transactions/shift_sales/index.html.erb b/app/views/transactions/shift_sales/index.html.erb index 481b52c8..01c4f17f 100755 --- a/app/views/transactions/shift_sales/index.html.erb +++ b/app/views/transactions/shift_sales/index.html.erb @@ -7,6 +7,13 @@ +
    @@ -21,7 +28,7 @@
    -
    +
    @@ -29,7 +36,7 @@
    - +

    @@ -107,6 +114,3 @@ }); - - - diff --git a/app/views/transactions/surveys/_survey_report_filter.html.erb b/app/views/transactions/surveys/_survey_report_filter.html.erb index 78a988b9..8d7ba96f 100644 --- a/app/views/transactions/surveys/_survey_report_filter.html.erb +++ b/app/views/transactions/surveys/_survey_report_filter.html.erb @@ -1,25 +1,25 @@ <%= form_tag transactions_surveys_path, :method => :get, :id=>"frm_report", :class => "form" do %>
    -
    +
    -
    - +
    +
    -
    - +
    +
    - -
    + +

    -
    -
    +
    +
    <% end %> \ No newline at end of file + diff --git a/app/views/transactions/surveys/index.html.erb b/app/views/transactions/surveys/index.html.erb index a57d724f..377d69cf 100644 --- a/app/views/transactions/surveys/index.html.erb +++ b/app/views/transactions/surveys/index.html.erb @@ -7,6 +7,13 @@
    +
    @@ -67,8 +74,8 @@ <% foreigner_lists = foreign.split(",") %> <% if !foreigner_lists.empty? %> <% foreigner_lists.each do |fgn| %> - <% unless fgn.match(/[^[:digit:]]+/) - total_foreigner = total_foreigner.to_i + fgn.to_i + <% unless fgn.match(/[^[:digit:]]+/) + total_foreigner = total_foreigner.to_i + fgn.to_i end %> <% if !fgn.scan(/\D/).empty? %> <%= fgn %> :<% end %> <%= fgn.to_i unless fgn.match(/[^[:digit:]]+/) %>
    @@ -104,4 +111,4 @@ $("#from").val("<%=params[:from] rescue '-'%>"); $("#to").val("<%=params[:to] rescue '-'%>"); }); - \ No newline at end of file + diff --git a/config/facebook.yml b/config/facebook.yml deleted file mode 100644 index a60b0def..00000000 --- a/config/facebook.yml +++ /dev/null @@ -1,11 +0,0 @@ -development: -## with doemal account -app_id: 1049017345154593 -secret: 36b2d6132deb803aa9d503d0034e7a68 - -## My account -#app_id: 434807636720506 -#secret: b94c5e35cde5a2c13cfb2e1ba8be30c6 - - - \ No newline at end of file diff --git a/config/puma.rb b/config/puma.rb index 6a545bed..99c23b5a 100755 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,3 +1,4 @@ + # application_path="#{File.expand_path("../..", __FILE__)}" # directory application_path # #environment ENV.fetch("RAILS_ENV") { "production" } diff --git a/config/secrets.yml b/config/secrets.yml index 0536042a..40e0906e 100755 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -11,12 +11,20 @@ # if you're sharing your code publicly. development: - secret_key_base: a17cafd23cb0d29cf61d909be65790f19f25a117683b25a23419b8cdf87d9ec21135e031130f6192998e385017ec1c3250e493c0e42c2e6241b66e14048c6eb5 + secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61 + sx_provision_url: connect.smartsales.asia/api #connect.smartsales.dev/api #connect.smartsales.asia/api #provision.zsai.ws/api + server_mode: application + cipher_type: AES-256-CBC + sx_key: Wh@t1$C2L test: - secret_key_base: 477062b07514b11d98ad096b82d81cd692af7a9f084e022dc65cfe02b26b01d11dcf950e624927894a3a1850fde5c82c0b27d8a24686b6c2d522154d0adaffec + secret_key_base: 5c92143fd4a844fdaf8b22aba0cda22ef1fc68f1b26dd3d40656866893718ae5e58625b4c3a5dc86b04c8be0a505ec0ebc0be3bf52249a3d1e0c1334ee591cf0 # Do not keep production secrets in the repository, # instead read values from the environment. production: - secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> + secret_key_base: c4bc81065013f9a3506d385bcbd49586c42e586488144b0de90c7da36867de9fa880f46b5c4f86f0ce9b7c783bb5a73bdb0e5605a47716567294390e726d3e22 + sx_provision_url: connect.smartsales.asia/api #192.168.1.147:3002/api + server_mode: application + cipher_type: AES-256-CBC + sx_key: Wh@t1$C2L
    <%= t("views.right_panel.detail.sale_id") %> <%= t("views.right_panel.detail.receipt_no") %>