46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
<div class="container-fluid">
|
|
<div class='row'>
|
|
<div class="col-lg-10 col-md-10 col-sm-10">
|
|
<h2>Cash Out</h2>
|
|
<table class='table table-striped'>
|
|
<tr>
|
|
<td> Payment Reference</td>
|
|
<td><input type="text" class="form-control" placeholder="Reference" id="reference"></td>
|
|
</tr>
|
|
<tr>
|
|
<td> Remark</td>
|
|
<td><input type="text" class="form-control" placeholder="Remark" id="remark"></td>
|
|
</tr>
|
|
<tr>
|
|
<td> Amount </td>
|
|
<td><input type="text" class="form-control" placeholder="Amount" id="amount"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="col-lg-2 col-md-2 col-sm-2">
|
|
<br><br>
|
|
<button type="button" class="btn bg-default btn-block" id='back'> Back </button>
|
|
<button type="button" class="btn bg-blue btn-block" id='cash_out'> Cash Out </button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
|
|
$('#cash_out').on('click',function(){
|
|
var reference = $('#reference').val();
|
|
var remark = $('#remark').val();
|
|
var amount = $('#amount').val();
|
|
$.ajax({type: "POST",
|
|
url: "<%= origami_cash_outs_path %>",
|
|
data: "reference="+ reference + "&remark=" + remark + "&amount="+ amount,
|
|
success:function(result){
|
|
window.location.href = '/origami';
|
|
}
|
|
});
|
|
})
|
|
|
|
$('#back').on('click',function(){
|
|
window.location.href = '/origami';
|
|
})
|
|
</script>
|