update quick service for payment

This commit is contained in:
Aung Myo
2018-02-02 18:03:43 +06:30
parent 3f584edbd8
commit 1d9164aaf0
24 changed files with 85 additions and 46 deletions

View File

@@ -115,6 +115,7 @@
</div>
</div>
</div>
<span id="cashier_type" class="hidden"><%=@cashier_type%></span>
<script>
$(document).ready(function() {
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
@@ -122,6 +123,7 @@
$('#validamount').attr("value",parseFloat("<%= @can_credit %>") - parseFloat(localStorage.getItem("cash")));
}
});
cashier_type = $('#cashier_type').text();
$(document).on('click', '.cashier_number', function(event){
event.stopPropagation();
event.preventDefault();
@@ -165,6 +167,7 @@
return false;
}
});
$('#credit_pay').on('click',function(){
var amount = $('#amount').text();
var sale_id = "<%= @sale_id %>";
@@ -184,7 +187,7 @@
closeOnCancel: false,
allowOutsideClick: false
}, function () {
window.location.href = '/origami/sale/'+ sale_id + "/payment";
window.location.href = '/origami/sale/'+ sale_id +"/"+ cashier_type + "/payment";
});
}
}