update membership discount firstbill

This commit is contained in:
Aung Myo
2017-12-21 10:35:09 +06:30
parent 0121ae910e
commit e0d97470cc
5 changed files with 80 additions and 6 deletions

View File

@@ -296,8 +296,8 @@ class Origami::PaymentsController < BaseOrigamiController
@shop = Shop.find_by_id(1)
if @shop.is_rounding_adj
a = saleObj.grand_total % 25
b = saleObj.grand_total / 25
a = saleObj.grand_total % 25 #
b = saleObj.grand_total / 25 #
if (a != 0.0 && b%2 != 0.0) || (a==0.0 && b%2 !=0)
new_total = Sale.get_rounding_adjustment(saleObj.grand_total)
rounding_adj = new_total-saleObj.grand_total