fix amount check
This commit is contained in:
parent
dcb507659d
commit
5fd33b62f8
|
@ -56,19 +56,19 @@ class NkuhtDonatesController < ApplicationController
|
||||||
@nkuht_donate.donation_serial_number = NkuhtDonateMain.get_serial_number
|
@nkuht_donate.donation_serial_number = NkuhtDonateMain.get_serial_number
|
||||||
@nkuht_donate.donation_payment_number = NkuhtDonateMain.get_payment_number
|
@nkuht_donate.donation_payment_number = NkuhtDonateMain.get_payment_number
|
||||||
|
|
||||||
if @nkuht_donate.donation_amount < '1'
|
if @nkuht_donate.donation_amount.to_i < 1
|
||||||
|
|
||||||
@notice = []
|
@notice = []
|
||||||
@notice << t('nkuht_donate.donation_amount_err')
|
@notice << t('nkuht_donate.donation_amount_err')
|
||||||
redirect_to "#{params[:referer_url]}", :notice => @notice
|
redirect_to "#{params[:referer_url]}", :notice => @notice
|
||||||
|
|
||||||
elsif @nkuht_donate.donation_way == '2' and @nkuht_donate.donation_amount > '30000'
|
elsif @nkuht_donate.donation_way == '2' and @nkuht_donate.donation_amount.to_i > 30000
|
||||||
|
|
||||||
@notice = []
|
@notice = []
|
||||||
@notice << t('nkuht_donate.donation_amount_atm')
|
@notice << t('nkuht_donate.donation_amount_atm')
|
||||||
redirect_to "#{params[:referer_url]}", :notice => @notice
|
redirect_to "#{params[:referer_url]}", :notice => @notice
|
||||||
|
|
||||||
elsif @nkuht_donate.donation_way == '3' and @nkuht_donate.donation_amount > '20000'
|
elsif @nkuht_donate.donation_way == '3' and @nkuht_donate.donation_amount.to_i > 20000
|
||||||
|
|
||||||
@notice = []
|
@notice = []
|
||||||
@notice << t('nkuht_donate.donation_amount_market')
|
@notice << t('nkuht_donate.donation_amount_market')
|
||||||
|
|
Loading…
Reference in New Issue