diff --git a/app/controllers/reports/card_sale_tran_controller.rb b/app/controllers/reports/card_sale_tran_controller.rb index 01baa21f..f0e1053f 100644 --- a/app/controllers/reports/card_sale_tran_controller.rb +++ b/app/controllers/reports/card_sale_tran_controller.rb @@ -5,7 +5,7 @@ class Reports::CardSaleTranController < BaseReportController # 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"], + ["Master Payment","master"], ["JCB Payment","jcb"],["UnionPay Payment","cup"], ["Alipay Payment","alipay"]] @sales = Sale.all diff --git a/app/controllers/reports/card_settle_tran_controller.rb b/app/controllers/reports/card_settle_tran_controller.rb index ac10d48b..e775e578 100644 --- a/app/controllers/reports/card_settle_tran_controller.rb +++ b/app/controllers/reports/card_settle_tran_controller.rb @@ -4,8 +4,8 @@ class Reports::CardSettleTranController < BaseReportController # 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"], + @payment_method = [["All Payments",''],["MPU Payment","mpu"], ["Visa & Master Payment","vmj"], + ["JCB Payment","jcb"],["UnionPay Payment","cup"], ["Alipay Payment","alipay"]] @sales = Sale.all payment_type = params[:payment_type] diff --git a/app/controllers/transactions/card_sale_trans_controller.rb b/app/controllers/transactions/card_sale_trans_controller.rb index 63a87059..352e4f30 100644 --- a/app/controllers/transactions/card_sale_trans_controller.rb +++ b/app/controllers/transactions/card_sale_trans_controller.rb @@ -5,8 +5,8 @@ class Transactions::CardSaleTransController < ApplicationController # 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"], + @payment_method =[["All Payments",''],["MPU Payment","mpu"], ["Visa Payment","visa"], + ["Master Payment","master"], ["JCB Payment","jcb"],["UnionPay Payment","cup"], ["Alipay Payment","alipay"]] @sales = Sale.all diff --git a/app/controllers/transactions/card_settle_trans_controller.rb b/app/controllers/transactions/card_settle_trans_controller.rb index d08ca786..e2b70c7e 100644 --- a/app/controllers/transactions/card_settle_trans_controller.rb +++ b/app/controllers/transactions/card_settle_trans_controller.rb @@ -5,8 +5,8 @@ class Transactions::CardSettleTransController < ApplicationController # 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"], + @payment_method = [["All Payments",''],["MPU Payment","mpu"], ["Visa & Master Payment","vmj"], + ["JCB Payment","jcb"],["UnionPay Payment","cup"], ["Alipay Payment","alipay"]] @sales = Sale.all diff --git a/app/models/card_sale_tran.rb b/app/models/card_sale_tran.rb index 0aef0952..04ec5155 100644 --- a/app/models/card_sale_tran.rb +++ b/app/models/card_sale_tran.rb @@ -12,11 +12,7 @@ class CardSaleTran < ApplicationRecord if payment_type.blank? payment = '' else - if payment_type == 'unionpay' - payment = " app LIKE 'cup'" - else - payment = " app LIKE '#{payment_type}'" - end + payment = " app LIKE '#{payment_type}'" end if status_type.blank? @@ -45,11 +41,7 @@ class CardSaleTran < ApplicationRecord if payment_type.blank? payment = '' else - if payment_type == 'unionpay' - payment = " app LIKE 'cup'" - else - payment = " app LIKE '#{payment_type}'" - end + payment = " app LIKE '#{payment_type}'" end if from.present? && to.present? diff --git a/app/models/card_settle_tran.rb b/app/models/card_settle_tran.rb index a3166e91..8e2cafb8 100644 --- a/app/models/card_settle_tran.rb +++ b/app/models/card_settle_tran.rb @@ -12,11 +12,7 @@ class CardSettleTran < ApplicationRecord if payment_type.blank? payment = '' else - if payment_type == 'unionpay' - payment = " req_type LIKE 'cup'" - else - payment = " req_type LIKE '#{payment_type}'" - end + payment = " req_type LIKE '#{payment_type}'" end if status_type.blank? @@ -44,11 +40,7 @@ class CardSettleTran < ApplicationRecord if payment_type.blank? payment = '' else - if payment_type == 'unionpay' - payment = " req_type LIKE 'cup'" - else - payment = " req_type LIKE '#{payment_type}'" - end + payment = " req_type LIKE '#{payment_type}'" end if from.present? && to.present? diff --git a/app/views/reports/card_sale_tran/index.html.erb b/app/views/reports/card_sale_tran/index.html.erb index 3f66daf9..673da3ae 100644 --- a/app/views/reports/card_sale_tran/index.html.erb +++ b/app/views/reports/card_sale_tran/index.html.erb @@ -59,13 +59,7 @@
| <%= 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") %> | @@ -55,27 +54,15 @@|||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= 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.req_type %> | <%= cardSettle.res_date %> <%= cardSettle.res_time.utc.getlocal.strftime("%I:%M %p") %> | -- <% if cardSettle.res_type == 'CUP' %> - UNION - <% else %> - <%= cardSettle.res_type %> - <% end %> - | +<%= cardSettle.res_type %> | <%= cardSettle.shift_sale.employee.name %> | <%= cardSettle.sale_cnt %> | <%= cardSettle.sale_amt %> | <%= cardSettle.void_cnt %> | <%= cardSettle.void_amt %> | -<%= cardSettle.status %> | <%= t("views.right_panel.detail.status") %> | - - <% if @cardSettles != 0 %> - <% @cardSettles.each do |cardSettle| %> -
| <%= 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.... | ||||||||||||
| <%= 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") %> | +<%= cardSettle.req_type %> | +<%= cardSettle.res_date %> <%= cardSettle.res_time.utc.getlocal.strftime("%I:%M %p") %> | +<%= cardSettle.res_type %> | +<%= 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.... | ||||||||||||
There is no data for search....
There is no data for search....