diff --git a/app/views/reports/dailysale/index.html.erb b/app/views/reports/dailysale/index.html.erb
index f40c2d5d..85c7bed8 100755
--- a/app/views/reports/dailysale/index.html.erb
+++ b/app/views/reports/dailysale/index.html.erb
@@ -44,9 +44,10 @@
<%= t("views.right_panel.detail.credit_sales") %> |
<%= t("views.right_panel.detail.foc_sales") %> |
(<%= t("views.right_panel.detail.discount") %>) |
- <%= t("views.right_panel.detail.grand_total") %> + <%= t("views.right_panel.detail.rnd_adj_sh") %> |
+
+ <%= t("views.right_panel.detail.grand_total") %> |
<%= t("views.right_panel.detail.rnd_adj_sh") %> |
- <%= t("views.right_panel.detail.grand_total") %> |
+
<% if @print_settings.precision.to_i > 0
@@ -121,9 +122,10 @@
<%= number_with_precision(sale[:credit_amount], precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
<%= number_with_precision(sale[:foc_amount], precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
(<%= number_with_precision(sale[:total_discount], precision:precision,delimiter:delimiter) rescue '-'%>) |
- <%= number_with_precision(sale[:grand_total].to_f + sale[:rounding_adj].to_f , precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
+
+ <%= number_with_precision(sale[:grand_total], precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
<%= number_with_precision(sale[:rounding_adj].to_f, precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
- <%= number_with_precision(sale[:grand_total], precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
+
<% count = count + 1 %>
<% end %>
@@ -144,12 +146,13 @@
<%= number_with_precision(credit, precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
<%= number_with_precision(foc, precision:precision,delimiter:delimiter) rescue '-'%> |
(<%= number_with_precision(discount, precision:precision.to_i,delimiter:delimiter) rescue '-'%>) |
- <%= number_with_precision(total, precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
+
+ <%= number_with_precision(grand_total, precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
<%= number_with_precision(rounding_adj, precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
- <%= number_with_precision(grand_total, precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
+
-
<% total_tax = 0 %>
+ <% net = 0 %>
<% unless @tax.empty? %>
<% @tax.each do |tax| %>
<% total_tax += tax.tax_amount.to_f %>
@@ -161,7 +164,16 @@
<% end %>
<% end %>
- <% net = total - total_tax %>
+
+ | Discount |
+ <%= number_with_precision(discount, precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
+ |
+
+
+ <% net = grand_total%>
+ <% net = grand_total- discount%>
+ <% net = net - rounding_adj%>
+ <% net = net - total_tax %>
| <%= t("views.right_panel.detail.net_amount") %> |
<%= number_with_precision(net, precision:precision.to_i,delimiter:delimiter) rescue '-'%> |
diff --git a/app/views/reports/receipt_no/index.html.erb b/app/views/reports/receipt_no/index.html.erb
index 9581d5df..5cecd715 100755
--- a/app/views/reports/receipt_no/index.html.erb
+++ b/app/views/reports/receipt_no/index.html.erb
@@ -72,6 +72,7 @@
<% grand_total = 0 %>
<% old_grand_total = 0 %>
+ <% after_rounding = 0 %>
<% total_tax = 0 %>
<% guest_count = 0 %>
<% total_sum = 0 %>
@@ -82,13 +83,15 @@
<%if @sale_data %>
<% @sale_data.each do |result| %>
- <% grand_total = grand_total.to_f + result.grand_total.to_f %>
- <% old_grand_total = old_grand_total.to_f + result.old_grand_total.to_f %>
+ <% grand_total +=result.grand_total.to_f %>
+ <% old_grand_total += result.grand_total_after_rounding() %>
<% total_tax += result.total_tax.to_f %>
<% total_sum += result.total_amount.to_f %>
<% discount_amt += result.total_discount.to_f %>
<% rounding_adj += result.rounding_adjustment.to_f %>
+
+
| <%= result.receipt_no rescue '-' %> |
@@ -101,12 +104,11 @@
<% result.sale_taxes.each do |tax| %>
<%= number_with_precision(tax.tax_payable_amount, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> |
<%end%>
-
- <%= number_with_precision(result.grand_total, precision: precision.to_i ,delimiter: delimiter) %> |
- <%= result.rounding_adjustment.to_f rescue '-' %> |
<%= number_with_precision(result.grand_total_after_rounding(), precision: precision.to_i ,delimiter: delimiter) rescue '-' %> |
+
+ <%= result.rounding_adjustment.to_f rescue '-' %> |
+ <%= number_with_precision(result.grand_total, precision: precision.to_i ,delimiter: delimiter) %> |
-
<% end %>
| |
@@ -121,9 +123,10 @@
0 |
<% end %>
<% end %>
- <%= number_with_precision(grand_total.to_f, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> |
+ <%= number_with_precision(old_grand_total.to_f, precision: precision.to_i ,delimiter: delimiter) rescue '0' %> |
+
<%= rounding_adj.to_f rescue '-' %> |
- <%= number_with_precision(grand_total.to_f.round + rounding_adj, precision: precision.to_i ,delimiter: delimiter) rescue '0' %> |
+ <%= number_with_precision(grand_total.to_f, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> |
| |
diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb
index b84bca54..e0eb7455 100644
--- a/config/initializers/action_controller.rb
+++ b/config/initializers/action_controller.rb
@@ -20,11 +20,11 @@ class ActionController::Base
end
else
#check for license file
- # if check_license
- # current_license(ENV["SX_PROVISION_URL"])
- # else
- # redirect_to activate_path
- # end
+ if check_license
+ current_license(ENV["SX_PROVISION_URL"])
+ else
+ redirect_to activate_path
+ end
end
end