diff --git a/APPL/API2/model_mld_disc_params.inc b/APPL/API2/model_mld_disc_params.inc index 7d8f1fb7d9..bd0f822c9b 100644 --- a/APPL/API2/model_mld_disc_params.inc +++ b/APPL/API2/model_mld_disc_params.inc @@ -14,79 +14,186 @@ <% model_mld_disc_params = { - "table": "mld_disc_params", - "primary": "mld_disc_params_key", - "records_name": "mld_disc_params", - "record_name": "mld_disc_params", - "fields": { - "id": { - "dbs": "mld_disc_params_key", - "label": "Key", - "typ": "key", - "seq": "res_s_mld_disc_params_key" - }, - "mld_ins_discipline_key": { - "dbs": "mld_ins_discipline_key", - "label": "Foreign key", - "typ": "key", - "hidden_fld": true - }, - "mld_disc_params_preposttime": { - "dbs": "mld_disc_params_preposttime", - "label": L("res_catalogus_preposttime"), - "typ": "float", - "defaultvalue": 0, - required: true - }, - "mld_disc_params_notify": { - "dbs": "mld_disc_params_notify", - "label": L("res_catalogus_notify"), - "typ": "check" - }, - "mld_disc_params_kosten": { - "dbs": "mld_disc_params_kosten", - "label": L("res_catalogus_kosten"), - "defaultvalue": 100, - "typ": "number" - }, - "mld_disc_params_noti_dagen": { - "dbs": "mld_disc_params_noti_dagen", - "label": L("res_catalogus_noti_dagen"), - "typ": "number" - }, - "mld_disc_params_expire_dagen": { - "dbs": "mld_disc_params_expire_dagen", - "label": L("res_catalogus_expire_dagen"), - "typ": "number", - "defaultvalue": 1, - "required": true - }, - "mld_disc_params_expire_tijd": { - "dbs": "mld_disc_params_expire_tijd", - "label": L("res_catalogus_expire_tijd"), - "typ": "float", - "LOV": api2.getTimetable() // TODO timepicker? - }, - "mld_disc_params_cancel_dagen": { - "dbs": "mld_disc_params_cancel_dagen", - "label": L("res_catalogus_cancel_dagen"), - "typ": "number" - }, - "mld_disc_params_remoteurl": { - "dbs": "mld_disc_params_remoteurl", - "label": L("res_catalogus_remoteurl"), - "typ": "varchar" - }, - "mld_disc_params_maxduur": { - "dbs": "mld_disc_params_maxduur", - "label": L("res_catalogus_maxduur"), - "typ": "number", - "defaultvalue": 0, - "required": true - } - }, + "table": "mld_disc_params", + "primary": "mld_disc_params_key", + "records_name": "mld_disc_params", + "record_name": "mld_disc_params", + "autfunction": "WEB_PRSSYS", - "autfunction": "WEB_PRSSYS" + + "fields": { + "id": { + "dbs": "mld_disc_params_key", + "label": "Key", + "typ": "key", + "seq": "res_s_mld_disc_params_key" + }, + "mld_ins_discipline_key": { + "dbs": "mld_ins_discipline_key", + "label": "Foreign key", + "typ": "key", + "hidden_fld": true + }, + "treatmentgroup": { + "dbs": "mld_behandelgroep_key", + "label": L("mld_behandelgroep"), + "typ": "key", + "foreign": { + "tbl": "mld_behandelgroep", + "key": "mld_behandelgroep_key", + "desc": "mld_behandelgroep_naam" + }, + "filter": "exact" + }, + "orderlimiet1": { + "dbs": "mld_disc_params_bestellimiet", + "label": L("mld_discipline_bestellimiet1"), + "typ": "float" + }, + "orderlimiet2": { + "dbs": "mld_disc_params_bestellimiet2", + "label": L("mld_discipline_bestellimiet2"), + "typ": "float" + }, + "orderlimiet3": { + "dbs": "mld_disc_params_bestellimiet3", + "label": L("mld_discipline_bestellimiet3"), + "typ": "float" + }, + "orderlimiet4": { + "dbs": "mld_disc_params_bestellimiet4", + "label": L("mld_discipline_bestellimiet4"), + "typ": "float" + }, + "orderlimiet5": { + "dbs": "mld_disc_params_bestellimiet5", + "label": L("mld_discipline_bestellimiet5"), + "typ": "float" + }, + "chargebudget": { + "dbs": "mld_disc_params_pgb", + "label": L("mld_discipline_pgb"), + "typ": "number", + "LOV": L("mld_discipline_pgbLOV"), + "emptyoption": null + }, + "adjuststartdate": { + "dbs": "mld_disc_params_startdatum", + "label": L("mld_discipline_startdatum"), + "typ": "check" + }, + "foprocess": { + "dbs": "mld_disc_params_directklaar", + "label": L("mld_discipline_fo_process"), + "typ": "number", + "LOV": L("mld_discipline_fo_processLOV"), + "emptyoption": null + }, + "forward": { + "dbs": "mld_disc_params_keten", + "label": L("mld_discipline_forward"), + "typ": "check" + }, + "mld_disc_params_frontendprio": { + "dbs": "mld_disc_params_frontendprio", + "label": "mld_discipline_setprio", + "typ": "check" + }, + "owncost": { + "dbs": "mld_disc_params_eigen_kp", + "label": L("mld_discipline_eigenkp"), + "typ": "check" + }, + "invoicemarginpct": { + "dbs": "mld_disc_params_factuurpct", + "label": L("mld_discipline_marginpct"), + "typ": "number", + "defaultvalue": 0 + }, + "invoicemargin": { + "dbs": "mld_disc_params_factuurmarge", + "label": L("mld_discipline_margin"), + "typ": "float", + "defaultvalue": 0 + }, + "invoicematchmode": { + "dbs": "mld_disc_params_factmatchmode", + "label": L("mld_discipline_match"), + "typ": "number", + "LOV": L("mld_discipline_matchLOV"), + "emptyoption": null + }, + "invoiceapprove": { + "dbs": "mld_disc_params_factuurappr", + "label": L("mld_discipline_autofiat"), + "typ": "check" + }, + "invoicebelow": { + "dbs": "mld_disc_params_factuurgrens", + "label": L("mld_discipline_belowfiat"), + "typ": "number" + }, + "notifybo": { + "dbs": "mld_disc_params_bonotify", + "label": L("mld_discipline_bonotify"), + "typ": "number", + "LOV": L("mld_discipline_bonotifyLOV"), + "emptyoption": null + }, + "notifybe": { + "dbs": "mld_disc_params_benotify", + "label": L("mld_discipline_benotify"), + "typ": "check0" + }, + "notifycust": { + "dbs": "mld_disc_params_notify", + "label": L("mld_discipline_custnotify"), + "typ": "number", + "LOV": L("mld_discipline_custnotifyLOV"), + "emptyoption": null + }, + "reminderdays": { + "dbs": "mld_disc_params_noti_dagen", + "label": L("mld_discipline_noti_dagen"), + "typ": "number" + }, + "mandatoryfrom": { + "dbs": "mld_disc_params_opdr_kosten", + "label": L("mld_discipline_opdr_kosten"), + "typ": "number", + "LOV": L("mld_discipline_opdr_kostenLOV"), + "emptyoption": null + }, + "activity": { + "dbs": "fac_activiteit_key", + "label": L("mld_discipline_activiteit"), + "typ": "key", + "foreign": { + "tbl": "fac_activiteit", + "key": "fac_activiteit_key", + "desc": "fac_activiteit_omschrijving" + } + }, + "autooffer": { + "dbs": "mld_disc_params_offerteauto", + "label": L("mld_discipline_autoofferte"), + "typ": "check", + "defaultvalue": 1 + }, + "fenotes": { + "dbs": "mld_disc_params_fenotes", + "label": L("mld_discipline_interactfe"), + "typ": "number", + "LOV": L("mld_discipline_interactfeLOV"), + "defaultvalue": 0, + "emptyoption": null + }, + "offhours": { + "dbs": "mld_disc_params_offhours", + "label": L("mld_discipline_offhours"), + "typ": "check" + } + } } api2.generic_REST(model_mld_disc_params); diff --git a/APPL/API2/model_mld_discipline.inc b/APPL/API2/model_mld_discipline.inc index 997dbb64cc..b260d290b2 100644 --- a/APPL/API2/model_mld_discipline.inc +++ b/APPL/API2/model_mld_discipline.inc @@ -33,162 +33,85 @@ function model_mld_discipline(disc_key, params) _model_mld_discipline = // Internal only { - "table": "ins_tab_discipline", - "primary": "ins_discipline_key", - "records_name": "issuedisciplines", - "record_name": "issuediscipline", - "fields": { - "id": { - "dbs": "ins_discipline_key", - "label": "Key", - "typ": "key", - "filter": "exact", - "seq": "ins_s_ins_discipline_key" + "table": "ins_tab_discipline", + "primary": "ins_discipline_key", + "records_name": "issuedisciplines", + "record_name": "issuediscipline", + "autfunction": "WEB_MLDMGT", + "record_title": L("mld_discipline"), + "records_title": L("mld_discipline_m"), + "soft_delete": "ins_discipline_verwijder", + + + "fields": { + "id": { + "dbs": "ins_discipline_key", + "label": "Key", + "typ": "key", + "filter": "exact", + "seq": "ins_s_ins_discipline_key" + }, + "disciplinetype": { + "dbs": "ins_srtdiscipline_key", + "label": L("ins_srtdiscipline"), + "typ": "key", + "foreign" : { + "tbl": "ins_srtdiscipline", + "key": "ins_srtdiscipline_key", + "desc": "ins_srtdiscipline_omschrijving" + }, + "emptyoption": null, + "filter": "exact" + }, + "name": { + "dbs": "ins_discipline_omschrijving", + "label": L("ins_discipline_omschrijving"), + "typ": "varchar", + "required": true, + "translate": true + }, + "costtype": { + "dbs": "prs_kostensoort_key", + "label": L("prs_kostensoort"), + "typ": "key", + "foreign": { + "tbl": "PRS_KOSTENSOORT", + "key": "PRS_KOSTENSOORT_KEY", + "desc": "PRS_KOSTENSOORT_OMS" + } + }, + "ins_discipline_kpnverplicht": { + "dbs": "ins_discipline_kpnverplicht", + "label": L("ins_discipline_kpnverplicht"), + "typ": "check" + }, + "ins_discipline_module": { + "dbs": "ins_discipline_module", + "label": L("ins_discipline_module"), + "typ": "varchar", + "required": true, + "defaultvalue": "RES", + "hidden_fld": true + }, + "ins_discipline_email": { + "dbs": "ins_discipline_email", + "label": L("ins_discipline_email"), + "typ": "varchar" + }, + "ins_discipline_ktopercentage": { + "dbs": "ins_discipline_ktopercentage", + "label": L("ins_discipline_ktopercentage"), + "typ": "number" + }, + "ins_discipline_ktodrempel": { + "dbs": "ins_discipline_ktodrempel", + "label": L("ins_discipline_ktodrempel"), + "typ": "number" + } }, - "disciplinetype": { - "dbs": "ins_srtdiscipline_key", - "typ": "key", - "foreign" : { - "tbl": "ins_srtdiscipline", - "key": "ins_srtdiscipline_key", - "desc": "ins_srtdiscipline_omschrijving" - }, - "filter": "like", - label: L("lcl_mld_categorie") - }, - "name": { - "dbs": "ins_discipline_omschrijving", - "label": L("ins_discipline_omschrijving"), - "typ": "varchar", - "required": true, - "translate": true - }, - "costtype": { - "dbs": "prs_kostensoort_key", - "label": L("prs_kostensoort_key"), - "typ": "key", - "foreign": { - "tbl": "PRS_KOSTENSOORT", - "key": "PRS_KOSTENSOORT_KEY", - "desc": "PRS_KOSTENSOORT_OMS" - } - }, - "ins_discipline_kpnverplicht": { - "dbs": "ins_discipline_kpnverplicht", - "label": L("ins_discipline_kpnverplicht"), - "typ": "check" - }, - "ins_discipline_module": { - "dbs": "ins_discipline_module", - "label": L("ins_discipline_module"), - "typ": "varchar", - required: true, - defaultvalue: "RES", - "hidden_fld": true - }, - "ins_discipline_email": { - "dbs": "ins_discipline_email", - "label": L("ins_discipline_email"), - "typ": "varchar" - }, - "ins_discipline_ktopercentage": { - "dbs": "ins_discipline_ktopercentage", - "label": L("ins_discipline_ktopercentage"), - "typ": "number" - }, - "ins_discipline_ktodrempel": { - "dbs": "ins_discipline_ktodrempel", - "label": L("ins_discipline_ktodrempel"), - "typ": "number" + "disc_params": { + "model": model_mld_disc_params, + "joinfield": "mld_ins_discipline_key" } - }, - "disc_params": { model: model_mld_disc_params, - joinfield: "mld_ins_discipline_key" - }, - "soft_delete": "ins_discipline_verwijder", - "list": { - "columns": [ - "id", - "name", - "costtype", - "disciplinetype" - ] - }, - "search": { - "autosearch": true, - "filters": ["disciplinetype"] - }, - "autfunction": "WEB_MLDMGT", - "record_title": L("lcl_vakgroup") - // , "records_title": L("ins_tab_discipline_m") } - -/* -FACXSL_LCL('ins_srtdiscipline_key', 'Vakgroeptype', 'Discipline type', 'Innendiensttyp', 'Type de groupe de service') -FACXSL_LCL('ins_discipline_omschrijving', 'Omschrijving', 'Description', 'Umschreibung', 'Description') -FACXSL_LCL('prs_kostensoort_key', 'Kostensoort', 'Cost category', 'Kostenart', 'Type de coûts') -FACXSL_LCL('ins_discipline_kpnverplicht', 'Kostenplaats verplicht', 'Cost centre required', 'Kostenstelle erfordlich', 'Centre de coûts obligatoire') -FACXSL_LCL('ins_discipline_module', 'INS_DISCIPLINE_MODULE', '@@', '@@', '@@') -FACXSL_LCL('ins_discipline_email', 'E-mail afzender notificaties', 'E-mail sender notifications', 'E-mail Absender Notifikationen', 'Expéditeur e-mail des notifications') -FACXSL_LCL('ins_discipline_ktopercentage', 'Klanttevredenheidsmeting percentage', 'Customer satisfaction survey %', 'Befragung zur Kundenzufriedenheit %', 'Enquête') -FACXSL_LCL('ins_discipline_ktodrempel', 'Klanttevredenheidsmeting drempel', 'Customer satisfaction survey threshold', 'Befragung zur Kundenzufriedenheit Schwelle', 'Seuil d''enquête') -FACXSL_LCL('ins_tab_discipline', 'Vakgroep', 'Discipline', 'Innendienst', 'Groupe de service') -FACXSL_LCL('ins_tab_discipline_m', 'Vakgroepen', '@@', '@@', '@@') - ----------------------------- -Page event show: -'Zoek het vakgroeptype op - -if fldINS_SRTDISCIPLINE_KEY <> "" then - sqlOmschrijving = "select ins_srtdiscipline_omschrijving "&_ - "from ins_srtdiscipline "&_ - "where ins_srtdiscipline_key = " & ToSQL(fldINS_SRTDISCIPLINE_KEY, "Number") - openrs rsOmschrijving, sqlOmschrijving - if not rsOmschrijving.EOF then - fldINS_SRTDISCIPLINE_KEY = getValue(rsOmschrijving,"ins_srtdiscipline_omschrijving") - end if - rsOmschrijving.Close -end if - ----------------------------- -Page event open: -tmpWhere = "" -pINS_DISCIPLINE_OMSCHRIJVING = getParam("sINS_DISCIPLINE_OMSCHRIJVING") -if not isEmpty(pINS_DISCIPLINE_OMSCHRIJVING) then - hasParam = true - tmpWhere = tmpWhere & " Upper(INS_DISCIPLINE_OMSCHRIJVING) like '%" & UCase(replace(pINS_DISCIPLINE_OMSCHRIJVING,"'","''")) & "%'" -end if - -if tmpWhere <> "" then - sSQL = sSQL & " AND (" & tmpWhere & ")" -end if - ----------------------------- -Form event show: -'Zoek het vakgroeptype op - -if fldINS_SRTDISCIPLINE_KEY <> "" then - sqlOmschrijving = "select ins_srtdiscipline_omschrijving "&_ - "from ins_srtdiscipline "&_ - "where ins_srtdiscipline_key = " & ToSQL(fldINS_SRTDISCIPLINE_KEY, "Number") - openrs rsOmschrijving, sqlOmschrijving - if not rsOmschrijving.EOF then - fldINS_SRTDISCIPLINE_KEY = getValue(rsOmschrijving,"ins_srtdiscipline_omschrijving") - end if - rsOmschrijving.Close -end if - ----------------------------- -Form event open: -tmpWhere = "" -pINS_DISCIPLINE_OMSCHRIJVING = getParam("sINS_DISCIPLINE_OMSCHRIJVING") -if not isEmpty(pINS_DISCIPLINE_OMSCHRIJVING) then - hasParam = true - tmpWhere = tmpWhere & " Upper(INS_DISCIPLINE_OMSCHRIJVING) like '%" & UCase(replace(pINS_DISCIPLINE_OMSCHRIJVING,"'","''")) & "%'" -end if - -if tmpWhere <> "" then - sSQL = sSQL & " AND (" & tmpWhere & ")" -end if -*/ %> \ No newline at end of file diff --git a/APPL/MGT/mld_discipline.asp b/APPL/MGT/mld_discipline.asp new file mode 100644 index 0000000000..2042831afe --- /dev/null +++ b/APPL/MGT/mld_discipline.asp @@ -0,0 +1,39 @@ +<%@language = "javascript" %> +<% /* + $Revision$ + $Id$ + + File: mld_discipline.asp + + Description: fac_management aanroep van model_mld_discipline + + Context: + + Notes: +*/ +%> + + +<% +var this_model = new model_mld_discipline(); + +scaffolding(this_model, + { + "search": { + "autosearch": true, + "filters": [ + "name", + "disciplinetype" + ] + }, + "list": { + "columns": [ + "id", + "name", + "costtype", + "disciplinetype" + + ] + } + }); +%> \ No newline at end of file