Pull from master

This commit is contained in:
San Wai Lwin
2018-03-15 13:48:52 +06:30
parent 96f8640df7
commit 1188f6e8e9
29 changed files with 242 additions and 97 deletions

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 %>
@@ -424,27 +426,29 @@
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="is_memberModalLabel">Are you Member?</h3>
<h1 class="modal-title" id="is_memberModalLabel">Are you Member?</h1>
</div>
<div class="modal-body">
<div class="row text-center">
<input type="hidden" name="paypar_account_no" id="paypar_account_no" />
<input type="hidden" name="qr_code" id="qr_code" />
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<input type="hidden" name="paypar_account_no" id="paypar_account_no" />
<input type="hidden" name="qr_code" id="qr_code" />
<div class="row text-center m-t-20">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<button type="button" class="btn btn-lg btn-link bg-primary waves-effect btn_member">Card Member</button>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<button type="button" class="btn btn-lg btn-link bg-primary waves-effect btn_qr_code">QR Code</button>
</div>
</div>
<div class="row clearfix"></div>
<div class="row text-center m-t-20">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<button type="button" class="btn btn-lg btn-link bg-green waves-effect btn_customer_yes">Yes</button>
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<button type="button" class="btn btn-lg btn-link bg-red waves-effect" data-dismiss="modal">No</button>
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<button type="button" class="btn btn-lg btn-link bg-primary waves-effect btn_member">Member</button>
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
<button type="button" class="btn btn-lg btn-link bg-primary waves-effect btn_qr_code">QR</button>
</div>
</div>
</div>
<div class="modal-footer"></div>
@@ -453,7 +457,12 @@
</div>
<div id="sxModal">
<div id="sxModal-Content"><h3>Card Tap</h3></div>
<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>
<script type="text/javascript">
@@ -463,7 +472,7 @@ var customer_name = "<%= @customer.name %>";
$(document).ready(function(){
setHeaderBreadCrumb(_PAYMENTS_);
//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});
}
@@ -481,7 +490,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();
@@ -601,7 +612,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 %>
@@ -1100,4 +1111,8 @@ var customer_name = "<%= @customer.name %>";
});
});
}
$("#sxModal .btn_cancel").on('click',function(){
$("#sxModal").hide();
});
</script>