57 lines
2.4 KiB
Plaintext
Executable File
57 lines
2.4 KiB
Plaintext
Executable File
<div class="container-fluid">
|
|
<!-- <div class="page-header">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="<%=origami_root_path %>"><%= t :home %></a></li>
|
|
<li class="breadcrumb-item active"><%= t("views.btn.other_payment") %></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-11col-md-11 col-sm-11">
|
|
<div >
|
|
<div >
|
|
<span id="receipt_no" class="hidden"><%=@sale_data.receipt_no rescue ' '%></span>
|
|
<% @payment_method_setting.where("is_active = true").each do |payment_method|%>
|
|
<div class="purple others-payment bottom left m-l-30 <%= payment_method.payment_method %>" data-type="<%= payment_method.payment_method %>" id="<%= payment_method.payment_method %>" data-url="<%=payment_method.gateway_url%>" data-sale-id="<%= @sale_id%>"><%= payment_method.payment_method %></div>
|
|
<% end %>
|
|
</div>
|
|
</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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="server_mode" value="<%= ENV["SERVER_MODE"] %>">
|
|
<script type="text/javascript">
|
|
/* start check first bill or not*/
|
|
var cashier_type = "<%= @cashier_type %>";
|
|
var receipt_no = "";
|
|
if(($("#receipt_no").html()!=undefined) && ($("#receipt_no").html()!="")){
|
|
receipt_no = ($("#receipt_no").html()).trim();
|
|
}
|
|
if ($("#server_mode").val() != "cloud") { // first bill not used in cloud
|
|
payment_type = checkReceiptNoInFirstBillData(receipt_no,"payment");
|
|
if(payment_type) {
|
|
$(".others-payment").hide();
|
|
$(payment_type).each(function(i){
|
|
$("."+payment_type[i]).show();
|
|
});
|
|
}
|
|
}
|
|
/* end check first bill or not*/
|
|
|
|
$('.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;
|
|
})
|
|
|
|
$('#back').on('click',function(){
|
|
window.location.href = '/origami/sale/<%= @sale_id %>/<%= @cashier_type %>/payment/';
|
|
})
|
|
</script>
|