heck rounding adjustment error

This commit is contained in:
phyusin
2018-01-28 16:12:59 +06:30
parent d4e2d5be25
commit aa129ad469
9 changed files with 66 additions and 53 deletions

View File

@@ -6,12 +6,13 @@ class Origami::RedeemPaymentsController < BaseOrigamiController
sale_data = Sale.find_by_sale_id(@sale_id)
@shop = Shop::ShopDetail
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
# 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