diff --git a/app/controllers/reports/card_settle_tran_controller.rb b/app/controllers/reports/card_settle_tran_controller.rb new file mode 100644 index 00000000..ac10d48b --- /dev/null +++ b/app/controllers/reports/card_settle_tran_controller.rb @@ -0,0 +1,135 @@ +class Reports::CardSettleTranController < BaseReportController + authorize_resource :class => false + + # GET /transactions/sales + # GET /transactions/sales.json + def index + @payment_method = [["All Payments",''],["MPU Payment","mpu"], ["Visa Payment","visa"], + ["Master Payment","master"], ["JCB Payment","jcb"],["UnionPay Payment","unionpay"], + ["Alipay Payment","alipay"]] + @sales = Sale.all + payment_type = params[:payment_type] + + from, to = get_date_range_from_params + status = 'Approved' + @shift_sale_range = '' + @shift = '' + + if params[:shift_name].to_i != 0 + + @shift_sale_range = CardSettleTran.get_by_shift_sale_by_card(from,to,status) + + @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 + + if from.nil? && to.nil? && payment_method.nil? && @shift.nil? + + @cardSettles = CardSettleTran.order("sale_id desc") + + @cardSettles = Kaminari.paginate_array(@cardSettles).page(params[:page]).per(20) + else + cardSettle = CardSettleTran.searchReport(from,to,payment_type,@shift_sale_range,@shift) + if cardSettle.count > 0 + @cardSettles = cardSettle + @cardSettles = Kaminari.paginate_array(@cardSettles).page(params[:page]).per(20) + else + @cardSettles = 0 + end + end + + @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 + + # date range + PERIOD = { + "today" => 0, + "yesterday" => 1, + "this_week" => 2, + "last_week" => 3, + "last_7" => 4, + "this_month" => 5, + "last_month" => 6, + "last_30" => 7, + "this_year" => 8, + "last_year" => 9 + } + + def get_date_range_from_params + period_type = params[:period_type] + period = params[:period] + from = params[:from] + to = params[:to] + day_ref = Time.now.utc.getlocal + if from.present? && to.present? + f_date = DateTime.parse(from) + t_date = DateTime.parse(to) + f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec) + t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec) + from = f_time.beginning_of_day.utc.getlocal + to = t_time.end_of_day.utc.getlocal + else + case period.to_i + when PERIOD["today"] + from = day_ref.beginning_of_day.utc + to = day_ref.end_of_day.utc + + when PERIOD["yesterday"] + from = (day_ref - 1.day).beginning_of_day.utc + to = (day_ref - 1.day).end_of_day.utc + + when PERIOD["this_week"] + from = Time.now.beginning_of_week.utc + to = Time.now.utc + when PERIOD["last_week"] + from = (day_ref - 7.day).beginning_of_week.utc + to = (day_ref - 7.day).end_of_week.utc + when PERIOD["last_7"] + from = (day_ref - 7.day).utc + to = Time.now.utc + when PERIOD["this_month"] + from = Time.now.beginning_of_month.utc + to = Time.now.utc + when PERIOD["last_month"] + from = (day_ref - 1.month).beginning_of_month.utc + to = (day_ref - 1.month).end_of_month.utc + when PERIOD["last_30"] + from = (day_ref - 30.day).utc + to = Time.now.utc + when PERIOD["this_year"] + from = Time.now.beginning_of_year.utc + to = Time.now.utc + when PERIOD["last_year"] + from = (day_ref - 1.year).beginning_of_year.utc + to = (day_ref - 1.year).end_of_year.utc + end + end + + return from, to + end + +end diff --git a/app/controllers/transactions/card_settle_trans_controller.rb b/app/controllers/transactions/card_settle_trans_controller.rb new file mode 100644 index 00000000..8c071509 --- /dev/null +++ b/app/controllers/transactions/card_settle_trans_controller.rb @@ -0,0 +1,105 @@ +class Transactions::CardSettleTransController < ApplicationController + authorize_resource :class => false + + # GET /transactions/sales + # GET /transactions/sales.json + def index + @status = [["All Status",''], ["Approved","Approved"], ["Declined","Declined"]] + @payment_method = [["All Payments",''],["MPU Payment","mpu"], ["Visa Payment","visa"], + ["Master Payment","master"], ["JCB Payment","jcb"],["UnionPay Payment","unionpay"], + ["Alipay Payment","alipay"]] + @sales = Sale.all + # byebug + payment_type = params[:payment_type] + sale_id = params[:sale_id] + status_type = params[:status_type] + + # from = params[:from] + # to = params[:to] + from, to = get_date_range_from_params + + if sale_id.nil? && from.nil? && to.nil? && payment_method.nil? && status_type.nil? + + @cardSettles = CardSettleTran.order("sale_id desc") + + @cardSettles = Kaminari.paginate_array(@cardSettles).page(params[:page]).per(20) + else + cardSettle = CardSettleTran.search(sale_id,from,to,payment_type,status_type) + if cardSettle.count > 0 + @cardSettles = cardSettle + @cardSettles = Kaminari.paginate_array(@cardSettles).page(params[:page]).per(20) + else + @cardSettles = 0 + end + end + + end + + # date range + PERIOD = { + "today" => 0, + "yesterday" => 1, + "this_week" => 2, + "last_week" => 3, + "last_7" => 4, + "this_month" => 5, + "last_month" => 6, + "last_30" => 7, + "this_year" => 8, + "last_year" => 9 + } + + def get_date_range_from_params + period_type = params[:period_type] + period = params[:period] + from = params[:from] + to = params[:to] + day_ref = Time.now.utc.getlocal + if from.present? && to.present? + f_date = DateTime.parse(from) + t_date = DateTime.parse(to) + f_time = Time.mktime(f_date.year,f_date.month,f_date.day,f_date.hour,f_date.min,f_date.sec) + t_time = Time.mktime(t_date.year,t_date.month,t_date.day,t_date.hour,t_date.min,t_date.sec) + from = f_time.beginning_of_day.utc.getlocal + to = t_time.end_of_day.utc.getlocal + else + case period.to_i + when PERIOD["today"] + from = day_ref.beginning_of_day.utc + to = day_ref.end_of_day.utc + + when PERIOD["yesterday"] + from = (day_ref - 1.day).beginning_of_day.utc + to = (day_ref - 1.day).end_of_day.utc + + when PERIOD["this_week"] + from = Time.now.beginning_of_week.utc + to = Time.now.utc + when PERIOD["last_week"] + from = (day_ref - 7.day).beginning_of_week.utc + to = (day_ref - 7.day).end_of_week.utc + when PERIOD["last_7"] + from = (day_ref - 7.day).utc + to = Time.now.utc + when PERIOD["this_month"] + from = Time.now.beginning_of_month.utc + to = Time.now.utc + when PERIOD["last_month"] + from = (day_ref - 1.month).beginning_of_month.utc + to = (day_ref - 1.month).end_of_month.utc + when PERIOD["last_30"] + from = (day_ref - 30.day).utc + to = Time.now.utc + when PERIOD["this_year"] + from = Time.now.beginning_of_year.utc + to = Time.now.utc + when PERIOD["last_year"] + from = (day_ref - 1.year).beginning_of_year.utc + to = (day_ref - 1.year).end_of_year.utc + end + end + + return from, to + end + +end diff --git a/app/models/card_settle_tran.rb b/app/models/card_settle_tran.rb index 29670946..a3166e91 100644 --- a/app/models/card_settle_tran.rb +++ b/app/models/card_settle_tran.rb @@ -1,2 +1,81 @@ class CardSettleTran < ApplicationRecord + + belongs_to :shift_sale + + def self.search(filter,from,to,payment_type,status_type) + if filter.blank? + keyword = '' + else + keyword = " e.name LIKE ?","%#{filter}%" + end + + if payment_type.blank? + payment = '' + else + if payment_type == 'unionpay' + payment = " req_type LIKE 'cup'" + else + payment = " req_type LIKE '#{payment_type}'" + end + end + + if status_type.blank? + status = '' + else + status = " status = '#{status_type}'" + end + + if from.present? && to.present? + + from_date = from.strftime("%Y-%m-%d") + to_date = to.strftime("%Y-%m-%d") + query = CardSettleTran.joins("Join shift_sales ss ON ss.id = card_settle_trans.shift_sale_id"+ + " JOIN employees e ON e.id = ss.employee_id") + cardSettle = query.where("req_date >= ? and req_date <= ?",from_date,to_date) + query1 = cardSettle.where(keyword) + query2 = query1.where(payment) + query3 = query2.where(status) + + end + end + + def self.searchReport(from,to,payment_type,shift_sale_range,shift) + + if payment_type.blank? + payment = '' + else + if payment_type == 'unionpay' + payment = " req_type LIKE 'cup'" + else + payment = " req_type LIKE '#{payment_type}'" + end + end + + if from.present? && to.present? + + from_date = from.strftime("%Y-%m-%d") + to_date = to.strftime("%Y-%m-%d") + query = CardSettleTran.joins("Join shift_sales ss ON ss.id = card_settle_trans.shift_sale_id"+ + " JOIN employees e ON e.id = ss.employee_id") + cardSettle = query.where("req_date >= ? and req_date <= ? and status = 'Approved'",from_date,to_date) + + if shift.present? + query1 = cardSettle.where("ss.id in (?)", shift.to_a) + elsif shift_sale_range.present? + query1 = cardSettle.where("ss.id in (?)",shift_sale_range.to_a) + else + query1 = cardSettle.where("req_date between ? and ?",from,to) + end + query2 = query1.where(payment) + + end + end + + def self.get_by_shift_sale_by_card(from,to,status) + query = ShiftSale.select("shift_sales.id ,shift_started_at AS opening_date, + shift_closed_at As closing_date,") + .order("shift_sales.id DESC") + return query = query.where("shift_sales.shift_started_at >= ?" , from) + byebug + end end diff --git a/app/views/layouts/_left_sidebar.html.erb b/app/views/layouts/_left_sidebar.html.erb index 4052ed56..1e081e92 100644 --- a/app/views/layouts/_left_sidebar.html.erb +++ b/app/views/layouts/_left_sidebar.html.erb @@ -130,7 +130,7 @@ <% end %> <% if can? :menage, Sale %>
  • - <%= t :cb_settlement %> + <%= t :cb_settlement %>
  • <% end %> @@ -187,6 +187,9 @@
  • CB Payments
  • +
  • + CB Settlement +
  • <%end%> diff --git a/app/views/reports/card_sale_tran/index.html.erb b/app/views/reports/card_sale_tran/index.html.erb index 673da3ae..3f66daf9 100644 --- a/app/views/reports/card_sale_tran/index.html.erb +++ b/app/views/reports/card_sale_tran/index.html.erb @@ -59,7 +59,13 @@ <%= cardSale.res_date %> <%= cardSale.res_time.utc.getlocal.strftime("%I:%M %p") %> <%= cardSale.ref_no %> <%= cardSale.res_amt %> - <%= cardSale.app %> + + <% if cardSale.app == 'cup' %> + UNION + <% else %> + <%= cardSale.app %> + <% end %> + <%= cardSale.sale.customer.name rescue '-' %> <%= cardSale.sale.cashier_name rescue '-' %> TID : <%= cardSale.terminal_id %> diff --git a/app/views/reports/card_sale_tran/index.xls.erb b/app/views/reports/card_sale_tran/index.xls.erb index 145dce33..59f32939 100644 --- a/app/views/reports/card_sale_tran/index.xls.erb +++ b/app/views/reports/card_sale_tran/index.xls.erb @@ -47,7 +47,13 @@ <%= cardSale.res_date %> <%= cardSale.res_time.utc.getlocal.strftime("%I:%M %p") %> <%= cardSale.ref_no %> <%= cardSale.res_amt %> - <%= cardSale.app %> + + <% if cardSale.app == 'cup' %> + UNION + <% else %> + <%= cardSale.app %> + <% end %> + <%= cardSale.sale.customer.name rescue '-' %> <%= cardSale.sale.cashier_name rescue '-' %> TID : <%= cardSale.terminal_id %> diff --git a/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb b/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb new file mode 100644 index 00000000..0d70fe4f --- /dev/null +++ b/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb @@ -0,0 +1,144 @@ +
    + <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> + <% if period_type != false %> +
    + + <% if defined? @payment_method %> +
    + + <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %> +
    + <% end %> +
    + + +
    + <% if not defined? payments %> + +
    + + + +
    + <% end %> +
    + + + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    +
    + <% end %> + + <% end %> +
    + + diff --git a/app/views/reports/card_settle_tran/index.html.erb b/app/views/reports/card_settle_tran/index.html.erb new file mode 100644 index 00000000..9d11fbc8 --- /dev/null +++ b/app/views/reports/card_settle_tran/index.html.erb @@ -0,0 +1,191 @@ + +
    +
    + + <%= render :partial=>'shift_card_settle_tran_report_filter', + :locals=>{ :period_type => true, :shift_name => true,:payments => true, :report_path =>reports_card_settle_tran_index_path} %> +
    + + + +
    +
    + + + + + + + <% if @shift_from %> + + <% if @shift_data.employee %> + <% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %> + <% end %> + + + <% end %> + + + + + + + + + + + + + + + + + <% if @cardSettles != 0 %> + <% @cardSettles.each do |cardSettle| %> + + + + + + + + + + + + + + <% end %> + <% else %> + + <% end %> + +
    <%= 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 '-'%>
    <%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )
    <%= t("views.right_panel.detail.shift_sale_id") %><%= t("views.right_panel.detail.req_date") %><%= t("views.right_panel.detail.req_type") %><%= t("views.right_panel.detail.res_date") %><%= t("views.right_panel.detail.res_type") %><%= t("views.right_panel.detail.employee_name") %><%= t("views.right_panel.detail.sale_cnt") %><%= t("views.right_panel.detail.sale_amount") %><%= t("views.right_panel.detail.void_cnt") %><%= t("views.right_panel.detail.void_amount") %><%= t("views.right_panel.detail.status") %>
    <%= cardSettle.shift_sale.shift_started_at.strftime("%e %b %I:%M%p") rescue '-' %> - <%= cardSettle.shift_sale.shift_closed_at ? cardSettle.shift_sale.shift_closed_at.strftime("%e %b %I:%M%p") : '-' %><%= cardSettle.req_date %> <%= cardSettle.req_time.utc.getlocal.strftime("%I:%M %p") %> + <% if cardSettle.req_type == 'CUP' %> + UNION + <% else %> + <%= cardSettle.req_type %> + <% end %> + <%= cardSettle.res_date %> <%= cardSettle.res_time.utc.getlocal.strftime("%I:%M %p") %> + <% if cardSettle.res_type == 'CUP' %> + UNION + <% else %> + <%= cardSettle.res_type %> + <% end %> + <%= cardSettle.shift_sale.employee.name %><%= cardSettle.sale_cnt %><%= cardSettle.sale_amt %><%= cardSettle.void_cnt %><%= cardSettle.void_amt %><%= cardSettle.status %>

    There is no data for search....

    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/reports/card_settle_tran/index.xls.erb b/app/views/reports/card_settle_tran/index.xls.erb new file mode 100644 index 00000000..38d3b115 --- /dev/null +++ b/app/views/reports/card_settle_tran/index.xls.erb @@ -0,0 +1,79 @@ + + + + + + + +
    +
    +
    +
    + + + + + + <% if @shift_from %> + + <% if @shift_data.employee %> + <% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %> + <% end %> + + + <% end %> + + + + + + + + + + + + + + + + + <% if @cardSettles != 0 %> + <% @cardSettles.each do |cardSettle| %> + + + + + + + + + + + + + + <% end %> + <% else %> + + <% end %> + +
    <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to ? @to.utc.getlocal.strftime("%Y-%b-%d") : '-'%>
    <%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )
    <%= t("views.right_panel.detail.shift_sale_id") %><%= t("views.right_panel.detail.req_date") %><%= t("views.right_panel.detail.req_type") %><%= t("views.right_panel.detail.res_date") %><%= t("views.right_panel.detail.res_type") %><%= t("views.right_panel.detail.employee_name") %><%= t("views.right_panel.detail.sale_cnt") %><%= t("views.right_panel.detail.sale_amount") %><%= t("views.right_panel.detail.void_cnt") %><%= t("views.right_panel.detail.void_amount") %><%= t("views.right_panel.detail.status") %>
    <%= cardSettle.shift_sale.shift_started_at.strftime("%e %b %I:%M%p") rescue '-' %> - <%= cardSettle.shift_sale.shift_closed_at ? cardSettle.shift_sale.shift_closed_at.strftime("%e %b %I:%M%p") : '-' %><%= cardSettle.req_date %> <%= cardSettle.req_time.utc.getlocal.strftime("%I:%M %p") %> + <% if cardSettle.req_type == 'CUP' %> + UNION + <% else %> + <%= cardSettle.req_type %> + <% end %> + <%= cardSettle.res_date %> <%= cardSettle.res_time.utc.getlocal.strftime("%I:%M %p") %> + <% if cardSettle.res_type == 'CUP' %> + UNION + <% else %> + <%= cardSettle.res_type %> + <% end %> + <%= cardSettle.shift_sale.employee.name %><%= cardSettle.sale_cnt %><%= cardSettle.sale_amt %><%= cardSettle.void_cnt %><%= cardSettle.void_amt %><%= cardSettle.status %>

    There is no data for search....

    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/transactions/card_sale_trans/index.html.erb b/app/views/transactions/card_sale_trans/index.html.erb index a3d2a88a..8ad6ded0 100644 --- a/app/views/transactions/card_sale_trans/index.html.erb +++ b/app/views/transactions/card_sale_trans/index.html.erb @@ -96,7 +96,13 @@ <%= cardSale.res_date %> <%= cardSale.res_time.utc.getlocal.strftime("%I:%M %p") %> <%= cardSale.ref_no %> <%= cardSale.res_amt %> - <%= cardSale.app %> + + <% if cardSale.app == 'cup' %> + UNION + <% else %> + <%= cardSale.app %> + <% end %> + <%= cardSale.sale.customer.name rescue '-' %> <%= cardSale.sale.cashier_name rescue '-' %> @@ -176,7 +182,7 @@ search_by_date(); }); - function search_by_date(){ + function search_by_date(){ from = $("#from").val(); to = $("#to").val(); @@ -196,9 +202,50 @@ 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 == '') { + from = $("#from").val(); + to = $("#to").val(); + } + shift.empty(); + + var str = ''; + var param_shift = ''; + var param_shift = '<%= params[:shift_name] rescue '-'%>'; + + url = '<%= reports_get_shift_by_date_path %>'; + + $.get(url, {period :period, period_type :period_type, from :from, to :to, report_type :shift_item} , function(data){ + + str = ''; + $(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 += ''; + + // console.log(sh_date) + }) + shift.append(str); + }); + } + }); + }); diff --git a/app/views/transactions/card_sale_trans/show.json.jbuilder b/app/views/transactions/card_sale_trans/show.json.jbuilder deleted file mode 100644 index 48c70528..00000000 --- a/app/views/transactions/card_sale_trans/show.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.partial! "transactions_sales/transactions_sale", transactions_sale: @transactions_sale diff --git a/app/views/transactions/card_settle_trans/index.html.erb b/app/views/transactions/card_settle_trans/index.html.erb new file mode 100644 index 00000000..d01cdb5a --- /dev/null +++ b/app/views/transactions/card_settle_trans/index.html.erb @@ -0,0 +1,233 @@ + +
    +
    +
    +
    + + + + + + + + + +
    + <%= 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" %> +
    + <% end %> + + <% if not defined? status %> + +
    + + + +
    + <% end %> +
    + + +
    +
    + + +
    + +
    + +
    +
    +
    + <% end %> +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + <% if @cardSettles != 0 %> + <% @cardSettles.each do |cardSettle| %> + + + + + + + + + + + + + + <% end %> + <% else %> + + <% end %> + +
    <%= t("views.right_panel.detail.shift_sale_id") %><%= t("views.right_panel.detail.req_date") %><%= t("views.right_panel.detail.req_type") %><%= t("views.right_panel.detail.res_date") %><%= t("views.right_panel.detail.res_type") %><%= t("views.right_panel.detail.employee_name") %><%= t("views.right_panel.detail.sale_cnt") %><%= t("views.right_panel.detail.sale_amount") %><%= t("views.right_panel.detail.void_cnt") %><%= t("views.right_panel.detail.void_amount") %><%= t("views.right_panel.detail.status") %>
    <%= cardSettle.shift_sale.shift_started_at.strftime("%e %b %I:%M%p") rescue '-' %> - <%= cardSettle.shift_sale.shift_closed_at ? cardSettle.shift_sale.shift_closed_at.strftime("%e %b %I:%M%p") : '-' %><%= cardSettle.req_date %> <%= cardSettle.req_time.utc.getlocal.strftime("%I:%M %p") %> + <% if cardSettle.req_type == 'CUP' %> + UNION + <% else %> + <%= cardSettle.req_type %> + <% end %> + <%= cardSettle.res_date %> <%= cardSettle.res_time.utc.getlocal.strftime("%I:%M %p") %> + <% if cardSettle.res_type == 'CUP' %> + UNION + <% else %> + <%= cardSettle.res_type %> + <% end %> + <%= cardSettle.shift_sale.employee.name %><%= cardSettle.sale_cnt %><%= cardSettle.sale_amt %><%= cardSettle.void_cnt %><%= cardSettle.void_amt %><%= cardSettle.status %>

    There is no data for search....

    +
    + <% if @cardSettles != 0 %> + <%= paginate @cardSettles %> + <% end %> +
    +
    +
    + +
    +
    + + \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 66e35892..038da651 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -29,6 +29,8 @@ en: top: "Top" orders: "Orders" shiftsale: "ShiftSale" + cb_payments: "CB Payments" + cb_settlement: "CB Settlement" credit: "Credit" bookings: "Booking" home: "Home" diff --git a/config/locales/mm.yml b/config/locales/mm.yml index 3aa5cb09..e728f844 100644 --- a/config/locales/mm.yml +++ b/config/locales/mm.yml @@ -26,6 +26,8 @@ mm: top: "အရောင်းရဆုံး" orders: "အော်ဒါများ" credit: "အကြွေး" + cb_payments: "CB Payments" + cb_settlement: "CB Settlement" bookings: "ကြိုတင်စာရင်းသွင်းခြင်း" home: "မူလစာမျက်နှာ" simple_menu_item: "ဟင်းလျာများ" diff --git a/config/routes.rb b/config/routes.rb index 5fee5f28..f1d0da0b 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -465,6 +465,7 @@ scope "(:locale)", locale: /en|mm/ do resources :surveys resources :order_reservations resources :card_sale_trans + resources :card_settle_trans get "/sales/:sale_id/manual_complete_sale" => "manual_sales#manual_complete_sale", :as => "manual_complete_sale" get "/sales/:sale_id/void" => "manual_sales#void", :as => "void" @@ -489,6 +490,7 @@ scope "(:locale)", locale: /en|mm/ do resources :order_reservation, :only => [:index, :show] resources :induty, :only => [:index, :show] resources :card_sale_tran + resources :card_settle_tran get "saleitem/get_shift_by_date", to: "saleitem#show", as: "get_shift_by_sale_item" get "receipt_no/get_shift_by_date", to: "receipt_no#get_shift_by_date", as: "get_shift_by_date"