fix dining charges for room
This commit is contained in:
@@ -93,7 +93,7 @@ class ApplicationController < ActionController::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def check_installation
|
def check_license
|
||||||
if current_company.nil?
|
if current_company.nil?
|
||||||
redirect_to install_path
|
redirect_to install_path
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class Settings::DiningChargesController < ApplicationController
|
|||||||
if @table
|
if @table
|
||||||
format.html { redirect_to settings_zone_table_path(@zone,@settings_dining_facility), notice: 'Dining charge was successfully updated.' }
|
format.html { redirect_to settings_zone_table_path(@zone,@settings_dining_facility), notice: 'Dining charge was successfully updated.' }
|
||||||
else
|
else
|
||||||
format.html { redirect_to settings_zone_table_path(@zone,@settings_dining_facility), notice: 'Dining charge was successfully updated.' }
|
format.html { redirect_to settings_zone_room_path(@zone,@settings_dining_facility), notice: 'Dining charge was successfully updated.' }
|
||||||
end
|
end
|
||||||
format.json { render :show, status: :ok, location: @dining_charge }
|
format.json { render :show, status: :ok, location: @dining_charge }
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class DiningCharge < ApplicationRecord
|
|||||||
result = dining_minutes / charge_block
|
result = dining_minutes / charge_block
|
||||||
if result.to_i < 1
|
if result.to_i < 1
|
||||||
# for dining minute is under charge_block
|
# for dining minute is under charge_block
|
||||||
return result.to_i,chargesObj.unit_price
|
return 1, result.to_i,chargesObj.unit_price
|
||||||
elsif result.to_i >= 1
|
elsif result.to_i >= 1
|
||||||
solid_price = result * chargesObj.unit_price
|
solid_price = result * chargesObj.unit_price
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user