diff --git a/app/controllers/reports/card_sale_tran_controller.rb b/app/controllers/reports/card_sale_tran_controller.rb index ff0b3231..01baa21f 100644 --- a/app/controllers/reports/card_sale_tran_controller.rb +++ b/app/controllers/reports/card_sale_tran_controller.rb @@ -8,11 +8,9 @@ class Reports::CardSaleTranController < BaseReportController ["Master Payment","master"], ["JCB Payment","jcb"],["UnionPay Payment","unionpay"], ["Alipay Payment","alipay"]] @sales = Sale.all - # byebug + payment_type = params[:payment_type] - # from = params[:from] - # to = params[:to] from, to = get_date_range_from_params status = 'Approved' @shift_sale_range = '' diff --git a/app/controllers/transactions/card_sale_trans_controller.rb b/app/controllers/transactions/card_sale_trans_controller.rb index b17fc608..63a87059 100644 --- a/app/controllers/transactions/card_sale_trans_controller.rb +++ b/app/controllers/transactions/card_sale_trans_controller.rb @@ -9,13 +9,11 @@ class Transactions::CardSaleTransController < ApplicationController ["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? diff --git a/app/controllers/transactions/card_settle_trans_controller.rb b/app/controllers/transactions/card_settle_trans_controller.rb index 8c071509..d08ca786 100644 --- a/app/controllers/transactions/card_settle_trans_controller.rb +++ b/app/controllers/transactions/card_settle_trans_controller.rb @@ -9,22 +9,21 @@ class Transactions::CardSettleTransController < ApplicationController ["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] + cashier_name = params[:cashier_name] 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? + if cashier_name.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) + cardSettle = CardSettleTran.search(cashier_name,from,to,payment_type,status_type) if cardSettle.count > 0 @cardSettles = cardSettle @cardSettles = Kaminari.paginate_array(@cardSettles).page(params[:page]).per(20) diff --git a/app/views/transactions/card_sale_trans/index.html.erb b/app/views/transactions/card_sale_trans/index.html.erb index 8ad6ded0..50948bdb 100644 --- a/app/views/transactions/card_sale_trans/index.html.erb +++ b/app/views/transactions/card_sale_trans/index.html.erb @@ -134,37 +134,30 @@ - - - - - - - + \ 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 d01cdb5a..248a76c3 100644 --- a/app/views/transactions/card_settle_trans/index.html.erb +++ b/app/views/transactions/card_settle_trans/index.html.erb @@ -19,7 +19,7 @@