update lookup display type

This commit is contained in:
Aung Myo
2018-06-18 10:39:52 +06:30
parent 3ac9a4b3c5
commit aec212d127
2 changed files with 9 additions and 1 deletions

View File

@@ -23,6 +23,8 @@ class Origami::DashboardController < BaseOrigamiController
# @total_card = Sale.total_card_sale(today,current_user)
# @total_credit = Sale.credit_payment(today,current_user)
@display_type = Lookup.find_by_lookup_type("display_type")
@sale_data = Array.new
@total_payment_methods = Sale.total_payment_methods(today,current_user)
if !@total_payment_methods.nil?

View File

@@ -219,7 +219,13 @@ $(function() {
});
$(".qs_view").on('click', function() {
if ($('#server_mode').val() != "cloud") {
var display_type = '<%= @display_type %>';
if (display_type.length>0) {
display_type = '<%= @display_type %>';
}else{
display_type = null;
}
if ($('#server_mode').val() != "cloud" && display_type == 2) {
document.getElementById('second_view').click();
}
window.location.href = '/origami/quick_service';