update payment control with first bill
This commit is contained in:
@@ -14,8 +14,9 @@
|
||||
<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" 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>
|
||||
<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>
|
||||
@@ -26,6 +27,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* start check first bill or not*/
|
||||
var receipt_no = "";
|
||||
if(($("#receipt_no").html()!=undefined) && ($("#receipt_no").html()!="")){
|
||||
receipt_no = ($("#receipt_no").html()).trim();
|
||||
}
|
||||
|
||||
payment_type = checkReceiptNoInFirstBillData(receipt_no,"payment");
|
||||
if(payment_type) {
|
||||
$(".others-payment").hide();
|
||||
$("."+payment_type).show();
|
||||
}
|
||||
|
||||
/* end check first bill or not*/
|
||||
|
||||
$('.others-payment').on('click',function(){
|
||||
var input_type = $(this).attr("data-type");
|
||||
|
||||
Reference in New Issue
Block a user