update adminbsb theme all theme setting

This commit is contained in:
Aung Myo
2017-10-10 14:11:38 +06:30
parent 79c7b46ab7
commit 33f03b2e05
49 changed files with 1443 additions and 1387 deletions

View File

@@ -1,107 +1,109 @@
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-3">
<div class="card" >
<div class="card-header">
<div id="order-title">
<table>
<tr>
<td style="width:50%;"><strong>Receipt No : <%=@sale_data.receipt_no rescue ' '%></strong></td>
<td style="width:50%;"><strong>Receipt Date : <%=@sale_data.receipt_date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></strong></td>
</tr>
<tr>
<td><strong>Table No</strong> - <%=@table_no%></td>
<td><strong>Sale Id</strong> <span id="sale_id"><% if @sale_data %><%=@sale_data.sale_id %><% end %></span></td>
</tr>
<tr>
<td style="width:50%;"><strong>Customer :</strong> <%= @sale_data.customer.name%></td>
<span class="hidden" id="membership_id"><%= @sale_data.customer.membership_id%></span>
<span class="hidden" id="member_discount"><%= @member_discount%></span>
<td style="width:50%;"><strong>Customer ID :</strong> <%= @sale_data.customer.customer_id%></td>
</tr>
</table>
</div>
</div>
<div class="card-block">
<div class="card-title">
<table >
<!-- <thead> -->
<tr>
<th style="width:5%">#</th>
<th style="width:76%;">Items</th>
<th style="width:20%;">QTY</td>
<th style="width:20%;">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
count = 0
%>
<% @sale_data.sale_items.each do |sale_item|
count += 1
%>
<div class="container-fluid">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>
<% sub_total += sale_item.price%>
<tr>
<td><%= count %></td>
<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.price)%></span>
</td>
</tr>
<%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>
<%if @sale_data.discount_type == 'member_discount'%>
<td style="width:80%; text-align:left; border-top:none"><strong>Member Discount:</strong></td>
<%else%>
<td style="width:80%; text-align:left; border-top:none"><strong>(Discount)</strong></td>
<%end%>
<td style="width:20%; text-align:right; border-top:none"><strong><span>(<%=@sale_data.total_discount rescue 0%>)</span></strong></td>
</tr>
<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 rescue 0%></span></strong></td>
</tr>
<tr>
<td style="width:80%; text-align:left; border-top:none"><strong>Rounding Adj:</strong></td>
<td style="width:20%; text-align:right; border-top:none"><strong><span><%=@sale_data.rounding_adjustment rescue 0%></span></strong></td>
</tr>
<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 rescue 0%></span></strong></td>
</tr>
<%if @balance > 0%>
<tr>
<td style="width:80%; text-align:left; border-top:none"><strong><%= @accountable_type %></strong></td>
<td style="width:20%; text-align:right; border-top:none"><strong><span><%=@balance%></span></strong></td>
</tr>
<% end %>
</tfooter>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-3">
<div class="card" >
<div class="card-header">
<div id="order-title">
<table>
<tr>
<td style="width:50%;"><strong>Receipt No : <%=@sale_data.receipt_no rescue ' '%></strong></td>
<td style="width:50%;"><strong>Receipt Date : <%=@sale_data.receipt_date.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-'%></strong></td>
</tr>
<tr>
<td><strong>Table No</strong> - <%=@table_no%></td>
<td><strong>Sale Id</strong> <span id="sale_id"><% if @sale_data %><%=@sale_data.sale_id %><% end %></span></td>
</tr>
<tr>
<td style="width:50%;"><strong>Customer :</strong> <%= @sale_data.customer.name%></td>
<span class="hidden" id="membership_id"><%= @sale_data.customer.membership_id%></span>
<span class="hidden" id="member_discount"><%= @member_discount%></span>
<td style="width:50%;"><strong>Customer ID :</strong> <%= @sale_data.customer.customer_id%></td>
</tr>
</table>
</div>
<div style='text-align:center;margin-top:20px'>
</div>
<div class="card-block">
<div class="card-title">
<table >
<!-- <thead> -->
<tr>
<th style="width:5%">#</th>
<th style="width:76%;">Items</th>
<th style="width:20%;">QTY</td>
<th style="width:20%;">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
count = 0
%>
<% @sale_data.sale_items.each do |sale_item|
count += 1
%>
<% sub_total += sale_item.price%>
<tr>
<td><%= count %></td>
<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.price)%></span>
</td>
</tr>
<%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>
<%if @sale_data.discount_type == 'member_discount'%>
<td style="width:80%; text-align:left; border-top:none"><strong>Member Discount:</strong></td>
<%else%>
<td style="width:80%; text-align:left; border-top:none"><strong>(Discount)</strong></td>
<%end%>
<td style="width:20%; text-align:right; border-top:none"><strong><span>(<%=@sale_data.total_discount rescue 0%>)</span></strong></td>
</tr>
<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 rescue 0%></span></strong></td>
</tr>
<tr>
<td style="width:80%; text-align:left; border-top:none"><strong>Rounding Adj:</strong></td>
<td style="width:20%; text-align:right; border-top:none"><strong><span><%=@sale_data.rounding_adjustment rescue 0%></span></strong></td>
</tr>
<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 rescue 0%></span></strong></td>
</tr>
<%if @balance > 0%>
<tr>
<td style="width:80%; text-align:left; border-top:none"><strong><%= @accountable_type %></strong></td>
<td style="width:20%; text-align:right; border-top:none"><strong><span><%=@balance%></span></strong></td>
</tr>
<% end %>
</tfooter>
</table>
</div>
<div style='text-align:center;margin-top:20px'>
<!-- <INPUT TYPE="Button" class='btn btn-primary' VALUE="Reprint" onClick="" style='width:120px'/>
<INPUT TYPE="Submit" class='btn btn-primary' VALUE="CANCEL" action="origami/index" style='width:120px'/> -->
</div>
@@ -242,15 +244,15 @@
</div>
<div class="col-lg-6 col-md-1 col-sm-1">
<div class="row bottom">
<div class="cashier_number long" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long left" data-value="1000" data-type="add">1000</div>
<div class="cashier_number long left" data-value="3000" data-type="add">3000</div>
</div>
<div class="row bottom">
<div class="cashier_number long" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long left" data-value="5000" data-type="add">5000</div>
<div class="cashier_number long left" data-value="10000" data-type="add">10000</div>
</div>
<div class="row bottom">
<div class="pay purple" id="pay">Pay</div>
<div class="pay purple left" id="pay">Pay</div>
</div>
</div>
</div>
@@ -259,12 +261,12 @@
<div class="col-lg-1 col-md-1 col-sm-1">
<!-- Waiter Buttons -->
<button type="button" class="btn btn-primary btn-block" onclick="localStorage.removeItem('cash');window.location.href = '/origami';"> Back </button>
<button type="button" class="btn btn-primary btn-block" id="foc"> FOC </button>
<button type="button" class="btn btn-primary btn-block" id="void"> Void </button>
<button type="button" class="btn bg-default btn-block" onclick="localStorage.removeItem('cash');window.location.href = '/origami';"> Back </button>
<button type="button" class="btn bg-warning btn-block" id="foc"> FOC </button>
<button type="button" class="btn bg-red btn-block" id="void"> Void </button>
</div>
</div>
</div>
<script>
@@ -484,7 +486,7 @@
}
});
});
});
function calculate_member_discount(sale_id) {
var sub_total = $('#sub-total').text();