update feedback testing
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h2>CREDIT PAYMENT</h2>
|
||||
</div>
|
||||
<div class="page-header">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%=origami_root_path %>"><%= t :home %></a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="/origami/sale/<%=@sale_id %>/payment"><%= t("views.btn.payment") %></a></li> -->
|
||||
<li class="breadcrumb-item active"><%= t("views.right_panel.details.credit") %></li>
|
||||
<span class="float-right">
|
||||
<%= link_to t('.back',:default => t("views.btn.back")),'/origami/sale/'+@sale_id +'/payment'%>
|
||||
</span>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-5 col-md-5 col-sm-3">
|
||||
<div class="card" style="margin-top:10px;padding-top:20px;">
|
||||
<div class="card m-t-10 p-l-20" style="padding-top:20px;">
|
||||
<div class="card-block">
|
||||
<div class="rebate-form">
|
||||
<!-- <div class="row"> -->
|
||||
@@ -104,10 +109,10 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<button type="button" class="btn bg-default m-l-10 btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/payment';"> Back </button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
@@ -163,14 +168,14 @@
|
||||
$('#credit_pay').on('click',function(){
|
||||
var amount = $('#amount').text();
|
||||
var sale_id = "<%= @sale_id %>";
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value"))){
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
||||
$.ajax({type: "POST",
|
||||
url: "<%= origami_payment_credit_path %>",
|
||||
data: "amount="+ amount + "&sale_id="+ sale_id,
|
||||
success:function(result){
|
||||
if(result){
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
title: "Information!",
|
||||
text: "Payment Success",
|
||||
type: "success"
|
||||
}, function () {
|
||||
@@ -180,7 +185,11 @@
|
||||
}
|
||||
});
|
||||
}else{
|
||||
swal("Alert","Paid Amount is over!","error");
|
||||
if (amount>0) {
|
||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||
}else{
|
||||
swal ( "Oops" , "Enter Amount!" , "error" );
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user