FSN#35338 Alle CodeCharge schermen herschrijven naar gewoon ASP II

svn path=/Website/trunk/; revision=28297
This commit is contained in:
Erik Groener
2016-02-25 11:23:40 +00:00
parent f47677b5ae
commit 0387fa9792
10 changed files with 711 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
<% /*
$Revision$
$Id$
File: model_bes_disc_params.inc
Description: Vanuit CodeCharge gegenereerd model voor cnt_discipline
Context:
Notes: *uitsluitend* gebruikt als include van model_cnt_discipline
*/
%>
<%
model_cnt_disc_params =
{
"table": "cnt_disc_params",
"primary": "cnt_disc_params_key",
"records_name": "cnt_disc_params",
"record_name": "cnt_disc_params",
"autfunction": "WEB_CNTMGT",
"fields": {
"id": {
"dbs": "cnt_disc_params_key",
"label": "Key",
"typ": "key",
"seq": "cnt_s_cnt_disc_params_key"
},
"cnt_ins_discipline_key": {
"dbs": "cnt_ins_discipline_key",
"label": "Foreign key",
"typ": "key",
"hidden_fld": true
},
"invoice_type": {
"dbs": "cnt_srtcontract_type",
"label": L("cnt_discipline_cnt_disckey"),
"typ": "key",
"insertonly": true,
"foreign": {
"tbl": "cnt_typecontract",
"key": "cnt_typecontract_key",
"desc": "cnt_typecontract_omschrijving"
}
},
"percentage": {
"dbs": "cnt_disc_params_factuurpct",
"label": L("cnt_discipline_factuurpct"),
"typ": "number"
},
"margin": {
"dbs": "cnt_disc_params_factuurmarge",
"label": L("cnt_discipline_factuurmarge"),
"typ": "float"
},
"approve": {
"dbs": "cnt_disc_params_factuurappr",
"label": L("cnt_discipline_factuurappr"),
"typ": "check0"
},
"limit": {
"dbs": "cnt_disc_params_factuurgrens",
"label": L("cnt_discipline_factuurgrens"),
"typ": "number"
},
//"period": {
// "dbs": "cnt_disc_params_termijndefault",
// "label": L("cnt_discipline_termijn"),
// "typ": "number"
//},
"remark": {
"dbs": "cnt_disc_params_opmerking",
"label": L("cnt_discipline_opmerking"),
"typ": "memo"
}
}
}
api2.generic_REST(model_cnt_disc_params);
%>

View File

@@ -0,0 +1,90 @@
<% /*
$Revision$
$Id$
File: model_cnt_discipline.inc
Description: Vanuit CodeCharge gegenereerd model voor cnt_discipline
Context:
Notes:
*/
%>
<!-- #include file="../api2/model_cnt_disc_params.inc" -->
<%
function model_cnt_discipline(disc_key, params)
{
// E<>n model voor de buitenwereld
api2.merge_disc_params_model(this, _model_cnt_discipline);
this.REST_GET = generic_REST_GET(_model_cnt_discipline, // Let op: de originele _model_cnt_discipline
{ "GET": {
wheres: [ "ins_tab_discipline.ins_discipline_module = 'CNT'"
]
}
}
);
this.REST_POST = generic_REST_POST(_model_cnt_discipline);
this.REST_PUT = generic_REST_PUT(_model_cnt_discipline);
this.REST_DELETE = generic_REST_DELETE(this, {});
}
_model_cnt_discipline = // Internal only
{
"table": "ins_tab_discipline",
"primary": "ins_discipline_key",
"records_name":"cnt_disciplines",
"record_name": "cnt_discipline",
"soft_delete": "ins_discipline_verwijder",
"autfunction": "WEB_CNTMGT",
"record_title": L("cnt_discipline"),
"records_title": L("cnt_discipline_m"),
"fields": {
"id": {
"dbs": "ins_discipline_key",
"label": "Key",
"typ": "key",
"required": true,
"filter": "exact",
"seq": "ins_s_ins_discipline_key"
},
"name": {
"dbs": "ins_discipline_omschrijving",
"label": L("ins_discipline_omschrijving"),
"typ": "varchar",
"filter": "like",
"translate": true,
"required": true
},
"ins_discipline_module": {
"dbs": "ins_discipline_module",
"label": L("ins_discipline_module"),
"typ": "varchar",
"hidden_fld": true,
"defaultvalue": "CNT"
},
"costtype": {
"dbs": "prs_kostensoort_key",
"label": L("prs_kostensoort_key"),
"typ": "key",
"foreign": "prs_kostensoort",
"LOVinit": ""
},
"email": {
"dbs": "ins_discipline_email",
"label": L("ins_discipline_email"),
"typ": "varchar"
}
/* Velden van CNT_DISC_PARAMS komen er dynamisch bij */
},
"disc_params": {
"model": model_cnt_disc_params,
"joinfield": "cnt_ins_discipline_key"
}
}
%>

