update rain bow land request

This commit is contained in:
Aung Myo
2018-06-11 17:47:36 +06:30
parent 8c5fce8516
commit c5c28bf44d
4 changed files with 24 additions and 9 deletions

View File

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

View File

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

View File

@@ -626,6 +626,10 @@
</div>
<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 customer_id = "<%= @customer.id %>";
var customer_name = "<%= @customer.name %>";

View File

@@ -215,12 +215,14 @@
<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 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 %>
<button type="button" id="void" class="btn bg-danger btn-block">VOID</button>
<% end %>
<% end %>
<button type="button" id="re-print" class="btn bg-blue btn-block">Re.Print</button>
<% end %>
<% end %>
</div>
</div>
@@ -257,7 +259,7 @@
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#111;">&times;</button>
</div>
<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="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>
@@ -405,10 +407,14 @@ $(document).on('click', '.access_modal', function(event){
// $('#AccessCodeModal').modal('hide');
// $('#focModal').modal('show');
waste_and_spoilage("waste")
}else if(type == "spoile") {
}else if(type == "waste") {
// $('#AccessCodeModal').modal('hide');
// $('#voidModal').modal('show');
waste_and_spoilage("spoile")
// $('#focModal').modal('show');
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"){
$('#AccessCodeModal').modal('hide');
$('#focModal').modal('show');