diff --git a/entity/VisitPlanEntry_entity/entityfields/icon/displayValueProcess.js b/entity/VisitPlanEntry_entity/entityfields/icon/displayValueProcess.js index 7b07825941b5b603de4b9323d2a2efabcaa9725e..f9923e9c1d15a6fd167c4e2c14dbbc6493cc8c47 100644 --- a/entity/VisitPlanEntry_entity/entityfields/icon/displayValueProcess.js +++ b/entity/VisitPlanEntry_entity/entityfields/icon/displayValueProcess.js @@ -1,16 +1,24 @@ +import("system.datetime"); import("system.vars"); import("system.db"); import("system.result"); import("Sql_lib"); +var week; if(vars.get("$param.EntryWeek_param")) { - - var week = vars.get("$param.EntryWeek_param"); + week = vars.get("$param.EntryWeek_param"); +} +else if(vars.get("$field.ENTRYDATE")) +{ + week = datetime.toLocaleDate(vars.get("$field.ENTRYDATE"), "w"); +} +if(week) +{ if(week.length == 1) { week = "0" + week; } result.string("TEXT:" + week); -} +} \ No newline at end of file