View File

@@ -0,0 +1,161 @@
<% /*
$Revision$
$Id$
File: model_cnt_kenmerk.inc
Description: Vanuit CodeCharge gegenereerd model voor cnt_kenmerk
Context:
Notes:
*/
%>
<%
function model_cnt_kenmerk()
{
this.table = "cnt_kenmerk";
this.primary = "cnt_kenmerk_key";
this.records_name = "cnt_kenmerks";
this.record_name = "cnt_kenmerk";
this.soft_delete = "cnt_kenmerk_verwijder";
this.autfunction = "WEB_CNTMGT";
this.record_title = L("cnt_kenmerk");
this.records_title = L("cnt_kenmerk_m");
this.fields = {
"id": {
"dbs": "cnt_kenmerk_key",
"label": "Key",
"typ": "key",
"required": true,
"filter": "exact",
"seq": "cnt_s_cnt_kenmerk_key",
"readonly": true
},
"property_key": {
"dbs": "cnt_srtkenmerk_key",
"label": L("mgt_srtkenmerk_key"),
"typ": "key",
"required": true,
"foreign": {
"tbl": "(select cnt_srtkenmerk_key"
+ " , cnt_srtkenmerk_omschrijving"
+ " from cnt_srtkenmerk"
+ " where cnt_srtkenmerk_verwijder is null"
+ " order by cnt_srtkenmerk_upper asc)",
"key": "cnt_srtkenmerk_key",
"desc": "cnt_srtkenmerk_omschrijving"
},
"filter": "exact",
"defaultvalue": null,
"LOVinit": ""
},
"property_type": {
"dbs": "cnt_srtkenmerk.cnt_srtkenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
"hidden_fld": true,
"LOV": buildKenmerktypeLOV(),
"filter": "exact"
},
"contract_type": {
"dbs": "cnt_srtcontract_key",
"label": L("cnt_srtcontract_key"),
"typ": "key",
"required": true,
"foreign": {
"tbl": "(select ins_discipline_key"
+ " , ins_discipline_omschrijving"
+ " from cnt_discipline"
+ " where ins_discipline_verwijder is null"
+ " order by ins_discipline_omschrijving asc)",
"key": "ins_discipline_key",
"desc": "ins_discipline_omschrijving"
},
"filter": "exact",
"LOVinit": ""
},
"cnt_kenmerk_niveau": {
"dbs": "cnt_kenmerk_niveau",
"label": L("mgt_kenmerk_niveau"),
"typ": "varchar",
"hidden_fld": true,
"defaultvalue": "S",
"LOV": fill_cnt_niveau_LOV(),
"defaultvalue": "D"
},
"sequence": {
"dbs": "cnt_kenmerk_volgnummer",
"label": L("mgt_kenmerk_volgnummer"),
"typ": "number",
"required": true
},
"cnt_kenmerk_locatiekolom": {
"dbs": "cnt_kenmerk_locatiekolom",
"label": L("ins_kenmerk_locatiekolom"),
"typ": "varchar",
"hidden_fld": true
},
"required": {
"dbs": "cnt_kenmerk_verplicht",
"label": L("mgt_kenmerk_verplicht"),
"typ": "key",
"LOV": buildVerplichtingList(),
"emptyoption": null
},
"property_group": {
"dbs": "cnt_kenmerk_groep",
"label": L("mgt_kenmerk_groep"),
"typ": "key",
"required": true,
"LOV": buildGroepsverplichtingList(),
"defaultvalue": "0"
},
"readonly": {
"dbs": "cnt_kenmerk_toonbaar",
"label": L("mgt_kenmerk_toonbaar"),
"typ": "check"
},
"default": {
"dbs": "cnt_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
"translate": true
},
"hint": {
"dbs": "cnt_kenmerk_hint",
"label": L("mgt_kenmerk_hint"),
"typ": "memo",
"translate": true
},
"regexp": {
"dbs": "cnt_kenmerk_regexp",
"label": L("mgt_kenmerk_regexp"),
"typ": "varchar"
}
};
this.REST_GET = generic_REST_GET(this, {
"GET": {
"tables": [ "cnt_srtkenmerk"],
"wheres": [ "cnt_srtkenmerk.cnt_srtkenmerk_key = cnt_kenmerk.cnt_srtkenmerk_key",
"cnt_srtkenmerk.cnt_srtkenmerk_verwijder IS NULL" ]
}
});
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this);
function fill_cnt_niveau_LOV()
{
return "D;"+L("cnt_niveau_discipline")
+ ";S;"+L("cnt_niveau_herkenning");
}
}
%>

