Pull from master
This commit is contained in:
@@ -205,7 +205,8 @@ $('#junction_pay').on('click',function(){
|
||||
var com_port = '/dev/' + $("#com_port_name").val();
|
||||
var is_rebate=false;
|
||||
//alert(cashier_id + amount + com_port);
|
||||
code2lab.reqJunctionPay(true, cashier_id, parseFloat(amount), receipt_no, com_port);
|
||||
code2lab.reqJunctionPay(true, cashier_id, parseFloat(amount), receipt_no, com_port);
|
||||
|
||||
resJunctionPayUpdate = function(totalBillAmount , finalBillAmt,giftCardAmount, voucherAmount,voucherNumber,receiptNumber){
|
||||
$("#loading_wrapper").hide();
|
||||
|
||||
@@ -241,10 +242,25 @@ $('#junction_pay').on('click',function(){
|
||||
};
|
||||
|
||||
resJunctionPay = function(memberno,transactionNo,finalBillingAmt){
|
||||
if(memberno != ''){ is_rebate = true; }
|
||||
if(memberno != ''){ is_rebate = true; }
|
||||
};
|
||||
|
||||
|
||||
resError = function(err_message){
|
||||
if(err_message != "ERROR: Verification cancelled"){
|
||||
$("#loading_wrapper").hide();
|
||||
swal({
|
||||
title: "Oops!",
|
||||
text: err_message,
|
||||
type: "error",
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id +"/"+cashier_type+"/payment/others_payment";
|
||||
});
|
||||
}
|
||||
};
|
||||
// $("#loading_wrapper").hide();
|
||||
// $.ajax({type: "POST",
|
||||
// url: "/origami/payment/"+payment_type,
|
||||
|
||||
@@ -79,13 +79,20 @@
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
<td width ="15%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<td width ="20%" class="align-center col-blue">
|
||||
<% if order.payment_type == 'cash_on_delivery' %>
|
||||
COD
|
||||
<% elsif order.payment_type == 'dinga' %>
|
||||
DINGA
|
||||
<% end %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
@@ -122,13 +129,20 @@
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
<td width ="15%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%=order.grand_total%>
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<td width ="20%" class="align-center col-blue">
|
||||
<% if order.payment_type == 'cash_on_delivery' %>
|
||||
COD
|
||||
<% elsif order.payment_type == 'dinga' %>
|
||||
DINGA
|
||||
<% end %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
@@ -164,13 +178,20 @@
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
<td width ="15%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<td width ="20%" class="align-center col-blue">
|
||||
<% if order.payment_type == 'cash_on_delivery' %>
|
||||
COD
|
||||
<% elsif order.payment_type == 'dinga' %>
|
||||
DINGA
|
||||
<% end %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
@@ -206,13 +227,20 @@
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
<td width ="15%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<td width ="20%" class="align-center col-blue">
|
||||
<% if order.payment_type == 'cash_on_delivery' %>
|
||||
COD
|
||||
<% elsif order.payment_type == 'dinga' %>
|
||||
DINGA
|
||||
<% end %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
@@ -248,13 +276,20 @@
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%Y-%m-%d") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
<td width="15%" class="align-center">
|
||||
<%= order.created_at.utc.getlocal.strftime("%I:%M %p") %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<%=order.grand_total%>
|
||||
</td>
|
||||
<td width ="30%" class="align-center">
|
||||
<td width ="10%" class="align-center col-blue">
|
||||
<% if order.payment_type == 'cash_on_delivery' %>
|
||||
COD
|
||||
<% elsif order.payment_type == 'dinga' %>
|
||||
DINGA
|
||||
<% end %>
|
||||
</td>
|
||||
<td width ="20%" class="align-center">
|
||||
<span class="font-10 col-blue">
|
||||
<% if order.delivery.delivery_type == 'service' %>
|
||||
DELIVERY
|
||||
@@ -353,7 +388,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width ="70%" class="footer-td align-left col-blue">
|
||||
GRAND TOTAL
|
||||
GRAND TOTAL
|
||||
</td>
|
||||
<td width ="30%" class="footer-td align-right col-blue" id="grand_total">0.00</td>
|
||||
</tr>
|
||||
@@ -398,10 +433,14 @@
|
||||
<table class="table tbl_customer">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" class="body-td align-left">
|
||||
<td class="body-td align-left">
|
||||
<span class="font-13">REF.</span><br>
|
||||
<b id="trans_ref"></b>
|
||||
</td>
|
||||
<td class="body-td align-right order_payment_type">
|
||||
<span class="font-13">PAYMENT</span><br>
|
||||
<b id="payment_type"></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="body-td align-left">
|
||||
|
||||
@@ -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 %>";
|
||||
|
||||
@@ -169,13 +169,16 @@
|
||||
<!-- Column Three -->
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
|
||||
<button type="button" id="reprint" class="btn bg-blue btn-block">Reprint</button>
|
||||
|
||||
<% if current_user.role != "waiter" %>
|
||||
<% if @sale.sale_status != 'void' && @sale.sale_status != 'waste' && @sale.sale_status != 'spoile' %>
|
||||
<% if current_user.role == "cashier" %>
|
||||
<a class="btn btn-block bg-red 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="reprints"> Re.Print</a>
|
||||
|
||||
<% else %>
|
||||
<button type="button" class="btn bg-red btn-block" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void </button>
|
||||
<button type="button" id="reprint" class="btn bg-blue btn-block">Reprint</button>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<button id="close_cashier" type="button" class="btn btn-block btn-lg bg-blue waves-effect"> <%= t("views.btn.close_cashier") %></button>
|
||||
@@ -340,9 +343,12 @@ function check_emp_access_code(access_code,type) {
|
||||
// console.log(result);
|
||||
if (result.status == true) {
|
||||
createAccessCode(code);
|
||||
$('#AccessCodeModal').modal('hide');
|
||||
if(type == "void"){
|
||||
$('#AccessCodeModal').modal('hide');
|
||||
$('#voidModal').modal('show');
|
||||
}else if(type=='reprint'){
|
||||
var sale_id = $('#sale_id').val();
|
||||
window.location.href = '/origami/'+ sale_id + "/reprint"
|
||||
}
|
||||
}else{
|
||||
swal("Opps",result.message,"warning")
|
||||
|
||||
@@ -240,7 +240,7 @@ var access_code = localStorage.getItem("access_code");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_item_id=' + sale_item_id + "&update_qty=" + qty + "&update_price=" + price+ "&access_code=" + access_code,
|
||||
data: 'sale_item_id=' + sale_item_id + "&update_qty=" + qty + "&update_price=" + price+ "&access_code=" + access_code + "&type=" + cashier_type,
|
||||
success: function (result) {
|
||||
swal({
|
||||
title: "Information!",
|
||||
@@ -294,7 +294,7 @@ var access_code = localStorage.getItem("access_code");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_item_id=' + sale_item_id + "&remark=" + remark+ "&access_code=" + access_code,
|
||||
data: 'sale_item_id=' + sale_item_id + "&remark=" + remark+ "&access_code=" + access_code + "&type=" + cashier_type,
|
||||
success: function (result) {
|
||||
location.reload();
|
||||
}
|
||||
@@ -307,7 +307,7 @@ var access_code = localStorage.getItem("access_code");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ajax_url,
|
||||
data: 'sale_item_id=' + sale_item_id + '&access_code=' + access_code,
|
||||
data: 'sale_item_id=' + sale_item_id + '&access_code=' + access_code + "&type=" + cashier_type,
|
||||
success: function (result) {
|
||||
location.reload();
|
||||
}
|
||||
|
||||
@@ -216,12 +216,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-red 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-red 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>
|
||||
<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 %>
|
||||
<button type="button" id="re-print" class="btn bg-blue btn-block">Re.Print</button>
|
||||
|
||||
</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;">×</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>
|
||||
@@ -406,10 +408,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');
|
||||
|
||||
Reference in New Issue
Block a user