From 445f98cf7cba6d370f8a3d4f4cf38a8fe7446151 Mon Sep 17 00:00:00 2001 From: phyusin Date: Thu, 24 May 2018 15:30:44 +0630 Subject: [PATCH] payment tax UI --- .../origami/payments_controller.rb | 2 +- app/views/origami/payments/show.html.erb | 56 ++++++++++++++++--- 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb index 045afafb..40d8c573 100755 --- a/app/controllers/origami/payments_controller.rb +++ b/app/controllers/origami/payments_controller.rb @@ -300,7 +300,7 @@ class Origami::PaymentsController < BaseOrigamiController @account_arr =[] accounts.each do |acc| account = TaxProfile.find(acc.id) - @account_arr.push(account) + @account_arr.push(account.name) end rebate = MembershipSetting.find_by_rebate(1) diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index fb4824ec..477cdca6 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -97,15 +97,53 @@ (<%= number_with_precision(@sale_data.total_discount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>) - Tax - (<% @i = 0 - @account_arr.each do |ct| %> - <%=ct.name%> - <% if @account_arr.count != @i+1%> - + <% @i =+1 %> - <%end%> - <%end %>) - + + + Tax + +
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+
+
+ <%= number_with_precision(@sale_data.total_tax, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i )%>