View File

@@ -0,0 +1,100 @@
<% /*
$Revision$
$Id$
File: model_cnt_srtkenmerk.inc
Description: Vanuit CodeCharge gegenereerd model voor cnt_srtkenmerk
Context:
Notes:
*/
%>
<%
function model_cnt_srtkenmerk()
{
this.table = "cnt_srtkenmerk";
this.primary = "cnt_srtkenmerk_key";
this.records_name = "cnt_srtkenmerks";
this.record_name = "cnt_srtkenmerk";
this.soft_delete = "cnt_srtkenmerk_verwijder";
this.autfunction = "WEB_CNTMGT";
this.record_title = L("cnt_srtkenmerk");
this.records_title = L("cnt_srtkenmerk_m");
this.fields = {
"id": {
"dbs": "cnt_srtkenmerk_key",
"label": "Key",
"typ": "key",
"required": true,
"filter": "exact",
"seq": "cnt_s_cnt_srtkenmerk_key"
},
"name": {
"dbs": "cnt_srtkenmerk_omschrijving",
"label": L("mgt_srtkenmerk_omschrijving"),
"typ": "varchar",
"translate": true,
"required": true,
"filter": "like"
},
"property_type": {
"dbs": "cnt_srtkenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
"required": true,
"LOV": buildKenmerktypeLOV(),
"filter": "exact"
},
"unit": {
"dbs": "cnt_srtkenmerk_dimensie",
"label": L("mgt_srtkenmerk_dimensie"),
"typ": "varchar",
"translate": true
},
"system": {
"dbs": "cnt_srtkenmerk_systeem",
"label": L("mgt_srtkenmerk_systeem"),
"typ": "check"
},
"length": {
"dbs": "cnt_srtkenmerk_lengte",
"label": L("mgt_srtkenmerk_lengte"),
"typ": "number"
},
"decimals": {
"dbs": "cnt_srtkenmerk_dec",
"label": L("mgt_srtkenmerk_dec"),
"typ": "number"
},
"minimum": {
"dbs": "cnt_srtkenmerk_nmin",
"label": L("mgt_srtkenmerk_nmin"),
"typ": "number"
},
"maximum": {
"dbs": "cnt_srtkenmerk_nmax",
"label": L("mgt_srtkenmerk_nmax"),
"typ": "number"
},
"domain": {
"dbs": "fac_kenmerkdomein_key",
"label": L("mgt_kenmerkdomein_key"),
"typ": "key",
"foreign": fac_kenmerkdomein_foreign("CNT"),
"filter": "exact",
"LOVinit": ""
}
};
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this);
}
%>

View File

@@ -0,0 +1,66 @@
<% /*
$Revision$
$Id$
File: model_cnt_termijn.inc
Description: Vanuit CodeCharge gegenereerd model voor cnt_termijn
Context:
Notes:
*/
%>
<%
function model_cnt_termijn()
{
this.table = "cnt_termijn";
this.primary = "cnt_termijn_key";
this.records_name = "cnt_termijns";
this.record_name = "cnt_termijn";
this.autfunction = "WEB_CNTMGT";
this.record_title = L("cnt_termijn");
this.records_title = L("cnt_termijn_m");
this.fields = {
"id": {
"dbs": "cnt_termijn_key",
"label": "Key",
"typ": "key",
"required": true,
"filter": "exact",
"seq": "cnt_s_cnt_termijn_key"
},
"name": {
"dbs": "cnt_termijn_omschrijving",
"label": L("cnt_termijn_omschrijving"),
"typ": "varchar",
"translate": true,
"filter" : "like"
},
"type": {
"dbs": "cnt_termijn_type",
"label": L("cnt_termijn_type"),
"typ": "varchar",
"LOV": L("cnt_termijn_typeLOV")
},
"number": {
"dbs": "cnt_termijn_aantal",
"label": L("cnt_termijn_aantal"),
"typ": "number"
},
"sequence": {
"dbs": "cnt_termijn_volgnummer",
"label": L("cnt_termijn_volgnummer"),
"typ": "number"
}
};
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this);
}
%>

