diff --git a/app/controllers/origami/void_controller.rb b/app/controllers/origami/void_controller.rb index f0b7dfc7..cea64868 100755 --- a/app/controllers/origami/void_controller.rb +++ b/app/controllers/origami/void_controller.rb @@ -9,11 +9,6 @@ class Origami::VoidController < BaseOrigamiController if Sale.exists?(sale_id) sale = Sale.find_by_sale_id(sale_id) - if sale.discount_type == "member_discount" - sale.update_attributes(total_discount: 0) - sale.compute_by_sale_items(0, nil, order_source) - end - # update count for shift sale if(sale.sale_status == "completed") if sale.shift_sale_id != nil @@ -29,6 +24,11 @@ class Origami::VoidController < BaseOrigamiController end end + if sale.discount_type == "member_discount" + sale.update_attributes(total_discount: 0) + sale.compute_by_sale_items(0, nil, order_source) + end + sale.rounding_adjustment = 0.0 sale.payment_status = 'void' sale.sale_status = 'void'