69 lines
3.1 KiB
Plaintext
69 lines
3.1 KiB
Plaintext
<div class="row">
|
|
<div class="col-lg-5 col-md-5 col-sm-3">
|
|
<div class="card" >
|
|
<div class="card-header">
|
|
<div id="order-title">
|
|
<span><strong>Receipt No</strong> <% if @sale_data%>- <%=@sale_data.receipt_no%><% end %></span>
|
|
<span><strong>Table No</strong> <% if @sale_data%>- <%=@sale_data.receipt_no%><% end %></span>
|
|
</div>
|
|
</div>
|
|
<div class="card-block">
|
|
<div class="card-title">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:60%; text-align:left">Items</th>
|
|
<th style="width:20%; text-align:right">QTY</td>
|
|
<th style="width:20%; text-align:right">Price</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div id="table-details" class="card-text" style="min-height:400px; max-height:400px; overflow-x:scroll">
|
|
<table class="table" id="append-table">
|
|
<tbody>
|
|
<% sub_total = 0 %>
|
|
<% if @sale_items %>
|
|
<% @sale_items.each do |sale_item| %>
|
|
<% sub_total += sale_item.qty*sale_item.unit_price%>
|
|
<tr>
|
|
<td style="width:60%; text-align:left">
|
|
<span id="item-name-price"><%=sale_item.product_name%>@<%=sale_item.unit_price%></span>
|
|
</td>
|
|
<td style="width:20%; text-align:right">
|
|
<span id="item-qty"><%=sale_item.qty%></span>
|
|
</td>
|
|
<td style="width:20%; text-align:right">
|
|
<span id="item-total-price"><%=(sale_item.qty*sale_item.unit_price)%></span>
|
|
</td>
|
|
</tr>
|
|
<%end %>
|
|
<%end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="card-footer">
|
|
<table class="table" style="margin-bottom:0px">
|
|
<tfooter>
|
|
<tr>
|
|
<td style="width:80%; text-align:left; border-top:none"><strong>Sub Total</strong></td>
|
|
<td style="width:20%; text-align:right; border-top:none"><strong><span id="sub-total"><%=sub_total%></span></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="width:80%; text-align:left; border-top:none"><strong>(Discount)</strong></td>
|
|
<td style="width:20%; text-align:right; border-top:none"><strong><span>(<%=@sale_data.total_discount%>)</span></strong></td>
|
|
</tr>
|
|
<td style="width:80%; text-align:left; border-top:none"><strong>Tax</strong></td>
|
|
<td style="width:20%; text-align:right; border-top:none"><strong><span><%=@sale_data.total_tax%></span></strong></td>
|
|
</tr>
|
|
<td style="width:80%; text-align:left; border-top:none"><strong>Grand Total</strong></td>
|
|
<td style="width:20%; text-align:right; border-top:none"><strong><span><%=@sale_data.grand_total%></span></strong></td>
|
|
</tr>
|
|
</tfooter>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |