update report and view
This commit is contained in:
@@ -166,7 +166,14 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
def rounding_adj
|
||||
|
||||
saleObj = Sale.find(params[:sale_id])
|
||||
new_total = Sale.get_rounding_adjustment(saleObj.grand_total)
|
||||
@shop = Shop.find_by_id(1)
|
||||
|
||||
if @shop.is_rounding_adj
|
||||
new_total = Sale.get_rounding_adjustment(saleObj.grand_total)
|
||||
else
|
||||
new_total = saleObj.grand_total
|
||||
end
|
||||
|
||||
rounding_adj = new_total-saleObj.grand_total
|
||||
|
||||
saleObj.update_attributes(grand_total: new_total,old_grand_total: saleObj.grand_total,rounding_adjustment:rounding_adj)
|
||||
|
||||
Reference in New Issue
Block a user