Files
Facilitor/APPL/API2/model_ins_srtcontrole.inc
Erik Groener 868ce33c74 FSN#33941 Alle CodeCharge schermen herschrijven naar gewoon ASP II
svn path=/Website/trunk/; revision=27345
2015-12-09 09:39:42 +00:00

183 lines
5.8 KiB
PHP

<% /*
$Revision$
$Id$
File: model_ins_srtcontrole.inc
Description: Vanuit CodeCharge gegenereerd model voor ins_srtcontrole
Context:
Notes:
*/
%>
<!-- #include file="./model_ins_kenmerk.inc"-->
<!-- #include file="../mgt/mgt_tools.inc" -->
<%
function model_ins_srtcontrole()
{
this.table = "ins_srtcontrole";
this.primary = "ins_srtcontrole_key";
this.records_name = "ins_srtcontroles";
this.record_name = "ins_srtcontrole";
this.autfunction = "WEB_INSMGT";
this.record_title = L("ins_srtcontrole");
this.records_title = L("ins_srtcontrole_m");
this.fields = {
"id": {
"dbs": "ins_srtcontrole_key",
"label": "Key",
"typ": "key",
"required": true,
"filter": "exact",
"seq": "ins_s_ins_srtcontrole_key"
},
"level": {
"dbs": "ins_srtcontrole_niveau",
"label": L("ins_srtcontrole_niveau"),
"typ": "varchar",
"hidden_fld": true,
"LOV": fill_niveau_LOV()
},
"object_key": {
"dbs": "ins_srtinstallatie_key",
"label": "ins_srtinstallatie_key",
"typ": "key",
"hidden_fld": true
},
"object_discipline": {
"dbs": "ins_v_allsrtinstallatie.ins_discipline_key",
"label": L("ins_srtinstallatie_discipline"),
"typ": "key",
"required": true,
"foreign": { "tbl": "ins_discipline",
"key": "ins_discipline_key",
"desc": "ins_discipline_omschrijving"
}
},
"object_group": {
"dbs": "ins_v_allsrtinstallatie.ins_srtgroep_key",
"label": L("ins_srtinstallatie_srtgroep"),
"typ": "key",
"foreign": { "tbl": "ins_srtgroep",
"key": "ins_srtgroep_key",
"desc": "ins_srtgroep_omschrijving"
}
},
"object_type": {
"dbs": "ins_v_allsrtinstallatie.ins_srtdeel_key",
"label": L("ins_srtinstallatie_srtdeel"),
"typ": "key",
"foreign": { "tbl": "ins_srtdeel",
"key": "ins_srtdeel_key",
"desc": "ins_srtdeel_omschrijving"
}
},
"name": {
"dbs": "ins_srtcontrole_omschrijving",
"label": L("ins_srtcontrole_omschrijving"),
"typ": "varchar",
"required": true,
"translate": true
},
"info": {
"dbs": "ins_srtcontrole_info",
"label": L("ins_srtcontrole_info"),
"typ": "memo",
"translate": true
},
"inspection_type": {
"dbs": "ins_srtcontrole_type",
"label": L("ins_srtcontrole_type"),
"typ": "key",
"required": true,
"LOV": buildSrtcontroletypeList()
},
"inspection_mode": {
"dbs": "ins_srtcontrole_mode",
"label": L("ins_srtcontrole_mode"),
"typ": "key",
"required": true,
"LOV": L("ins_srtcontrole_modeLOV")
},
"period": {
"dbs": "ins_srtcontrole_periode",
"label": L("ins_srtcontrole_periode"),
"typ": "float",
"required": true
},
"unit": {
"dbs": "ins_srtcontrole_eenheid",
"label": L("ins_srtcontrole_eenheid"),
"typ": "key",
"required": true,
"LOV": L("ins_srtcontrole_eenheidLOV")
},
"bits": {
"dbs": "ins_srtcontrole_bits",
"label": L("ins_srtcontrole_bits"),
"typ": "number",
"hidden_fld": true
},
"_moment": {
"dbs": "",
"label": L("ins_srtcontrole_moment"),
"typ": "button",
"defaultvalue": L("lcl_select")
},
"end_date": {
"dbs": "ins_srtcontrole_eind",
"label": L("ins_srtcontrole_eind"),
"typ": "date"
},
"inspection_group": {
"dbs": "ins_srtcontrole_groep",
"label": L("ins_srtcontrole_groep"),
"typ": "varchar"
},
"costs": {
"dbs": "ins_srtcontrole_kosten",
"label": L("ins_srtcontrole_kosten"),
"typ": "float"
},
"remark": {
"dbs": "ins_srtcontrole_opmerking",
"label": L("ins_srtcontrole_opmerking"),
"typ": "memo"
}
};
this.includes = {
"kenmerken": {
"model": new model_ins_kenmerk( {niveau:"C"} ),
"joinfield": "object_key",
"enable_update": true
}
};
this.REST_GET = generic_REST_GET(this, {
"GET": {
"tables": ["ins_v_allsrtinstallatie"],
"wheres": [
"ins_srtcontrole.ins_srtinstallatie_key = ins_v_allsrtinstallatie.ins_srtinstallatie_key",
"ins_srtcontrole.ins_srtcontrole_niveau = ins_v_allsrtinstallatie.niveau"
]
} }
);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this, {});
function fill_niveau_LOV()
{
return "D;"+L("ins_srtinstallatie_discipline")
+ ";G;"+L("ins_srtinstallatie_srtgroep")
+ ";S;"+L("ins_srtinstallatie_srtdeel");
}
}
%>