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

@@ -23,9 +23,8 @@ class Origami::HomeController < BaseOrigamiController
@sale_array = Array.new
@shop = Shop::ShopDetail
@membership = MembershipSetting.find_by_discount(1)
@membership = MembershipSetting::MembershipSetting
@payment_methods = PaymentMethodSetting.all
@dining.bookings.active.each do |booking|
if booking.sale_id.nil? && booking.booking_status != 'moved'
@order_items = Array.new

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

View File

@@ -19,6 +19,9 @@ class Origami::RoomsController < BaseOrigamiController
@status_sale = ""
@sale_array = Array.new
@shop = Shop::ShopDetail
@membership = MembershipSetting::MembershipSetting
@payment_methods = PaymentMethodSetting.all
@room.bookings.active.each do |booking|
if booking.sale_id.nil? && booking.booking_status != 'moved'
@order_items = Array.new