Skip to content
Snippets Groups Projects
Commit 7abfee48 authored by c.wimmer's avatar c.wimmer
Browse files

[Projekt: Crowd-Development / Besuch vor Ort][TicketNr.: 1068990][[Bug] Wochenplan bearbeiten]

parent 1b424096
No related branches found
No related tags found
No related merge requests found
import("system.result");
import("Sql_lib");
import("Employee_lib");
import("system.logging");
import("system.datetime");
import("system.vars");
import("system.neon");
import("system.eMath");
import("system.vars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
var year = eMath.absInt(vars.get("$field.YEAR"));
var week = vars.get("$local.value");
var user = vars.get("$field.CONTACT_ID");
var year = eMath.absInt(vars.get("$field.YEAR"));
var week = vars.get("$local.value");
var user = vars.get("$field.CONTACT_ID");
var weekEntry = newSelect("VISITPLANEMPLOYEEWEEKID")
.from("VISITPLANEMPLOYEEWEEK")
.where("VISITPLANEMPLOYEEWEEK.VISITPLAN_YEAR", year)
.and("VISITPLANEMPLOYEEWEEK.VISITPLAN_WEEK", week)
.and("VISITPLANEMPLOYEEWEEK.CONTACT_ID", user)
.cell();
var weekEntry = newSelect("VISITPLANEMPLOYEEWEEKID")
.from("VISITPLANEMPLOYEEWEEK")
.where("VISITPLANEMPLOYEEWEEK.VISITPLAN_YEAR", year)
.and("VISITPLANEMPLOYEEWEEK.VISITPLAN_WEEK", week)
.and("VISITPLANEMPLOYEEWEEK.CONTACT_ID", user)
.cell();
if(weekEntry)
result.string("Weekplan already exists!");
\ No newline at end of file
if(weekEntry)
result.string("Weekplan already exists!");
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment