Commit 1c464769 authored by Frank Bergmann's avatar Frank Bergmann

- fixed wrong error message when saving changes to an absence

parent 0788e97e
......@@ -56,18 +56,6 @@ if { $exception_count > 0 } {
return
}
set start_date_and_user_exists_p [db_string unique_check "
select count(*)
from im_user_absences
where start_date = :start_date
and owner_id = :owner_id
"]
if {$start_date_and_user_exists_p} {
ad_return_complaint 1 [lang::message::lookup "" intranet-timesheet2.Entry_alread_exists_for_same_start_date "<b>Duplicate Absence Error</b>:<br>There is already an entry for you for the same Start Date. Please choose another start date for your absence."]
return
}
if {"" != $submit_del} {
if {$absence_id > 0} {
......@@ -79,9 +67,14 @@ if {"" != $submit_del} {
}
}
if {"" != $submit_save} {
set exists [db_string absence_exists "select count(*) from im_user_absences where absence_id = :absence_id"]
set exists [db_string absence_exists "
select count(*)
from im_user_absences
where absence_id = :absence_id
"]
if {!$exists} {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment