conflic data

This commit is contained in:
San Wai Lwin
2018-02-09 10:17:56 +06:30
parent 625ee9bd34
commit 860e8db202
29 changed files with 622 additions and 296 deletions

View File

@@ -40,7 +40,7 @@
<!--- Panel 1 - Table Orders -->
<div class="tab-pane dining active " id="tables" role="tabpanel">
<div class="card-columns">
<% @tables.each do |table| %>
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
<% if table.get_booking.nil? %>
<% if table.get_checkout_booking.nil? %>
@@ -50,6 +50,11 @@
<% end %>
<div class="card-block">
<%= table.name %>
<% if !@order_items_count.nil? %>
<% if @order_items_count.key?(table.id) %>
(Orders : <%= @order_items_count[table.id] %>)
<% end %>
<% end %>
<span class="float-right font-12 new_text_<%= table.id %>"> billed</span>
<div style="font-size:12px;"></div>
</div>
@@ -61,7 +66,12 @@
<div class="card tables orange text-white table_<%= table.id %>" data-id="<%= table.id %>">
<% end %>
<div class="card-block">
<%= table.name %>
<%= table.name %>
<% if !@order_items_count.nil? %>
<% if @order_items_count.key?(table.id) %>
(Orders : <%= @order_items_count[table.id] %>)
<% end %>
<% end %>
<span class="float-right font-12 new_text_<%= table.id %>"> new</span>
</div>
</div>
@@ -87,6 +97,11 @@
<div class="card rooms red text-white table_<%= room.id %>" data-id="<%= room.id %>">
<div class="card-block">
<%= room.name %>
<% if !@order_items_count.nil? %>
<% if @order_items_count.key?(room.id) %>
(Orders : <%= @order_items_count[room.id] %>)
<% end %>
<% end %>
<span class="float-right font-12 new_text_<%= room.id %>"> billed</span>
</div>
</div>
@@ -94,6 +109,11 @@
<div class="card rooms blue text-white table_<%= room.id %>" data-id="<%= room.id %>">
<div class="card-block">
<%= room.name %>
<% if !@order_items_count.nil? %>
<% if @order_items_count.key?(room.id) %>
(Orders : <%= @order_items_count[room.id] %>)
<% end %>
<% end %>
<span class="float-right font-12 new_text_<%= room.id %>"> new</span>
</div>
</div>
@@ -475,12 +495,14 @@
receipt_no = ($("#receipt_no").html()).trim();
}
// console.log(checkReceiptNoInFirstBillData(receipt_no));
discount="<%= @membership.discount%>"
if ($("#server_mode").val() != "cloud") { // first bill not used in cloud
if(checkReceiptNoInFirstBillData(receipt_no,"")){
$("#pay").show();
}else{
$("#pay").hide();
if (discount) {
if(checkReceiptNoInFirstBillData(receipt_no,"")){
$("#pay").show();
}else{
$("#pay").hide();
}
}
}
/* end check first bill or not*/