merge with old_town_aston req

This commit is contained in:
phyusin
2018-03-12 12:10:52 +06:30
parent 6e9ecd342b
commit 92401ab4f9
6 changed files with 99 additions and 27 deletions

View File

@@ -46,6 +46,7 @@ class Origami::TableInvoicesController < BaseOrigamiController
if (a != 0.0 && b%2 != 0.0) || (a==0.0 && b%2 !=0)
new_total = Sale.get_rounding_adjustment(sale.grand_total)
sale.rounding_adjustment = new_total-sale.grand_total
sale.update_attributes(grand_total: new_total,old_grand_total: sale.grand_total,rounding_adjustment:sale.rounding_adjustment)
end
end
#end rounding adjustment