update payment method report and from,to time change

This commit is contained in:
Aung Myo
2017-11-01 16:14:45 +06:30
parent 01c4eeca81
commit ebb2114243
12 changed files with 233 additions and 170 deletions

View File

@@ -2,7 +2,7 @@ class Reports::PaymentMethodController < BaseReportController
# authorize_resource :class => false
def index
@payments = [["Cash Payment","cash"], ["Credit Payment","creditnote"],
@payments = [["All Payment",''],["Cash Payment","cash"], ["Credit Payment","creditnote"],
["FOC Payment","foc"], ["MPU Payment","mpu"], ["Visa Payment","visa"],
["Master Payment","master"], ["JCB Payment","jcb"], ["Redeem Payment","paypar"]]
@@ -19,9 +19,10 @@ class Reports::PaymentMethodController < BaseReportController
@shift = ShiftSale.where('shift_started_at = ? and shift_closed_at = ? ',shift_sale.shift_started_at, shift_sale.shift_closed_at)
end
end
payment_type = params[:payment_type]
@sale_data,@pyament_method = Sale.get_payment_method_by_shift(@shift_sale_range,@shift,from,to,payment_type)
@payment_type = params[:payment_type]
@sale_data,@pyament_method = Sale.get_payment_method_by_shift(@shift_sale_range,@shift,from,to,@payment_type)
puts @pyament_method.to_json
puts "sssssssssssss"
@from = from
@to = to