From 3e8c3f8225af0e0d42b9aae174a3479c4cf62ea3 Mon Sep 17 00:00:00 2001 From: phyusin Date: Fri, 23 Mar 2018 13:54:19 +0630 Subject: [PATCH] check tax profile and member poup --- app/assets/stylesheets/origami.scss | 2 +- .../origami/payments_controller.rb | 7 +++-- app/views/layouts/_left_sidebar.html.erb | 4 +-- app/views/origami/payments/show.html.erb | 30 +++++++++++++++---- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 07c7428f..2aca4c29 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -399,7 +399,7 @@ i.logout_icon{ /* Start Is Member Modal */ #is_memberModal .modal-body { - height: 200px !important; + height: 260px !important; } #is_memberModal .btn { diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 18d24dc4..f034aa57 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -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 diff --git a/app/views/layouts/_left_sidebar.html.erb b/app/views/layouts/_left_sidebar.html.erb index f06b52ab..63067ec0 100644 --- a/app/views/layouts/_left_sidebar.html.erb +++ b/app/views/layouts/_left_sidebar.html.erb @@ -69,14 +69,14 @@ <% end %> - + <%end%>
  • <%= t :backend %>
  • diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index e79ab813..001adc53 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -100,10 +100,10 @@ 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 %>) <%= number_with_precision(@sale_data.total_tax, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i )%> @@ -445,6 +445,17 @@