check tax profile and member poup
This commit is contained in:
@@ -399,7 +399,7 @@ i.logout_icon{
|
||||
|
||||
/* Start Is Member Modal */
|
||||
#is_memberModal .modal-body {
|
||||
height: 200px !important;
|
||||
height: 260px !important;
|
||||
}
|
||||
|
||||
#is_memberModal .btn {
|
||||
|
||||
@@ -248,6 +248,8 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
|
||||
@shop = Shop::ShopDetail #show shop info
|
||||
|
||||
@customer_lists = Customer.where("customer_id = 'CUS-000000000001' or customer_id = 'CUS-000000000002'")
|
||||
|
||||
saleObj = Sale.find(sale_id)
|
||||
|
||||
#total customer with individual total amount
|
||||
@@ -297,10 +299,11 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
|
||||
#get customer amount
|
||||
@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 =[]
|
||||
accounts.each do |acc|
|
||||
account = TaxProfile.find(acc)
|
||||
account = TaxProfile.find(acc.id)
|
||||
@account_arr.push(account)
|
||||
end
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user