diff --git a/app/controllers/origami/void_controller.rb b/app/controllers/origami/void_controller.rb index 0523023e..6af6c275 100755 --- a/app/controllers/origami/void_controller.rb +++ b/app/controllers/origami/void_controller.rb @@ -8,7 +8,6 @@ class Origami::VoidController < BaseOrigamiController access_code = params[:access_code] if Sale.exists?(sale_id) sale = Sale.find_by_sale_id(sale_id) - puts sale.to_json if sale.discount_type == "member_discount" sale.update_attributes(total_discount: 0) sale.compute_by_sale_items(sale_id, sale.sale_items,0,order_source) diff --git a/app/views/reports/saleitem/index.html.erb b/app/views/reports/saleitem/index.html.erb index a56d6808..5abe8a0b 100644 --- a/app/views/reports/saleitem/index.html.erb +++ b/app/views/reports/saleitem/index.html.erb @@ -95,7 +95,6 @@ total_qty += sale.total_item*(-1) end %> - <% if sale.status_type == "foc" && sale.grand_total < 0 total_item_foc += sale.grand_total*(-1) end %> @@ -249,9 +248,21 @@   <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.item") %> <%= total_qty%> - <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> - <%= number_with_precision(grand_total , precision:precision.to_i,delimiter:delimiter)%> + <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> + <%= number_with_precision(grand_total , precision:precision.to_i,delimiter:delimiter)%> + <% if @type =="" || @type =="all" || @type.nil? %> + +   + Total FOC Amount + <%= number_with_precision(@foc_data , precision:precision.to_i,delimiter:delimiter)%> + + +   + <%= t("views.right_panel.detail.net_amount") %> + <%= number_with_precision(grand_total -@foc_data , precision:precision.to_i,delimiter:delimiter)%> + + <% end %> <% end %> <% if @type == "other"%> @@ -296,6 +307,7 @@ \ No newline at end of file