<% /* $Revision$ $Id$ File: model_bgt_project.inc Description: Model voor bgt_project Context: Notes: */ %> <% function model_bgt_project() { this.records_name = "budgetprojects"; this.record_name = "budgetproject"; this.table = "bgt_project"; this.primary = "bgt_project_key"; this.soft_delete = "bgt_project_verwijder"; this.autfunction = "WEB_BGTMGT"; this.record_title = L("bgt_project"); this.records_title = L("bgt_project_m"); this.fields = { "id": { "dbs": "bgt_project_key", "label": L("lcl_key"), "typ": "key", "required": true, "hidden_fld": true, "filter": "exact", "seq": "bgt_s_bgt_project_key", "defaultvalue": null }, "budgetdiscipline": { /* TODO linkt nu naar algemene discpline, moet bgt-variant in scf zijn? */ "dbs": "ins_discipline_key", "label": L("bgt_discipline_omschrijving"), "typ": "key", "required": true, "insertonly": true, "foreign": { "tbl": "ins_tab_discipline", "key": "ins_discipline_key", "desc": "ins_discipline_omschrijving", "where": "ins_discipline_module = 'BGT' AND ins_discipline_verwijder IS NULL" } }, "name": { "dbs": "bgt_project_omschrijving", "label": L("bgt_project_omschrijving"), "typ": "varchar", "required": true, "translate": true }, "code": { "dbs": "bgt_project_code", "label": L("bgt_project_code"), "typ": "varchar" }, "sequence": { "dbs": "bgt_project_volgnr", "label": L("bgt_project_volgnr"), "typ": "number" }, "account": { "dbs": "prs_kostenplaats_key", "label": L("bgt_budget_account"), "typ": "key", "foreign": { "tbl": "prs_kostenplaats", "key": "prs_kostenplaats_key", "desc": "prs_kostenplaats_nr" } }, "pricedate": { "dbs": "bgt_project_prijspeildatum", "label": L("bgt_project_prijspeildatum"), "typ": "date" }, "info": { "dbs": "bgt_project_info", "label": L("bgt_project_info"), "typ": "memo" }, "notes": { "dbs": "bgt_project_notes", "label": L("bgt_project_notes"), "typ": "memo" } }; this.print = { xmlnode: "budget", where: "project"}; // if (!S("bgt_enabled")) // { // this.fields.budgetdiscipline.hidden_fld = true // this.fields.budgetdiscipline.default_value = 1 // } 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); } %>