update osaka demo bugs
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
|
||||
<div id="loading_wrapper" style="display:none;">
|
||||
<div id="loading"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-3">
|
||||
<div class="card" >
|
||||
@@ -104,6 +106,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-5 col-md-5 col-sm-3">
|
||||
<div class="row" style="margin-top:10px;">
|
||||
<div class="col-md-8"><strong style="font-size:18px;">Amount Due</strong></div>
|
||||
@@ -258,6 +261,8 @@
|
||||
<button type="button" class="btn btn-primary btn-block"> FOC </button>
|
||||
<button type="button" class="btn btn-primary btn-block" id="void"> Void </button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -344,15 +349,19 @@ $( document ).ready(function() {
|
||||
|
||||
$('#pay').click(function() {
|
||||
$('#pay').text("Processing, Please wait!")
|
||||
|
||||
$( "#loading_wrapper" ).show();
|
||||
|
||||
if($('#balance').text() > 0){
|
||||
alert(" Insufficient Amount!")
|
||||
$( "#loading_wrapper" ).hide();
|
||||
}else{
|
||||
// payment
|
||||
var cash = $('#cash').text();
|
||||
var credit = $('#credit').text();
|
||||
var card = $('#card').text();
|
||||
var sale_id = $('#sale_id').text();
|
||||
|
||||
|
||||
$.ajax({type: "POST",
|
||||
url: "<%= origami_payment_cash_path %>",
|
||||
data: "cash="+ cash + "&sale_id=" + sale_id,
|
||||
@@ -364,7 +373,7 @@ $( document ).ready(function() {
|
||||
else{
|
||||
var msg = '';
|
||||
}
|
||||
|
||||
$( "#loading_wrapper" ).hide();
|
||||
if($('#balance').text() < 0){
|
||||
$.confirm({
|
||||
title: 'Infomation!',
|
||||
@@ -434,4 +443,4 @@ function update_balance(){
|
||||
$('#balance').text(result.toFixed(2));
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
Reference in New Issue
Block a user