app
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
</ol>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="container-fluid " style="padding:0px 3px 0px 3px;">
|
||||
<div class="container-fluid " style="padding:0px 3px 0px 3px;margin-top:20px">
|
||||
<div id="oqs_loading_wrapper" style="display:none;">
|
||||
<div id="oqs_loading"></div>
|
||||
</div>
|
||||
@@ -31,7 +31,6 @@
|
||||
<div id="custom-slimscroll">
|
||||
<div class="card-columns">
|
||||
<% bk_color ='' %>
|
||||
|
||||
<% @bookings.each do |bk|
|
||||
bk_status ='completed'
|
||||
if bk.booking_status =='assign'
|
||||
@@ -63,7 +62,7 @@
|
||||
<div class="row" style="margin:auto">
|
||||
<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-<%=@booking.dining_facility.name%></span><br>
|
||||
<strong class="font-14 p-l-10">Booking - <%=@booking.booking_id%></strong>
|
||||
<strong class="font-14 p-l-10">Booking - <%=@booking.booking_id%></strong><br>
|
||||
<strong class="font-14 p-l-10">Order No- <%=@booking.order_id%></strong>
|
||||
</div>
|
||||
<div class="col-md-3 col-lg-3 col-sm-3">
|
||||
@@ -74,7 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="140">
|
||||
<div class="card-text" id="order-detail-slimscroll" data-height="250">
|
||||
<table class="table table-striped summary-items">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -84,35 +83,48 @@
|
||||
<th class="item-attr">Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="font-13" >
|
||||
<% count =0 %>
|
||||
<% total_price =0 %>
|
||||
<% total_qty =0 %>
|
||||
<% @booking.booking_orders.each do |bo| %>
|
||||
<% bo.order.order_items.each do |oi| %>
|
||||
<% count +=1 %>
|
||||
<% total_price += oi.price %>
|
||||
<% total_qty += oi.qty.to_i%>
|
||||
<tr class="item_box">
|
||||
<td><%= count%></td>
|
||||
<td><%= oi.item_name%></td>
|
||||
<td><%= oi.qty.to_i%></td>
|
||||
<td class="item-attr"><%= oi.price%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
<tbody class="font-13">
|
||||
<% sub_total = 0
|
||||
count = 0
|
||||
%>
|
||||
<% @sale_data.sale_items.each do |sale_item|
|
||||
count += 1
|
||||
%>
|
||||
<% sub_total += sale_item.price%>
|
||||
<tr>
|
||||
<td><%= count %></td>
|
||||
<td class="item-name"><%=sale_item.product_name%>@<%=number_with_precision( sale_item.unit_price, precision: precision.to_i )%></td>
|
||||
<td class=""><%=sale_item.qty%></td>
|
||||
<td class="item-attr"><%=(number_with_precision(sale_item.price, precision: precision.to_i ))%></td>
|
||||
</tr>
|
||||
<%end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer custom-card-footer" style="padding: 0.35rem 0.15rem !important;">
|
||||
<table class="table" id="order-charges-table" border="0">
|
||||
<tr>
|
||||
<td colspan="2" style="padding:2px; text-align:" class="charges-name" width="25%"><strong>Total:</strong></td>
|
||||
<td style="padding:2px;" width="15%"><strong id="total_qty"><%=total_qty %></strong></td>
|
||||
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total"><%=total_qty * total_price %></strong></td>
|
||||
<td colspan="2" style="padding:2px; text-align:" class="charges-name" width="25%"><strong>Sub Total</strong></td>
|
||||
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total"><%=number_with_precision(sub_total, precision: precision.to_i)%></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="padding:2px; text-align:" class="charges-name" width="25%"><strong>(Discount)</strong></td>
|
||||
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total">(<%= number_with_precision(@sale_data.total_discount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>)</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="padding:2px; text-align:" class="charges-name" width="25%"><strong>Total Tax</strong></td>
|
||||
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total"><%= number_with_precision(@sale_data.total_tax, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i )%></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="padding:2px; text-align:" class="charges-name" width="25%"><strong>Rounding Adj</strong></td>
|
||||
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total"><%= number_with_precision(@sale_data.rounding_adjustment, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i )%></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="padding:2px; text-align:" class="charges-name" width="25%"><strong>Grand Total</strong></td>
|
||||
<td style="padding:2px; text-align:" width="25%" class="item-attr"><strong id="sub_total"><%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i )%></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-12" id="done_order" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">done</i></button>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-12" id="done_order" style="padding-top:4px !important;padding-bottom:4px !important;">DONE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user