Merge branch 'adminbsb_material_ui'

This commit is contained in:
Aung Myo
2018-06-11 17:48:33 +06:30
4 changed files with 24 additions and 9 deletions

View File

@@ -18,6 +18,7 @@ Osaka =>
BITP BITP
Auth Token => pZBHXEFbGNj/G => New => V3 Auth Token => pZBHXEFbGNj/G => New => V3
iua0SjUHzRaQw
=> rj0MJ0XI5GsKZehE => Old => V2 => rj0MJ0XI5GsKZehE => Old => V2
=> code2lab => Old => code2lab => Old

View File

@@ -81,7 +81,7 @@
<% @response["data"].each do |transaction| %> <% @response["data"].each do |transaction| %>
<tr> <tr>
<td><%= transaction["date"]%></td> <td><%= transaction["date"]%></td>
<% if transaction["status"] == 'Rebate' || transaction["status"] == 'Discount'%> <% if transaction["status"] == 'Rebate' || transaction["status"] == 'Discount' || transaction["status"] == 'Reversal'%>
<td><%= transaction["deposit"] %></td> <td><%= transaction["deposit"] %></td>
<% else %> <% else %>
<td>(<%= transaction["withdraw"] %>)</td> <td>(<%= transaction["withdraw"] %>)</td>
@@ -95,7 +95,11 @@
<tr style="border-top:2px solid #666;"> <tr style="border-top:2px solid #666;">
<th>Balance</th> <th>Balance</th>
<th colspan="4"> <th colspan="4">
<%= @response["data"].first["balance"] %> <% if @response["data"].first["status"] == 'Reversal'%>
<%= @response["data"].first["balance"] + @response["data"][1]["balance"]%>
<%else%>
<%= @response["data"].first["balance"] %>
<%end%>
</th> </th>
</tr> </tr>
<%end%> <%end%>

View File

@@ -626,6 +626,10 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
// //control borwser back
window.location.hash="no-back-button";
window.location.hash="Again-No-back-button";//again because google chrome don't insert first hash into history
window.onhashchange=function(){window.location.hash="";}
var cashier_type = "<%= @cashier_type %>"; var cashier_type = "<%= @cashier_type %>";
var customer_id = "<%= @customer.id %>"; var customer_id = "<%= @customer.id %>";
var customer_name = "<%= @customer.name %>"; var customer_name = "<%= @customer.name %>";

View File

@@ -216,12 +216,14 @@
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button> <button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
<% if @sale.sale_status != 'void' && @sale.sale_status != 'waste' && @sale.sale_status != 'spoile' %> <% if @sale.sale_status != 'void' && @sale.sale_status != 'waste' && @sale.sale_status != 'spoile' %>
<% if current_login_employee.role == "cashier" %> <% if current_login_employee.role == "cashier" %>
<a class="btn btn-block bg-blue waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a> <a class="btn btn-block bg-danger waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
<a class="btn btn-block bg-blue waves-effect access_modal" data-toggle="modal" data-type="reprint"> Re.Print</a>
<% else %> <% else %>
<button type="button" id="void" class="btn bg-danger btn-block">VOID</button> <button type="button" id="void" class="btn bg-danger btn-block">VOID</button>
<button type="button" id="re-print" class="btn bg-blue btn-block">Re.Print</button>
<% end %> <% end %>
<% end %> <% end %>
<button type="button" id="re-print" class="btn bg-blue btn-block">Re.Print</button>
</div> </div>
</div> </div>
@@ -258,7 +260,7 @@
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#111;">&times;</button> <button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#111;">&times;</button>
</div> </div>
<div class="modal-body" style="padding: 0px 25px 15px 25px !important"> <div class="modal-body" style="padding: 0px 25px 15px 25px !important">
<input type="text" id="access_code" class="access_code form-control col-md-12 "> <input type="password" id="access_code" class="access_code form-control col-md-12 ">
<div class="row bottom p-l-15 p-r-15 m-t-10"> <div class="row bottom p-l-15 p-r-15 m-t-10">
<div class="col-md-3 access_number border-top border-left" data-value="1" data-type="num">1</div> <div class="col-md-3 access_number border-top border-left" data-value="1" data-type="num">1</div>
<div class="col-md-3 access_number border-top border-left" data-value="2" data-type="num">2</div> <div class="col-md-3 access_number border-top border-left" data-value="2" data-type="num">2</div>
@@ -406,10 +408,14 @@ $(document).on('click', '.access_modal', function(event){
// $('#AccessCodeModal').modal('hide'); // $('#AccessCodeModal').modal('hide');
// $('#focModal').modal('show'); // $('#focModal').modal('show');
waste_and_spoilage("waste") waste_and_spoilage("waste")
}else if(type == "spoile") { }else if(type == "waste") {
// $('#AccessCodeModal').modal('hide'); // $('#AccessCodeModal').modal('hide');
// $('#voidModal').modal('show'); // $('#focModal').modal('show');
waste_and_spoilage("spoile") waste_and_spoilage("waste")
}else if(type == "reprint") {
$('#AccessCodeModal').modal('hide');
var sale_id = $('#sale_id').val();
window.location.href = '/origami/'+ sale_id + "/reprint"
}else if(type == "foc"){ }else if(type == "foc"){
$('#AccessCodeModal').modal('hide'); $('#AccessCodeModal').modal('hide');
$('#focModal').modal('show'); $('#focModal').modal('show');