-
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
App.checkin = App.cable.subscriptions.create('SecondDisplayChannel', {
|
||||
// App.messages = App.cable.subscriptions.create('MessagesChannel', {
|
||||
// App.messages = App.cable.subscriptions.create('MessagesChannel', {
|
||||
|
||||
connected: function() {},
|
||||
|
||||
disconnected: function() {},
|
||||
|
||||
received: function(data) {
|
||||
received: function(data) {
|
||||
var hostname = location.hostname.trim();
|
||||
if(data.from == "" || hostname == data.from){
|
||||
if(data.from == "" || hostname == data.from){
|
||||
var data_obj = data.data;
|
||||
var status = data.status;
|
||||
var count = 0
|
||||
var count = 0
|
||||
var sub_total = 0
|
||||
if (data.status == "order") {
|
||||
for(var i in data_obj) {
|
||||
@@ -26,16 +26,15 @@ App.checkin = App.cable.subscriptions.create('SecondDisplayChannel', {
|
||||
$(".second_display_items").append(row);
|
||||
}//end looping
|
||||
}else{
|
||||
$('#s_sub_total').empty();
|
||||
$('#s_sub_total').empty();
|
||||
$('#s_sub_total').append(data_obj.total_amount);
|
||||
$('#s_total_discount').empty();
|
||||
$('#s_total_discount').empty();
|
||||
$('#s_total_discount').append(data_obj.total_discount);
|
||||
$('#s_tatal_tax').empty();
|
||||
$('#s_tatal_tax').empty();
|
||||
$('#s_tatal_tax').append(data_obj.total_tax);
|
||||
$('#s_grand_total').empty();
|
||||
$('#s_grand_total').empty();
|
||||
$('#s_grand_total').append(data_obj.grand_total);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user