check tax profile and member poup
This commit is contained in:
@@ -399,7 +399,7 @@ i.logout_icon{
|
|||||||
|
|
||||||
/* Start Is Member Modal */
|
/* Start Is Member Modal */
|
||||||
#is_memberModal .modal-body {
|
#is_memberModal .modal-body {
|
||||||
height: 200px !important;
|
height: 260px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#is_memberModal .btn {
|
#is_memberModal .btn {
|
||||||
|
|||||||
@@ -248,6 +248,8 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
|
|
||||||
@shop = Shop::ShopDetail #show shop info
|
@shop = Shop::ShopDetail #show shop info
|
||||||
|
|
||||||
|
@customer_lists = Customer.where("customer_id = 'CUS-000000000001' or customer_id = 'CUS-000000000002'")
|
||||||
|
|
||||||
saleObj = Sale.find(sale_id)
|
saleObj = Sale.find(sale_id)
|
||||||
|
|
||||||
#total customer with individual total amount
|
#total customer with individual total amount
|
||||||
@@ -297,10 +299,11 @@ class Origami::PaymentsController < BaseOrigamiController
|
|||||||
|
|
||||||
#get customer amount
|
#get customer amount
|
||||||
@customer = Customer.find(@sale_data.customer_id)
|
@customer = Customer.find(@sale_data.customer_id)
|
||||||
accounts = @customer.tax_profiles
|
# accounts = @customer.tax_profiles
|
||||||
|
accounts = TaxProfile.where("group_type = ?",@cashier_type).order("order_by ASC")
|
||||||
@account_arr =[]
|
@account_arr =[]
|
||||||
accounts.each do |acc|
|
accounts.each do |acc|
|
||||||
account = TaxProfile.find(acc)
|
account = TaxProfile.find(acc.id)
|
||||||
@account_arr.push(account)
|
@account_arr.push(account)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -69,14 +69,14 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<!-- <% if can? :menage, Inventory %>
|
<% if can? :menage, Inventory %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%= inventory_path %>">
|
<a href="<%= inventory_path %>">
|
||||||
<i class="material-icons">store</i>
|
<i class="material-icons">store</i>
|
||||||
<span><%= t :inventory %></span>
|
<span><%= t :inventory %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<%end%> -->
|
<%end%>
|
||||||
<li class="header"><%= t :backend %></li>
|
<li class="header"><%= t :backend %></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="javascript:void(0);" class="menu-toggle">
|
<a href="javascript:void(0);" class="menu-toggle">
|
||||||
|
|||||||
@@ -100,10 +100,10 @@
|
|||||||
<td class="charges-name"><strong>Tax
|
<td class="charges-name"><strong>Tax
|
||||||
(<% @i = 0
|
(<% @i = 0
|
||||||
@account_arr.each do |ct| %>
|
@account_arr.each do |ct| %>
|
||||||
<%=ct.name%>
|
<%=ct.name%>
|
||||||
<% if @account_arr.count != @i+1%>
|
<% if @account_arr.count != @i+1%>
|
||||||
+ <% @i =+1 %>
|
+ <% @i =+1 %>
|
||||||
<%end%>
|
<%end%>
|
||||||
<%end %>)
|
<%end %>)
|
||||||
</strong></td>
|
</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>
|
<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">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="paypar_account_no" id="paypar_account_no" />
|
<input type="hidden" name="paypar_account_no" id="paypar_account_no" />
|
||||||
<input type="hidden" name="qr_code" id="qr_code" />
|
<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="row text-center m-t-20">
|
||||||
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
<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>
|
<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(){
|
$(document).ready(function(){
|
||||||
//start customer modal popup
|
//start customer modal popup
|
||||||
if((cashier_type=='quick_service') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
|
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});
|
$("#is_memberModal").modal({show : true, backdrop: false, keyboard : false});
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* start check first bill or not*/
|
/* start check first bill or not*/
|
||||||
@@ -1142,4 +1153,11 @@ var customer_name = "<%= @customer.name %>";
|
|||||||
$("#sxModal .btn_cancel").on('click',function(){
|
$("#sxModal .btn_cancel").on('click',function(){
|
||||||
$("#sxModal").hide();
|
$("#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>
|
</script>
|
||||||
Reference in New Issue
Block a user