View File

@@ -0,0 +1,40 @@
<%@language = "javascript" %>
<% /*
$Revision$
$Id$
File: cnt_discipline.asp
Description: fac_management aanroep van model_cnt_discipline
Context:
Notes:
*/
%>
<!-- #include file="../scf/scaffolding.inc" -->
<!-- #include file="../api2/model_cnt_discipline.inc" -->
<%
var this_model = new model_cnt_discipline();
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
"name"
]
},
"list": {
"columns": [
"name",
"costtype"
]
},
"edit": {
"requires": {
js: ["./cnt_discipline.js"]
}
}
});
%>

View File

@@ -0,0 +1,27 @@
/*
$Revision$
$Id$
*/
function pre_submit()
{
var validation_message = "";
var cnt_perc = $("#percentage").val();
var cnt_marge = $("#margin").val();
var cnt_fiat = $("#approve").prop("checked");
if (cnt_perc && ( (parseInt(cnt_perc) > 100) || (parseInt(cnt_perc) < 0) ))
validation_message += L("mgt_validation_error_1").format(L("cnt_discipline_factuurpct")) + "\n";
if (cnt_fiat && (!cnt_perc && !cnt_marge))
validation_message += L("mgt_validation_error_2").format(L("cnt_discipline_factuurpct"), L("cnt_discipline_factuurmarge")) + "\n";
if (validation_message != "")
{
alert(validation_message);
return false;
}
return true;
}

51
APPL/MGT/cnt_kenmerk.asp Normal file
View File

@@ -0,0 +1,51 @@
<%@language = "javascript" %>
<% /*
$Revision$
$Id$
File: cnt_kenmerk.asp
Description: fac_management aanroep van model_cnt_kenmerk
Context:
Notes:
*/
%>
<!-- #include file="../scf/scaffolding.inc" -->
<!-- #include file="../mgt/mgt_tools.inc" -->
<!-- #include file="../api2/model_cnt_kenmerk.inc" -->
<%
var this_model = new model_cnt_kenmerk();
this_model.hook_pre_edit = function (obj, fld)
{
%>
<script type="text/javascript">
var module = "CNT";
</script>
<%
}
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
"property_key",
"contract_type",
"property_type"
]
},
"list": {
"columns": [
"id",
"contract_type",
"property_key",
"sequence",
"property_type"
]
},
"print": {}
});
%>

View File

@@ -0,0 +1,56 @@
<%@language = "javascript" %>
<% /*
$Revision$
$Id$
File: cnt_srtkenmerk.asp
Description: fac_management aanroep van model_cnt_srtkenmerk
Context:
Notes:
*/
%>
<!-- #include file="../scf/scaffolding.inc" -->
<!-- #include file="../mgt/mgt_tools.inc" -->
<!-- #include file="../api2/model_cnt_srtkenmerk.inc" -->
<%
var this_model = new model_cnt_srtkenmerk();
this_model.hook_pre_edit = function (obj, fld)
{
var kenmerktype = (obj.property_type ? obj.property_type.id : "");
fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
%>
<script type="text/javascript">
var module = "CNT";
var property_type = "<%=kenmerktype%>";
</script>
<%
}
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
"property_type",
"name"
]
},
"list": {
"columns": [
"id",
"name",
"property_type"
]
},
"edit": {
"requires": {
js: ["./mgt_srtkenmerk.js"]
}
},
"print": {}
});
%>

38
APPL/MGT/cnt_termijn.asp Normal file
View File

@@ -0,0 +1,38 @@
<%@language = "javascript" %>
<% /*
$Revision$
$Id$
File: cnt_termijn.asp
Description: fac_management aanroep van model_cnt_termijn
Context:
Notes:
*/
%>
<!-- #include file="../scf/scaffolding.inc" -->
<!-- #include file="../api2/model_cnt_termijn.inc" -->
<%
var this_model = new model_cnt_termijn();
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
"name"
]
},
"list": {
"columns": [
"id",
"name",
"type",
"number",
"sequence"
]
}
});
%>