fixed for reprint and query
This commit is contained in:
@@ -196,7 +196,7 @@ $(document).on('turbolinks:load', function() {
|
||||
|
||||
$(document).on('click', '.access_modal', function(event){
|
||||
type = $(this).data("type");
|
||||
$(".ok").attr("data-action",type)
|
||||
$(".ok").attr("data-action",type);
|
||||
$('#AccessCodeModal').modal('show');
|
||||
});
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ class HomeController < ApplicationController
|
||||
|
||||
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" || payment.payment_method == "unionpay" || payment.payment_method == "alipay" || payment.payment_method == "paymal" || payment.payment_method == "dinga" || payment.payment_method == "JunctionPay"
|
||||
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,@from,@to,@from_time,@to_time)
|
||||
@sale_data.push({'card' => pay.payment_amount})
|
||||
else
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
var payment_method = "";
|
||||
$('.payment-type').on('click',function(){
|
||||
$('.payment-type').css("background-color","#7a62d3")
|
||||
$('.payment-type').css("background-color","#7a62d3");
|
||||
$(this).css("background-color","green");
|
||||
var type = $(this).attr('data-id')
|
||||
if(type == 'cash'){
|
||||
|
||||
@@ -324,13 +324,12 @@ $(document).ready(function(){
|
||||
swal("Opps","You are not authorized for void","warning")
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.access_modal', function(event){
|
||||
type = $(this).data("type");
|
||||
$(".ok").attr("data-action",type)
|
||||
$('#AccessCodeModal').modal('show');
|
||||
});
|
||||
|
||||
$(document).on('click', '.access_modal', function(event){
|
||||
type = $(this).data("type");
|
||||
$(".ok").attr("data-action",type);
|
||||
$('#AccessCodeModal').modal('show');
|
||||
});
|
||||
|
||||
function check_emp_access_code(access_code,type) {
|
||||
|
||||
@@ -410,7 +410,7 @@ $('#back').on('click',function(){
|
||||
|
||||
$(document).on('click', '.access_modal', function(event){
|
||||
type = $(this).data("type");
|
||||
$(".ok").attr("data-action",type)
|
||||
$(".ok").attr("data-action",type);
|
||||
$('#AccessCodeModal').modal('show');
|
||||
});
|
||||
$('#void').on('click', function () {
|
||||
|
||||
Reference in New Issue
Block a user