CARG#86011 kostensoort-listbox omgezet naar suggest in alle modellen (excl. BGT-gerelateerde modellen).
svn path=/Website/trunk/; revision=66770
This commit is contained in:
@@ -30,11 +30,6 @@ function model_bes_discipline(disc_key, params)
|
||||
}
|
||||
);
|
||||
|
||||
this.hook_pre_edit = function (obj, fld, params)
|
||||
{
|
||||
fld.costtype.foreign = mgt.pre_edit_kostensoort(obj);
|
||||
}
|
||||
|
||||
this.hook_post_post = function (params, obj, key)
|
||||
{
|
||||
var org_disc_key = getQParamInt("id", -1);
|
||||
@@ -91,7 +86,6 @@ _model_bes_discipline = // Internal only
|
||||
"label": L("prs_kostensoort_key"),
|
||||
"typ": "key",
|
||||
"foreign": "prs_kostensoort",
|
||||
"LOVinit": "",
|
||||
"showtransit": true
|
||||
},
|
||||
"costcentremandatory": {
|
||||
|
||||
@@ -66,7 +66,6 @@ function model_cht_discipline(disc_key, params)
|
||||
"label": L("prs_kostensoort_key"),
|
||||
"typ": "key",
|
||||
"foreign": "prs_kostensoort",
|
||||
"LOVinit": "",
|
||||
"multiedit": true,
|
||||
"showtransit": true
|
||||
},
|
||||
|
||||
@@ -20,11 +20,6 @@ function model_cnt_discipline(disc_key, params)
|
||||
// E<>n model voor de buitenwereld
|
||||
api2.merge_disc_params_model(this, _model_cnt_discipline);
|
||||
|
||||
this.hook_pre_edit = function (obj, fld, params)
|
||||
{
|
||||
fld.costtype.foreign = mgt.pre_edit_kostensoort(obj);
|
||||
}
|
||||
|
||||
this.hook_post_post = function (params, obj, key)
|
||||
{
|
||||
var org_disc_key = getQParamInt("id", -1);
|
||||
@@ -88,8 +83,7 @@ _model_cnt_discipline = // Internal only
|
||||
"dbs": "prs_kostensoort_key",
|
||||
"label": L("prs_kostensoort_key"),
|
||||
"typ": "key",
|
||||
"foreign": "prs_kostensoort",
|
||||
"LOVinit": ""
|
||||
"foreign": "prs_kostensoort"
|
||||
},
|
||||
"email": {
|
||||
"dbs": "ins_discipline_email",
|
||||
|
||||
@@ -20,11 +20,6 @@ function model_ins_discipline(disc_key, params)
|
||||
// E<>n model voor de buitenwereld
|
||||
api2.merge_disc_params_model(this, _model_ins_discipline);
|
||||
|
||||
this.hook_pre_edit = function (obj, fld, params)
|
||||
{
|
||||
fld.costtype.foreign = mgt.pre_edit_kostensoort(obj);
|
||||
}
|
||||
|
||||
this.hook_post_post = function (params, obj, key)
|
||||
{
|
||||
var org_disc_key = getQParamInt("id", -1);
|
||||
@@ -88,8 +83,7 @@ _model_ins_discipline = // Internal only
|
||||
"dbs": "prs_kostensoort_key",
|
||||
"label": L("prs_kostensoort_key"),
|
||||
"typ": "key",
|
||||
"foreign": "prs_kostensoort",
|
||||
"LOVinit": ""
|
||||
"foreign": "prs_kostensoort"
|
||||
},
|
||||
"colors": {
|
||||
"dbs": "ins_discipline_color",
|
||||
|
||||
@@ -79,8 +79,7 @@ function model_ins_tab_discipline(disc_key, params)
|
||||
"dbs": "prs_kostensoort_key",
|
||||
"label": L("prs_kostensoort_key"),
|
||||
"typ": "key",
|
||||
"foreign": "prs_kostensoort",
|
||||
"LOVinit": ""
|
||||
"foreign": "prs_kostensoort"
|
||||
},
|
||||
"costcentremandatory": {
|
||||
"dbs": "ins_discipline_kpnverplicht",
|
||||
|
||||
@@ -19,11 +19,6 @@ function model_mld_discipline(disc_key, params)
|
||||
// E<>n model voor de buitenwereld
|
||||
api2.merge_disc_params_model(this, _model_mld_discipline);
|
||||
|
||||
this.hook_pre_edit = function (obj, fld, params)
|
||||
{
|
||||
fld.costtype.foreign = mgt.pre_edit_kostensoort(obj);
|
||||
}
|
||||
|
||||
this.hook_post_post = function (params, obj, key)
|
||||
{
|
||||
var org_disc_key = getQParamInt("id", -1);
|
||||
|
||||
@@ -259,7 +259,6 @@ function model_mld_opdr()
|
||||
"typ": "key",
|
||||
"foreign": "prs_kostensoort",
|
||||
"readonly": S("mld_opdr_alt_kostensoort") == 1? false : true,
|
||||
"LOVinit": "",
|
||||
"track": true
|
||||
},
|
||||
"hours": {
|
||||
|
||||
@@ -139,7 +139,6 @@ function model_mld_stdmelding()
|
||||
"typ": "key",
|
||||
"label": L("lcl_charge_type"),
|
||||
"foreign": "prs_kostensoort",
|
||||
"emptyoption": "",
|
||||
"multiedit": true
|
||||
},
|
||||
"costcentre": {
|
||||
|
||||
@@ -24,11 +24,6 @@ function model_res_discipline(disc_key, params)
|
||||
// E<>n model voor de buitenwereld
|
||||
api2.merge_disc_params_model(this, _model_res_discipline);
|
||||
|
||||
this.hook_pre_edit = function (obj, fld, params)
|
||||
{
|
||||
fld.costtype.foreign = mgt.pre_edit_kostensoort(obj);
|
||||
}
|
||||
|
||||
this.hook_post_post = function (params, obj, key)
|
||||
{
|
||||
var org_disc_key = getQParamInt("id", -1);
|
||||
@@ -112,7 +107,6 @@ _model_res_discipline = // Internal only
|
||||
"label": L("prs_kostensoort_key"),
|
||||
"typ": "key",
|
||||
"foreign": "prs_kostensoort",
|
||||
"LOVinit": "",
|
||||
"multiedit": true,
|
||||
"showtransit": true
|
||||
},
|
||||
|
||||
@@ -17,33 +17,7 @@ mgt = {
|
||||
+ " , fac_gebruiker_prs_level_write, fac_gebruiker_alg_level_write"
|
||||
+ " FROM fac_groeprechten"
|
||||
+ " WHERE ins_discipline_key = " + org_disc_key;
|
||||
var err = Oracle.Execute(sql, true);
|
||||
if (err.friendlyMsg)
|
||||
abort_with_warning(err.friendlyMsg);
|
||||
},
|
||||
|
||||
pre_edit_kostensoort:
|
||||
function (obj)
|
||||
{
|
||||
var valid_costtype_sql = "SELECT prs_kostensoort_key"
|
||||
+ " , prs_kostensoort_oms"
|
||||
+ " FROM prs_kostensoort"
|
||||
+ " WHERE prs_kostensoort_verwijder IS NULL"
|
||||
+ " AND ( prs_kostensoort_eind >= TRUNC(SYSDATE)"
|
||||
+ " OR prs_kostensoort_eind IS NULL"
|
||||
+ " )"
|
||||
+ ( obj.id
|
||||
? " OR (prs_kostensoort_key = (SELECT prs_kostensoort_key"
|
||||
+ " FROM mld_discipline"
|
||||
+ " WHERE ins_discipline_key = " + obj.id
|
||||
+ ")"
|
||||
+ " )"
|
||||
: ""
|
||||
);
|
||||
return { "tbl": "(" + valid_costtype_sql + ")"
|
||||
, "key": "prs_kostensoort_key"
|
||||
, "desc": "prs_kostensoort_oms"
|
||||
};
|
||||
Oracle.Execute(sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -34,6 +34,7 @@ if (mode == "save" || mode == "delete" || mode == "api2")
|
||||
<!-- #include file="../Shared/bedrijfselector.inc" -->
|
||||
<!-- #include file="../Shared/autorisatieselector.inc" -->
|
||||
<!-- #include file="../Shared/autorisatiegroepselector.inc" -->
|
||||
<!-- #include file="../Shared/kostensoortselector.inc" -->
|
||||
<!-- #include file="../Shared/kostenplaatsselector.inc" -->
|
||||
<!-- #include file="../Shared/stdmeldingselector.inc" -->
|
||||
<!-- #include file="../Shared/disciplineselector.inc" -->
|
||||
@@ -406,6 +407,17 @@ function scf_RWFIELDTR(model, fld, val, key, params)
|
||||
whenEmpty: params.search ? L("lcl_search_generic") : null
|
||||
});
|
||||
}
|
||||
else if (predefined == "PRS_KOSTENSOORT")
|
||||
{
|
||||
FCLTkostensoortselector(fld,
|
||||
"sg" + fld,
|
||||
{ label: field.label,
|
||||
kostensoortKey: val?val.id:null,
|
||||
filtercode: "foreignfiltercode" in field? field.foreignfiltercode : "",
|
||||
required: params.required,
|
||||
whenEmpty: params.search ? L("lcl_search_generic") : null
|
||||
});
|
||||
}
|
||||
else if (predefined == "PRS_PERSLID")
|
||||
{
|
||||
var canmultiadd = fld == params.multiadd && !(key > 0);
|
||||
|
||||
Reference in New Issue
Block a user