FSN#39312 Verder ontsluiten van modellen via de API
svn path=/Website/trunk/; revision=32921
This commit is contained in:
@@ -14,134 +14,134 @@
|
||||
<%
|
||||
model_bes_disc_params =
|
||||
{
|
||||
"records_name": "orderdisciplineparams",
|
||||
"record_name": "orderdisciplineparam",
|
||||
"table": "bes_disc_params",
|
||||
"primary": "bes_disc_params_key",
|
||||
"records_name": "bes_disc_params",
|
||||
"record_name": "bes_disc_params",
|
||||
"autfunction": "WEB_BESMSU",
|
||||
|
||||
|
||||
"fields": {
|
||||
"id": {
|
||||
"dbs": "bes_disc_params_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"seq": "bes_s_bes_disc_params_key"
|
||||
},
|
||||
"bes_ins_discipline_key": {
|
||||
"orderdiscipline": {
|
||||
"dbs": "bes_ins_discipline_key",
|
||||
"label": "Foreign key",
|
||||
"typ": "key",
|
||||
"hidden_fld": true
|
||||
},
|
||||
"fiatflow": {
|
||||
"approvalflow": {
|
||||
"dbs": "bes_disc_params_fiatflow",
|
||||
"label": L("bes_discipline_fiatflow"),
|
||||
"typ": "number",
|
||||
"LOV": L("bes_discipline_fiatflowLOV"),
|
||||
"emptyoption": null
|
||||
},
|
||||
"bestellimiet1": {
|
||||
"purchaseorderlimit1": {
|
||||
"dbs": "bes_disc_params_bestellimiet",
|
||||
"label": L("bes_discipline_bestellimiet1"),
|
||||
"iscurrency": true,
|
||||
"typ": "float"
|
||||
},
|
||||
"bestellimiet2": {
|
||||
"purchaseorderlimit2": {
|
||||
"dbs": "bes_disc_params_bestellimiet2",
|
||||
"label": L("bes_discipline_bestellimiet2"),
|
||||
"iscurrency": true,
|
||||
"typ": "float"
|
||||
},
|
||||
"bestellimiet3": {
|
||||
"purchaseorderlimit3": {
|
||||
"dbs": "bes_disc_params_bestellimiet3",
|
||||
"label": L("bes_discipline_bestellimiet3"),
|
||||
"iscurrency": true,
|
||||
"typ": "float"
|
||||
},
|
||||
"bestellimiet4": {
|
||||
"purchaseorderlimit4": {
|
||||
"dbs": "bes_disc_params_bestellimiet4",
|
||||
"label": L("bes_discipline_bestellimiet4"),
|
||||
"iscurrency": true,
|
||||
"typ": "float"
|
||||
},
|
||||
"bestellimiet5": {
|
||||
"purchaseorderlimit5": {
|
||||
"dbs": "bes_disc_params_bestellimiet5",
|
||||
"label": L("bes_discipline_bestellimiet5"),
|
||||
"iscurrency": true,
|
||||
"typ": "float"
|
||||
},
|
||||
"min_bedrag": {
|
||||
"minimalamount": {
|
||||
"dbs": "bes_disc_params_min_bedrag",
|
||||
"label": L("bes_discipline_min_bedrag"),
|
||||
"iscurrency": true,
|
||||
"iscurrency": true,
|
||||
"typ": "float"
|
||||
},
|
||||
"auto_order": {
|
||||
"createorder": {
|
||||
"dbs": "bes_disc_params_auto_order",
|
||||
"label": L("bes_discipline_auto_order"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"autoaccept_rfo": {
|
||||
"acceptrequest": {
|
||||
"dbs": "bes_disc_params_autoacceptrfo",
|
||||
"label": L("bes_discipline_autoacceptrfo"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"herfiat": {
|
||||
"mutationallowed": {
|
||||
"dbs": "bes_disc_params_herfiat",
|
||||
"label": L("bes_discipline_herfiat"),
|
||||
"typ": "number",
|
||||
"LOV": L("bes_discipline_herfiatLOV"),
|
||||
"emptyoption": null
|
||||
},
|
||||
"herfiatpct": {
|
||||
"deviationpercentage": {
|
||||
"dbs": "bes_disc_params_herfiatpct",
|
||||
"label": L("bes_discipline_herfiatpct"),
|
||||
"typ": "number"
|
||||
},
|
||||
"herfiatmarge": {
|
||||
"deviationamount": {
|
||||
"dbs": "bes_disc_params_herfiatmarge",
|
||||
"label": L("bes_discipline_herfiatmarge"),
|
||||
"iscurrency": true,
|
||||
"typ": "float"
|
||||
},
|
||||
"factuurpct": {
|
||||
"invoicepercentage": {
|
||||
"dbs": "bes_disc_params_factuurpct",
|
||||
"label": L("bes_discipline_factuurpct"),
|
||||
"typ": "number"
|
||||
},
|
||||
"factuurmarge": {
|
||||
"invoiceamount": {
|
||||
"dbs": "bes_disc_params_factuurmarge",
|
||||
"label": L("bes_discipline_factuurmarge"),
|
||||
"iscurrency": true,
|
||||
"typ": "float"
|
||||
},
|
||||
"factmatchmode": {
|
||||
"invoicematching": {
|
||||
"dbs": "bes_disc_params_factmatchmode",
|
||||
"label": L("bes_discipline_factmatchmode"),
|
||||
"typ": "number",
|
||||
"LOV": L("bes_discipline_factmatchmodeLOV"),
|
||||
"emptyoption": null
|
||||
},
|
||||
"factuurappr": {
|
||||
"approveinvoice": {
|
||||
"dbs": "bes_disc_params_factuurappr",
|
||||
"label": L("bes_discipline_factuurappr"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"factuurgrens": {
|
||||
"invoicelimit": {
|
||||
"dbs": "bes_disc_params_factuurgrens",
|
||||
"label": L("bes_discipline_factuurgrens"),
|
||||
"typ": "number"
|
||||
},
|
||||
"pgb": {
|
||||
"chargebudget": {
|
||||
"dbs": "bes_disc_params_pgb",
|
||||
"label": L("bes_discipline_pgb"),
|
||||
"typ": "number",
|
||||
"LOV": L("bes_discipline_pgbLOV"),
|
||||
"emptyoption": null
|
||||
},
|
||||
"leverdagen": {
|
||||
"deliverytime": {
|
||||
"dbs": "bes_disc_params_leverdagen",
|
||||
"label": L("bes_discipline_leverdagen"),
|
||||
"typ": "number"
|
||||
@@ -158,12 +158,12 @@ model_bes_disc_params =
|
||||
"LOV": L("bes_discipline_freeartikelLOV"),
|
||||
"emptyoption": null
|
||||
},
|
||||
"punchout_url": {
|
||||
"punchouturl": {
|
||||
"dbs": "bes_disc_params_punchouturl",
|
||||
"label": L("bes_discipline_punchouturl"),
|
||||
"typ": "varchar"
|
||||
},
|
||||
"punch_bedr_key": {
|
||||
"company": {
|
||||
"dbs": "bes_disc_params_punch_bedr_key",
|
||||
"label": L("bes_discipline_punch_bedr_key"),
|
||||
"typ": "key",
|
||||
@@ -173,42 +173,42 @@ model_bes_disc_params =
|
||||
"desc": "prs_bedrijf_naam"
|
||||
}
|
||||
},
|
||||
"logo_url": {
|
||||
"logourl": {
|
||||
"dbs": "bes_disc_params_logo_url",
|
||||
"label": L("bes_discipline_logo_url"),
|
||||
"typ": "varchar"
|
||||
},
|
||||
"noti_dagen": {
|
||||
"reminderdays": {
|
||||
"dbs": "bes_disc_params_noti_dagen",
|
||||
"label": L("bes_discipline_noti_dagen"),
|
||||
"typ": "number"
|
||||
},
|
||||
"noti_opdr": {
|
||||
"notifypurchaser": {
|
||||
"dbs": "bes_disc_params_noti_opdr",
|
||||
"label": L("bes_discipline_noti_opdr"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"bonotify": {
|
||||
"notifybackoffice": {
|
||||
"dbs": "bes_disc_params_bonotify",
|
||||
"label": L("bes_discipline_bonotify"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"retour": {
|
||||
"returnallowd": {
|
||||
"dbs": "bes_disc_params_retour",
|
||||
"label": L("bes_discipline_retour"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"retour_url": {
|
||||
"returnurl": {
|
||||
"dbs": "bes_disc_params_retour_url",
|
||||
"label": L("bes_discipline_retour_url"),
|
||||
"typ": "varchar"
|
||||
},
|
||||
"levopm_url": {
|
||||
"remarkurl": {
|
||||
"dbs": "bes_disc_params_levopm_url",
|
||||
"label": L("bes_discipline_levopm_url"),
|
||||
"typ": "varchar"
|
||||
},
|
||||
"inkoop_key": {
|
||||
"orderdisciplines": {
|
||||
"dbs": "bes_ins_discipline_key_inkoop",
|
||||
"label": L("bes_discipline_key_inkoop"),
|
||||
"typ": "key",
|
||||
@@ -218,27 +218,27 @@ model_bes_disc_params =
|
||||
"desc": "ins_discipline_omschrijving"
|
||||
}
|
||||
},
|
||||
"singlegroep": {
|
||||
"singlegroup": {
|
||||
"dbs": "bes_disc_params_singlegroep",
|
||||
"label": L("bes_discipline_singlegroep"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"kpautorisatie": {
|
||||
"ordermandate": {
|
||||
"dbs": "bes_disc_params_kpautorisatie",
|
||||
"label": L("bes_discipline_kpautorisatie"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"maxartikel": {
|
||||
"maximumarticles": {
|
||||
"dbs": "bes_disc_params_maxartikel",
|
||||
"label": L("bes_discipline_maxartikel"),
|
||||
"typ": "number"
|
||||
},
|
||||
"contract": {
|
||||
"subscription": {
|
||||
"dbs": "bes_disc_params_contract",
|
||||
"label": L("bes_discipline_contract"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"cnt_disckey": {
|
||||
"contractdisciplines": {
|
||||
"dbs": "bes_disc_params_cnt_disckey",
|
||||
"label": L("bes_discipline_cnt_disckey"),
|
||||
"typ": "key",
|
||||
@@ -248,7 +248,7 @@ model_bes_disc_params =
|
||||
"desc": "ins_discipline_omschrijving"
|
||||
}
|
||||
},
|
||||
"cnt_termijn": {
|
||||
"contractperiod": {
|
||||
"dbs": "bes_disc_params_cnt_termijn",
|
||||
"label": L("bes_discipline_cnt_termijn"),
|
||||
"typ": "key",
|
||||
@@ -261,7 +261,7 @@ model_bes_disc_params =
|
||||
"desc": "cnt_termijn_omschrijving"
|
||||
}
|
||||
},
|
||||
"cnt_opzegterm": {
|
||||
"noticeperiod": {
|
||||
"dbs": "bes_disc_params_cnt_opzegterm",
|
||||
"label": L("bes_discipline_cnt_opzegterm"),
|
||||
"typ": "key",
|
||||
|
||||
@@ -101,7 +101,7 @@ _model_bes_discipline = // Internal only
|
||||
},
|
||||
"disc_params": {
|
||||
model: model_bes_disc_params,
|
||||
joinfield: "bes_ins_discipline_key"
|
||||
joinfield: "orderdiscipline"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
function model_bes_grootheid()
|
||||
{
|
||||
this.records_name = "units";
|
||||
this.record_name = "unit";
|
||||
this.records_name = "orderunits";
|
||||
this.record_name = "orderunit";
|
||||
this.table = "bes_grootheid";
|
||||
this.primary = "bes_grootheid_key";
|
||||
this.soft_delete = "bes_grootheid_verwijder";
|
||||
|
||||
@@ -35,7 +35,7 @@ function model_bes_kenmerk()
|
||||
"seq": "bes_s_bes_kenmerk_key",
|
||||
"defaultvalue": null
|
||||
},
|
||||
"orderdiscipline": {
|
||||
"orderdisciplinehide": {
|
||||
"dbs": "bes_srtinstallatie_key",
|
||||
"label": L("bes_ins_discipline_key"),
|
||||
"typ": "key",
|
||||
@@ -67,7 +67,7 @@ function model_bes_kenmerk()
|
||||
"LOVinit": "",
|
||||
"friendlyname": true
|
||||
},
|
||||
"articlecatalogue": {
|
||||
"orderdiscipline": {
|
||||
"dbs": "bes_kenmerkbestelregel.ins_discipline_key",
|
||||
"label": L("bes_ins_discipline_key"),
|
||||
"typ": "key",
|
||||
@@ -79,7 +79,7 @@ function model_bes_kenmerk()
|
||||
"desc": "ins_discipline_omschrijving"
|
||||
}
|
||||
},
|
||||
"articlegroup": {
|
||||
"orderarticlegroup": {
|
||||
"dbs": "bes_kenmerkbestelregel.bes_srtgroep_key",
|
||||
"label": L("bes_srtgroep"),
|
||||
"typ": "key",
|
||||
@@ -90,7 +90,7 @@ function model_bes_kenmerk()
|
||||
"desc": "bes_srtgroep_omschrijving"
|
||||
}
|
||||
},
|
||||
"article": {
|
||||
"orderarticle": {
|
||||
"dbs": "bes_kenmerkbestelregel.bes_srtdeel_key",
|
||||
"label": L("bes_srtdeel"),
|
||||
"typ": "key",
|
||||
@@ -143,7 +143,7 @@ function model_bes_kenmerk()
|
||||
"label": L("mgt_kenmerk_toonbaar"),
|
||||
"typ": "check"
|
||||
},
|
||||
"default": {
|
||||
"propertydefault": {
|
||||
"dbs": "bes_kenmerk_default",
|
||||
"label": L("mgt_kenmerk_default"),
|
||||
"typ": "memo",
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
function model_bes_srtgroep()
|
||||
{
|
||||
this.records_name = "bes_srtgroeps";
|
||||
this.record_name = "bes_srtgroep";
|
||||
this.records_name = "orderarticlegroups";
|
||||
this.record_name = "orderarticlegroup";
|
||||
this.table = "bes_srtgroep";
|
||||
this.primary = "bes_srtgroep_key";
|
||||
this.soft_delete = "bes_srtgroep_verwijder";
|
||||
@@ -61,7 +61,7 @@ function model_bes_srtgroep()
|
||||
"label": L("bes_srtgroep_volgnr"),
|
||||
"typ": "number"
|
||||
},
|
||||
"costcategory": {
|
||||
"costtype": {
|
||||
"dbs": "prs_kostensoort_key",
|
||||
"label": L("prs_kostensoort_key"),
|
||||
"typ": "key",
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
function model_bes_srtkenmerk()
|
||||
{
|
||||
this.records_name = "orderpropertytypes";
|
||||
this.record_name = "orderpropertytype";
|
||||
this.table = "bes_srtkenmerk";
|
||||
this.primary = "bes_srtkenmerk_key";
|
||||
this.records_name = "bes_srtkenmerks";
|
||||
this.record_name = "bes_srtkenmerk";
|
||||
this.soft_delete = "bes_srtkenmerk_verwijder";
|
||||
this.autfunction = "WEB_BESMGT";
|
||||
this.record_title = L("mgt_srtkenmerk");
|
||||
@@ -28,7 +28,7 @@ function model_bes_srtkenmerk()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "bes_srtkenmerk_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
@@ -42,7 +42,7 @@ function model_bes_srtkenmerk()
|
||||
"translate": true,
|
||||
"filter": "like"
|
||||
},
|
||||
"property_type": {
|
||||
"propertytype": {
|
||||
"dbs": "bes_srtkenmerk_kenmerktype",
|
||||
"label": L("mgt_srtkenmerk_kenmerktype"),
|
||||
"typ": "varchar",
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
function model_bes_srtprodgroep()
|
||||
{
|
||||
this.records_name = "orderproductgroeps";
|
||||
this.record_name = "orderproductgroep";
|
||||
this.table = "bes_srtgroep";
|
||||
this.primary = "bes_srtgroep_key";
|
||||
this.records_name = "bes_srtgroeps";
|
||||
this.record_name = "bes_srtgroep";
|
||||
this.autfunction = "WEB_PRDMSU";
|
||||
this.record_title = L("bes_srtgroep");
|
||||
this.records_title = L("bes_srtgroep_m");
|
||||
@@ -27,14 +27,14 @@ function model_bes_srtprodgroep()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "bes_srtgroep_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
"seq": "bes_s_bes_srtgroep_key",
|
||||
"defaultvalue": null
|
||||
},
|
||||
"catalogue": {
|
||||
"orderdisciplines": {
|
||||
"dbs": "ins_discipline_key",
|
||||
"label": L("bes_ins_discipline_key"),
|
||||
"typ": "key",
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
function model_bes_staffel()
|
||||
{
|
||||
this.records_name = "pacelists";
|
||||
this.record_name = "pacelist";
|
||||
this.table = "bes_staffel";
|
||||
this.primary = "bes_staffel_key";
|
||||
this.records_name = "bes_staffels";
|
||||
this.record_name = "bes_staffel";
|
||||
this.autfunction = "WEB_BESMGT";
|
||||
this.record_title = L("bes_staffel");
|
||||
this.records_title = L("bes_staffel_m");
|
||||
@@ -27,14 +27,14 @@ function model_bes_staffel()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "bes_staffel_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
"seq": "bes_s_bes_staffel_key",
|
||||
"defaultvalue": null
|
||||
},
|
||||
"bes_staffeltabel_key": {
|
||||
"pacelisttable": {
|
||||
"dbs": "bes_staffeltabel_key",
|
||||
"label": L("bes_staffeltabel"),
|
||||
"typ": "key",
|
||||
@@ -44,12 +44,12 @@ function model_bes_staffel()
|
||||
"desc": "bes_staffeltabel_naam"
|
||||
}
|
||||
},
|
||||
"bes_staffel_grenswaarde": {
|
||||
"limit": {
|
||||
"dbs": "bes_staffel_grenswaarde",
|
||||
"label": L("bes_staffel_grens"),
|
||||
"typ": "number"
|
||||
},
|
||||
"bes_staffel_korting": {
|
||||
"discount": {
|
||||
"dbs": "bes_staffel_korting",
|
||||
"label": L("bes_staffel_korting"),
|
||||
"typ": "number"
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
function model_bes_staffeltabel()
|
||||
{
|
||||
this.records_name = "pacelisttables";
|
||||
this.record_name = "pacelisttable";
|
||||
this.table = "bes_staffeltabel";
|
||||
this.primary = "bes_staffeltabel_key";
|
||||
this.records_name = "bes_staffeltabels";
|
||||
this.record_name = "bes_staffeltabel";
|
||||
this.autfunction = "WEB_BESMGT";
|
||||
this.record_title = L("bes_staffeltabel");
|
||||
this.records_title = L("bes_staffeltabel_m");
|
||||
@@ -28,20 +28,20 @@ function model_bes_staffeltabel()
|
||||
this.fields = {
|
||||
"id": {
|
||||
"dbs": "bes_staffeltabel_key",
|
||||
"label": "Key",
|
||||
"label": L("lcl_key"),
|
||||
"typ": "key",
|
||||
"required": true,
|
||||
"filter": "exact",
|
||||
"seq": "bes_s_bes_staffeltabel_key",
|
||||
"defaultvalue": null
|
||||
},
|
||||
"bes_staffeltabel_naam": {
|
||||
"name": {
|
||||
"dbs": "bes_staffeltabel_naam",
|
||||
"label": L("bes_staffeltabel_naam"),
|
||||
"typ": "varchar",
|
||||
"required": true
|
||||
},
|
||||
"fac_typestaffel_key": {
|
||||
"pacelisttype": {
|
||||
"dbs": "fac_typestaffel_key",
|
||||
"label": L("bes_staffeltabel_type"),
|
||||
"typ": "key",
|
||||
@@ -54,16 +54,16 @@ function model_bes_staffeltabel()
|
||||
"emptyoption": null,
|
||||
"filter": "exact"
|
||||
},
|
||||
"bes_staffeltabel_groep": {
|
||||
"group": {
|
||||
"dbs": "bes_staffeltabel_groep",
|
||||
"label": L("bes_staffeltabel_groep"),
|
||||
"typ": "check0"
|
||||
}
|
||||
};
|
||||
this.includes = {
|
||||
"bes_staffels": {
|
||||
"pacelists": {
|
||||
"model": new model_bes_staffel(),
|
||||
"joinfield": "bes_staffeltabel_key",
|
||||
"joinfield": "pacelisttable",
|
||||
"enable_update": true
|
||||
}
|
||||
};
|
||||
|
||||
@@ -8,9 +8,9 @@ function pre_submit()
|
||||
var validation_message = "";
|
||||
|
||||
var kto_perc = $("#satisfactionpercentage").val();
|
||||
var herfiat_perc = $("#herfiatpct").val();
|
||||
var herfiat_marge = $("#herfiatmarge").val();
|
||||
var herfiat = $("#herfiat").val();
|
||||
var herfiat_perc = $("#deviationpercentage").val();
|
||||
var herfiat_marge = $("#deviationamount").val();
|
||||
var herfiat = $("#mutationallowed").val();
|
||||
|
||||
if (kto_perc && ( (parseInt(kto_perc) > 100) || (parseInt(kto_perc) < 0) ))
|
||||
validation_message += L("mgt_validation_error_1").format(L("ins_discipline_ktopercentage")) + "\n";
|
||||
|
||||
@@ -10,8 +10,8 @@ this_model.hook_pre_edit = function (obj, fld)
|
||||
{
|
||||
if (obj.id == -1)
|
||||
{
|
||||
fld.article_group.foreign.where = "bes_srtgroep_key IS NULL";
|
||||
fld.article.foreign.where = "bes_srtdeel_key IS NULL"; // Geen artikelen ophalen: zijn er veel te veel.
|
||||
fld.orderarticlegroup.foreign.where = "bes_srtgroep_key IS NULL";
|
||||
fld.orderarticle.foreign.where = "bes_srtdeel_key IS NULL"; // Geen artikelen ophalen: zijn er veel te veel.
|
||||
}
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
@@ -24,14 +24,14 @@ this_model.hook_pre_post = function (params, jsondata)
|
||||
{
|
||||
var checkdata = { module: "bes",
|
||||
srtkenmerk: true,
|
||||
key: jsondata.property_key,
|
||||
value: jsondata.default
|
||||
key: jsondata.propertytype,
|
||||
value: jsondata.propertydefault
|
||||
};
|
||||
checkSrtkenmerkValue(checkdata);
|
||||
if (checkdata.err != "")
|
||||
abort_with_warning(checkdata.err);
|
||||
|
||||
jsondata.default = checkdata.value;
|
||||
jsondata.propertydefault = checkdata.value;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,19 +41,19 @@ scaffolding(this_model,
|
||||
"autosearch": true,
|
||||
"requires": { js: ["../mgt/bes_kenmerk.js"] },
|
||||
"filters": [
|
||||
"property_key",
|
||||
"article_catalogue"
|
||||
"propertytype",
|
||||
"orderdiscipline"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"id",
|
||||
"property_key",
|
||||
"propertytype",
|
||||
"sequence",
|
||||
"level",
|
||||
"article_catalogue",
|
||||
"article_group",
|
||||
"article",
|
||||
"orderdiscipline",
|
||||
"orderarticlegroup",
|
||||
"orderarticle",
|
||||
"required"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -4,11 +4,11 @@ $(document).ready(function () {
|
||||
|
||||
function init_srtinstallatie()
|
||||
{
|
||||
$("#article_catalogue").change(function() {change_article_catalogue(); });
|
||||
$("#article_group").change(function() {change_article_group(); });
|
||||
$("#orderdiscipline").change(function() {change_article_catalogue(); });
|
||||
$("#orderarticlegroup").change(function() {change_article_group(); });
|
||||
|
||||
|
||||
var srtinstallatie_key = $("#orderdiscipline").val();
|
||||
var srtinstallatie_key = $("#orderdisciplinehide").val();
|
||||
if (!srtinstallatie_key)
|
||||
{
|
||||
change_article_catalogue();
|
||||
@@ -16,14 +16,14 @@ function init_srtinstallatie()
|
||||
}
|
||||
else
|
||||
{
|
||||
var discipline_key = $("#articlecatalogue").val();
|
||||
var srtgroep_key = $("#articlegroup").val();
|
||||
var srtdeel_key = $("#article").val();
|
||||
var discipline_key = $("#orderdiscipline").val();
|
||||
var srtgroep_key = $("#orderarticlegroup").val();
|
||||
var srtdeel_key = $("#orderarticle").val();
|
||||
var niveau = $("#level").val();
|
||||
if (niveau == "D")
|
||||
{
|
||||
fill_srtgroep(discipline_key);
|
||||
$("#article").prop("disabled", true);
|
||||
$("#orderarticle").prop("disabled", true);
|
||||
}
|
||||
if (niveau == "G")
|
||||
{
|
||||
@@ -43,7 +43,7 @@ function change_article_catalogue(srtgroep_key)
|
||||
process_info({niveau:"G",lov:[]});
|
||||
process_info({niveau:"S",lov:[]});
|
||||
|
||||
var discipline_key = $("#articlecatalogue").val();
|
||||
var discipline_key = $("#orderdiscipline").val();
|
||||
fill_srtgroep(discipline_key);
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@ function change_article_group(srtdeel_key)
|
||||
{
|
||||
process_info({niveau:"S",lov:[]});
|
||||
|
||||
var discipline_key = $("#articlecatalogue").val();
|
||||
var srtgroep_key = $("#articlegroup").val();
|
||||
var discipline_key = $("#orderdiscipline").val();
|
||||
var srtgroep_key = $("#orderarticlegroup").val();
|
||||
fill_srtdeel(discipline_key, srtgroep_key);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ function fill_srtdeel(discipline_key, srtgroep_key, srtdeel_key)
|
||||
|
||||
function process_info(data)
|
||||
{
|
||||
var select = (data.niveau=="G" ? $("#articlegroup") : $("#article"));
|
||||
var select = (data.niveau=="G" ? $("#orderarticlegroup") : $("#orderarticle"));
|
||||
|
||||
var sel_key = -1;
|
||||
var new_lov = '<option value="-1" ></option>';
|
||||
@@ -113,26 +113,26 @@ function process_info(data)
|
||||
function pre_submit()
|
||||
{
|
||||
var bes_kenmerk_key = $("#id").val();
|
||||
var discipline_key = $("#articlecatalogue").val();
|
||||
var srtgroep_key = $("#articlegroup").val();
|
||||
var srtdeel_key = $("#article").val();
|
||||
var discipline_key = $("#orderdiscipline").val();
|
||||
var srtgroep_key = $("#orderarticlegroup").val();
|
||||
var srtdeel_key = $("#orderarticle").val();
|
||||
|
||||
if (bes_kenmerk_key)
|
||||
{
|
||||
if (srtdeel_key != -1)
|
||||
{
|
||||
$("#level").val("S");
|
||||
$("#orderdiscipline").val(srtdeel_key);
|
||||
$("#orderdisciplinehide").val(srtdeel_key);
|
||||
}
|
||||
else if (srtgroep_key != -1)
|
||||
{
|
||||
$("#level").val("G");
|
||||
$("#orderdiscipline").val(srtgroep_key);
|
||||
$("#orderdisciplinehide").val(srtgroep_key);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#level").val("D");
|
||||
$("#orderdiscipline").val(discipline_key);
|
||||
$("#orderdisciplinehide").val(discipline_key);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -19,13 +19,14 @@ this_model.hook_pre_post = function (params, jsondata)
|
||||
{
|
||||
var checkdata = { module: "bes",
|
||||
srtkenmerk: true,
|
||||
key: jsondata.property_key,
|
||||
value: jsondata.property_default};
|
||||
key: jsondata.propertytype,
|
||||
value: jsondata.default
|
||||
};
|
||||
checkSrtkenmerkValue(checkdata);
|
||||
if (checkdata.err != "")
|
||||
abort_with_warning(checkdata.err);
|
||||
|
||||
jsondata.property_default = checkdata.value;
|
||||
jsondata.default = checkdata.value;
|
||||
}
|
||||
|
||||
scaffolding(this_model,
|
||||
@@ -33,17 +34,17 @@ scaffolding(this_model,
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"property_key",
|
||||
"catalogue"
|
||||
"propertytype",
|
||||
"orderdiscipline"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"id",
|
||||
"catalogue",
|
||||
"property_key",
|
||||
"orderdiscipline",
|
||||
"propertytype",
|
||||
"sequence",
|
||||
"property_required"
|
||||
"required"
|
||||
]
|
||||
},
|
||||
"edit": {},
|
||||
|
||||
@@ -11,14 +11,14 @@ scaffolding(this_model,
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"catalogue",
|
||||
"orderdisciplines",
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"id",
|
||||
"catalogue",
|
||||
"orderdisciplines",
|
||||
"name",
|
||||
"sequence"
|
||||
]
|
||||
|
||||
@@ -9,8 +9,8 @@ var this_model = new model_bes_srtkenmerk();
|
||||
|
||||
this_model.hook_pre_edit = function (obj, fld)
|
||||
{
|
||||
var kenmerktype = (obj.property_type ? obj.property_type.id : "");
|
||||
fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
|
||||
var kenmerktype = (obj.propertytype ? obj.propertytype.id : "");
|
||||
fld.propertytype.LOV = buildKenmerktypeLOV(kenmerktype);
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
var module = "BES";
|
||||
@@ -24,7 +24,7 @@ scaffolding(this_model,
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"property_type",
|
||||
"propertytype",
|
||||
"name"
|
||||
]
|
||||
},
|
||||
@@ -32,7 +32,7 @@ scaffolding(this_model,
|
||||
"columns": [
|
||||
"id",
|
||||
"name",
|
||||
"property_type"
|
||||
"propertytype"
|
||||
]
|
||||
},
|
||||
"edit": {
|
||||
|
||||
@@ -11,13 +11,13 @@ scaffolding(this_model,
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"catalogue"
|
||||
"orderdisciplines"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"id",
|
||||
"catalogue",
|
||||
"orderdisciplines",
|
||||
"name"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
<%
|
||||
var this_model = new model_bes_staffeltabel();
|
||||
|
||||
var incl_staffel = this_model.includes.bes_staffels.model;
|
||||
var incl_staffel = this_model.includes.pacelists.model;
|
||||
incl_staffel.list = {
|
||||
"columns": [
|
||||
"id",
|
||||
"bes_staffeltabel_key",
|
||||
"bes_staffel_grenswaarde",
|
||||
"bes_staffel_korting"
|
||||
"pacelisttable",
|
||||
"limit",
|
||||
"discount"
|
||||
]
|
||||
};
|
||||
incl_staffel.edit = {
|
||||
@@ -23,16 +23,16 @@ scaffolding(this_model,
|
||||
"search": {
|
||||
"autosearch": true,
|
||||
"filters": [
|
||||
"bes_staffeltabel_naam",
|
||||
"fac_typestaffel_key"
|
||||
"name",
|
||||
"pacelisttype"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"columns": [
|
||||
"id",
|
||||
"bes_staffeltabel_naam",
|
||||
"fac_typestaffel_key",
|
||||
"fac_typestaffel_groep"
|
||||
"name",
|
||||
"pacelisttype",
|
||||
"group"
|
||||
]
|
||||
},
|
||||
"edit":{
|
||||
|
||||
@@ -4,7 +4,7 @@ function pre_submit()
|
||||
// var property_type: voor nieuw kenmerk uit formfield "property_type".
|
||||
// voor bestaand kenmerk indien a) wijzigbaar: uit formfield "property_type"
|
||||
// b) niet wijzigbaar: gezet in xxx_kenmerk.asp
|
||||
var propertyType = ($("#property_type").length == 0? property_type : $("#property_type").val() );
|
||||
var propertyType = ($("#propertytype").length == 0? property_type : $("#propertytype").val() );
|
||||
|
||||
var validation_message = "";
|
||||
if (propertyType == "C" && $("#length").val() == "")
|
||||
|
||||
Reference in New Issue
Block a user