add to existing order

This commit is contained in:
Myat Zin Wai Maw
2019-12-18 10:15:24 +06:30
parent 8af99742a3
commit 16485875c1
10 changed files with 119 additions and 111 deletions

View File

@@ -151,63 +151,17 @@
</button>
<br>
<div class="card-header" style="padding: 0.12rem 0.25rem">
<% if type %>
<div class="row clearfix">
<div class="col-md-6 col-lg-6 col-sm-12">
<strong id="order-title" class="font-13">ORDER DETAILS </strong>
</div>
<% if modify_order %>
<% if @table.nil? %>
<div class="col-md-3 col-lg-3 col-sm-3">Table : </div>
<p class="hidden" id="table_id"><%=@table_id%></p>
<p class="hidden" id="table_type"></p>
<p class="hidden" id="table_get_current"></p>
<% else%>
<div class="col-md-3 col-lg-3 col-sm-3">Table : <%=@table.name%></div>
<p class="hidden" id="table_id"><%=@table_id%></p>
<p class="hidden" id="table_type"><%=@table.type%></p>
<p class="hidden" id="table_get_current"><%=@table.get_current_checkout_booking%></p>
<% end%>
<p class="hidden" id="booking_id"><%=@booking_id%></p>
<p class="hidden" id="customer_id"><%=@customer ? @customer.customer_id : '---'%></p>
<p class="hidden" id="sale_id"><%=@sale_id%></p>
<div class="col-md-1 col-lg-1 col-sm-1">
<button type="button" class="btn btn-xs btn-danger waves-effect float-left" id='clear_all'> Clear
</button>
</div>
<% else%>
<p class="hidden" id="table_type"></p>
<div class="col-md-2 col-lg-2 col-sm-2">
</div>
<div class="col-md-3 col-lg-3 col-sm-3">
<button type="button" class="btn btn-xs btn-danger waves-effect float-left" id='clear_all'> Clear
</button>
</div>
<% end%>
</div>
<% else %>
<div class="row ">
<div class="col-md-9 col-lg-9 col-sm-9 ">
<strong id="order-title" class="font-14 p-l-10">ORDER DETAILS </strong>| <span class="font-14">Table-<%=@table.name%></span>
<p class="hidden" id="table_id"><%=@table_id%></p>
<p class="hidden" id="table_type"><%=@table.type%></p>
<strong id="order-title" class="font-14 p-l-10">ORDER DETAILS </strong>
<p class="hidden" id="booking_id"><%=@booking_id%></p>
<p class="hidden" id="customer_id"><%=@customer ? @customer.customer_id : ''%></p>
<p class="hidden" id="table_get_current"><%=@table.get_current_checkout_booking%></p>
<p class="hidden" id="sale_id"><%=@sale_id%></p>
</div>
<div class="col-md-3 col-lg-3 col-sm-3">
<button type="button" class="btn btn-xs btn-danger waves-effect" id='clear_all'>Clear
</button>
</div>
<% end%>
</div>
<div class="card-block">
@@ -237,7 +191,11 @@
</tr>
</table>
<input type="hidden" name="customer_id" id="customer_id" value="CUS-000000000001">
<button type="button" class="btn btn-primary action-btn create col-md-11" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
<% if @sale_id.nil?%>
<button type="button" class="btn btn-primary action-btn create col-md-11" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
<% else %>
<button type="button" class="btn btn-primary action-btn create col-md-11" id="add_to_existing_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
<% end %>
</div>
</div>
</div>
@@ -360,7 +318,7 @@
<button type="button" class="btn btn-default " data-dismiss="modal" id="close">Close</button>
</div>
<div class="col-md-6">
<button type="button" class="btn btn-primary add_to_order " data-dismiss="modal" id="add_to_order">Add to Order</button>
<button type="button" class="btn btn-primary add_to_order " data-dismiss="modal" id="add_to_order">Add to Order</button>
</div>
</div>
</div>
@@ -727,4 +685,5 @@ var webview = <%= @webview %>;
showHideNavbar(webview);
<% end %>
});
</script>