fixed for reprint and query
This commit is contained in:
@@ -18,16 +18,16 @@ class Origami::DashboardController < BaseOrigamiController
|
||||
# .sum('(CASE WHEN sp.payment_method="cash" THEN (sp.payment_amount - sales.amount_changed) ELSE sp.payment_amount END)')
|
||||
# @inventories = StockJournal.inventory_balances(today).sum(:balance)
|
||||
|
||||
@total_sale = Sale.total_sale(today,current_user)
|
||||
@total_count = Sale.total_count(today,current_user)
|
||||
@total_card = Sale.total_card_sale(today,current_user)
|
||||
@total_credit = Sale.credit_payment(today,current_user)
|
||||
# @total_sale = Sale.total_sale(today,current_user)
|
||||
# @total_count = Sale.total_count(today,current_user)
|
||||
# @total_card = Sale.total_card_sale(today,current_user)
|
||||
# @total_credit = Sale.credit_payment(today,current_user)
|
||||
|
||||
@sale_data = Array.new
|
||||
@total_payment_methods = Sale.total_payment_methods(today,current_user)
|
||||
if !@total_payment_methods.nil?
|
||||
@total_payment_methods.each do |payment|
|
||||
if payment.payment_method == "mpu" || payment.payment_method == "visa" || payment.payment_method == "master" || payment.payment_method == "jcb"
|
||||
if payment.payment_method == "mpu" || payment.payment_method == "visa" || payment.payment_method == "master" || payment.payment_method == "jcb" || payment.payment_method == "unionpay" || payment.payment_method == "alipay"
|
||||
pay = Sale.payment_sale('card', today, current_user)
|
||||
@sale_data.push({'card' => pay.payment_amount})
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user