46 lines
1.5 KiB
Plaintext
Executable File
46 lines
1.5 KiB
Plaintext
Executable File
<div class="container-fluid">
|
|
<div class='row'>
|
|
<div class="col-lg-10 col-md-10 col-sm-10">
|
|
<h2><%= t :cash_out %></h2>
|
|
<table class='table table-striped'>
|
|
<tr>
|
|
<td> <%= t :payment_reference %></td>
|
|
<td><input type="text" class="form-control" placeholder="Reference" id="reference"></td>
|
|
</tr>
|
|
<tr>
|
|
<td> <%= t("views.right_panel.detail.remark") %></td>
|
|
<td><input type="text" class="form-control" placeholder="Remark" id="remark"></td>
|
|
</tr>
|
|
<tr>
|
|
<td> <%= t("views.right_panel.detail.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'> <%= t("views.btn.back") %> </button>
|
|
<button type="button" class="btn bg-blue btn-block" id='cash_out'> <%= t("views.btn.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>
|