credit payment function

This commit is contained in:
phyusin
2018-07-10 18:12:25 +06:30
parent d0118d2cfc
commit bf0f76ebc7
29 changed files with 879 additions and 462 deletions

View File

@@ -25,7 +25,7 @@
</div>
</div>
<div class="col-lg-1 col-md-1 col-sm-1 m-t-10">
<button type="button" class="btn bg-default m- btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/<%= @cashier_type %>/payment';"> <i class="material-icons m-t--5">reply</i>Back </button>
<button type="button" class="btn bg-default m- btn-block" id="back"> <i class="material-icons m-t--5">reply</i>Back </button>
</div>
</div>
</div>
@@ -55,11 +55,19 @@
$('.others-payment').on('click',function(){
var input_type = $(this).attr("data-type");
var sale_id = $(this).attr("data-sale-id");
window.location.href = '/origami/sale/'+ sale_id +"/"+ cashier_type + "/payment/others_payment/" + input_type;
var url_param = "payment";
if(location.pathname.includes("credit_payment")){
url_param = "credit_payment";
}
window.location.href = '/origami/sale/'+ sale_id +"/"+ cashier_type + "/"+url_param+"/others_payment/" + input_type;
})
$('#back').on('click',function(){
window.location.href = '/origami/sale/'+'<%= @sale_id %>'+'/<%= @cashier_type %>/payment';
var url_param = "payment";
if(location.pathname.includes("credit_payment")){
url_param = "credit_payment";
}
window.location.href = '/origami/sale/'+'<%= @sale_id %>'+'/<%= @cashier_type %>/'+url_param;
// window.location.href = '/origami/sale/' + sale_id + "/cashier/payment";
})
</script>