check customer lightbox

This commit is contained in:
phyusin
2018-03-14 17:42:24 +06:30
parent 70e400c3b9
commit 68a27ffcc7
5 changed files with 52 additions and 16 deletions

View File

@@ -162,6 +162,9 @@
<div id="sxModal">
<div id="sxModal-Content"><h3><%= t :card_tap %></h3></div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
<!-- The modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="modalLabelLarge" aria-hidden="true">
@@ -212,4 +215,8 @@
$("#type").val("card");
}
}
$("#sxModal .btn_cancel").on('click',function(){
$("#sxModal").hide();
});
</script>

View File

@@ -263,6 +263,9 @@
<div id="sxModal">
<div id="sxModal-Content"><h3>Card Tap</h3></div>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
</div>
<script type="text/javascript">
@@ -475,11 +478,11 @@
if(booking_id!= "" && page == "pending"){
window.location.href = '/origami/'+cashier_type+'/pending_order/'+booking_id;
}else{
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/customers/payment/';
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/payment/';
}
}else{
if(page == "payment"){
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/customers/payment/';
window.location.href = '/origami/sale/'+sale_id+'/'+cashier_type+'/payment/';
}else{
if (type=="Table") {
window.location.href = '/origami/table/'+id
@@ -519,7 +522,11 @@
}
})
});
$("#sxModal .btn_cancel").on('click',function(){
$("#sxModal").hide();
});
</script>

View File

@@ -391,21 +391,23 @@
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="pdfModalLabel"></h4>
<h4 class="modal-title">
<span id="pdfModalLabel"></span>
<span id="changed_amount" class="p-l-120"></span>
</h4>
</div>
<div class="modal-body">
<input type="hidden" name="sale_receipt_no" id="sale_receipt_no">
<input type="hidden" name="filename" id="filename">
<input type="hidden" name="printer_name" id="printer_name">
<p id="changed_amount"></p>
<div class="text-center">
<iframe id="receipt_pdf" src="" style="width: 400px; height: 600px;"></iframe>
<iframe id="receipt_pdf" src="" class="pdf-iframe" scrolling="no"></iframe>
</div>
</div>
<div class="modal-footer ">
<div class="row p-r-20">
<div class="row m-b-10 m-r-30">
<% if ENV["SERVER_MODE"] != 'cloud' %>
<div class="col-md-5">
<div class="col-md-5 m-r-20">
<button type="button" class="btn btn-link bg-red waves-effect print_receipt">Print</button>
</div>
<% end %>
@@ -458,8 +460,8 @@
<div id="sxModal-Content">
<h3>Card Tap</h3>
</div>
<div>
<button type="button" class="btn btn-lg btn-link bg-red waves-effect" data-dismiss="modal">Cancel</button>
<div class="m-r-20" align="right">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
</div>
</div>
@@ -469,7 +471,7 @@ var customer_id = "<%= @customer.id %>";
var customer_name = "<%= @customer.name %>";
$(document).ready(function(){
//start customer modal popup
if((customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
if((cashier_type=='quick_service') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
if((customer_id == 'CUS-000000000001') && (customer_name == 'WALK-IN')){
$("#is_memberModal").modal({show : true, backdrop: false, keyboard : false});
}
@@ -487,7 +489,9 @@ var customer_name = "<%= @customer.name %>";
if ($("#server_mode").val() != "cloud") { // first bill not used in cloud
console.log("ssssssssssss")
payment_type = checkReceiptNoInFirstBillData(receipt_no,"payment")
payment_type = checkReceiptNoInFirstBillData(receipt_no,"payment");
console.log(member_id);
console.log(member_discount);
if (member_id && member_discount) {
if(parseInt(jQuery.inArray("Credit", payment_type)) == -1){
$("#credit_payment").hide();
@@ -607,7 +611,7 @@ var customer_name = "<%= @customer.name %>";
$("#printer_name").val(result.printer_name);
$("#receipt_pdf").attr("src", result.filename);
$("#pdfModal").modal({show : true, backdrop : false, keyboard : false});
$("#pdfModalLabel").text("Payment Successful!");
$("#pdfModalLabel").text("Sale Completed");
$("#changed_amount").text("");
if($('#balance').text() < 0){
<% if precision.to_i > 0 %>
@@ -1106,4 +1110,8 @@ var customer_name = "<%= @customer.name %>";
});
});
}
$("#sxModal .btn_cancel").on('click',function(){
$("#sxModal").hide();
});
</script>