check tax profile and member poup

This commit is contained in:
phyusin
2018-03-23 13:54:19 +06:30
parent 7350a24a5d
commit 3e8c3f8225
4 changed files with 32 additions and 11 deletions

View File

@@ -69,14 +69,14 @@
<% end %>
</ul>
</li>
<!-- <% if can? :menage, Inventory %>
<% if can? :menage, Inventory %>
<li>
<a href="<%= inventory_path %>">
<i class="material-icons">store</i>
<span><%= t :inventory %></span>
</a>
</li>
<%end%> -->
<%end%>
<li class="header"><%= t :backend %></li>
<li>
<a href="javascript:void(0);" class="menu-toggle">

View File

@@ -100,10 +100,10 @@
<td class="charges-name"><strong>Tax
(<% @i = 0
@account_arr.each do |ct| %>
<%=ct.name%>
<% if @account_arr.count != @i+1%>
+ <% @i =+1 %>
<%end%>
<%=ct.name%>
<% if @account_arr.count != @i+1%>
+ <% @i =+1 %>
<%end%>
<%end %>)
</strong></td>
<td class="item-attr"><strong><span><%= number_with_precision(@sale_data.total_tax, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i )%></span></strong></td>
@@ -445,6 +445,17 @@
<div class="modal-body">
<input type="hidden" name="paypar_account_no" id="paypar_account_no" />
<input type="hidden" name="qr_code" id="qr_code" />
<div class="row text-center m-t-20">
<% if !@customer_lists.nil? %>
<% @customer_lists.each do |cus| %>
<% if cus.customer_id != @customer.id %>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<button type="button" class="btn btn-lg btn-link bg-primary waves-effect btn_customer_assign" data-id='<%= cus.customer_id %>'><%= cus.name %></button>
</div>
<% end %>
<% end %>
<% end %>
</div>
<div class="row text-center m-t-20">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<button type="button" class="btn btn-lg btn-link bg-primary waves-effect btn_member">Card Member</button>
@@ -486,9 +497,9 @@ var customer_name = "<%= @customer.name %>";
$(document).ready(function(){
//start customer modal popup
if((cashier_type=='quick_service') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
if((customer_id == 'CUS-000000000001') && (customer_name == 'WALK-IN')){
// if((customer_id == 'CUS-000000000001') && (customer_name == 'WALK-IN')){
$("#is_memberModal").modal({show : true, backdrop: false, keyboard : false});
}
// }
}
/* start check first bill or not*/
@@ -1142,4 +1153,11 @@ var customer_name = "<%= @customer.name %>";
$("#sxModal .btn_cancel").on('click',function(){
$("#sxModal").hide();
});
$(".btn_customer_assign").on('click', function(){
var customer_id = $(this).attr('data-id');
var customer_name = $(this).text();
var sale_id = $("#sale_id").text() || 0;
update_sale("", customer_id, customer_name, sale_id);
});
</script>