diff --git a/app/controllers/origami/dinga_controller.rb b/app/controllers/origami/dinga_controller.rb index 55705fce..01e35004 100644 --- a/app/controllers/origami/dinga_controller.rb +++ b/app/controllers/origami/dinga_controller.rb @@ -7,13 +7,13 @@ class Origami::DingaController < BaseOrigamiController @sale_data = Sale.find_by_sale_id(@sale_id) @receipt_no = @sale_data.receipt_no @shop = Shop.first - # if @shop.is_rounding_adj - # new_total = Sale.get_rounding_adjustment(@sale_data.grand_total) - # else - # new_total = @sale_data.grand_total - # end - # @rounding_adj = new_total-@sale_data.grand_total - @rounding_adj = @sale_data.rounding_adjustment + if @shop.is_rounding_adj + new_total = Sale.get_rounding_adjustment(@sale_data.grand_total) + else + new_total = @sale_data.grand_total + end + @rounding_adj = new_total-@sale_data.grand_total + # @rounding_adj = @sale_data.rounding_adjustment @payparcount = 0 others = 0 diff --git a/app/controllers/origami/paymal_controller.rb b/app/controllers/origami/paymal_controller.rb index 911d5a24..19645e18 100644 --- a/app/controllers/origami/paymal_controller.rb +++ b/app/controllers/origami/paymal_controller.rb @@ -7,13 +7,13 @@ class Origami::PaymalController < BaseOrigamiController sale_data = Sale.find_by_sale_id(@sale_id) @receipt_no = sale_data.receipt_no @shop = Shop.first - # if @shop.is_rounding_adj - # new_total = Sale.get_rounding_adjustment(sale_data.grand_total) - # else - # new_total = sale_data.grand_total - # end - # @rounding_adj = new_total-sale_data.grand_total - @rounding_adj = sale_data.rounding_adjustment + if @shop.is_rounding_adj + new_total = Sale.get_rounding_adjustment(sale_data.grand_total) + else + new_total = sale_data.grand_total + end + @rounding_adj = new_total-sale_data.grand_total + # @rounding_adj = sale_data.rounding_adjustment @payparcount = 0 others = 0 diff --git a/app/controllers/origami/redeem_payments_controller.rb b/app/controllers/origami/redeem_payments_controller.rb index 708f9f8f..c0edf879 100755 --- a/app/controllers/origami/redeem_payments_controller.rb +++ b/app/controllers/origami/redeem_payments_controller.rb @@ -7,13 +7,13 @@ class Origami::RedeemPaymentsController < BaseOrigamiController sale_data = Sale.find_by_sale_id(@sale_id) @shop = Shop.first - # if @shop.is_rounding_adj - # new_total = Sale.get_rounding_adjustment(sale_data.grand_total) - # else - # new_total = sale_data.grand_total - # end - # @rounding_adj = new_total-sale_data.grand_total - @rounding_adj = sale_data.rounding_adjustment + if @shop.is_rounding_adj + new_total = Sale.get_rounding_adjustment(sale_data.grand_total) + else + new_total = sale_data.grand_total + end + @rounding_adj = new_total-sale_data.grand_total + # @rounding_adj = sale_data.rounding_adjustment @payparcount = 0 others = 0 diff --git a/app/controllers/origami/voucher_controller.rb b/app/controllers/origami/voucher_controller.rb index 515bf3a1..e512a48b 100755 --- a/app/controllers/origami/voucher_controller.rb +++ b/app/controllers/origami/voucher_controller.rb @@ -1,7 +1,7 @@ class Origami::VoucherController < BaseOrigamiController def index @sale_id = params[:sale_id] - + @cashier_type = params[:type] # limit voucher_amount sale_data = Sale.find_by_sale_id(@sale_id) total = sale_data.grand_total diff --git a/app/views/origami/voucher/index.html.erb b/app/views/origami/voucher/index.html.erb index c8d99c28..cf7a30d9 100755 --- a/app/views/origami/voucher/index.html.erb +++ b/app/views/origami/voucher/index.html.erb @@ -1,13 +1,21 @@ +