Files
Facilitor/APPL/API2/model_bgt_budget.inc
Erik Groener fb441b1705 FSN#39312 Verder ontsluiten van modellen via de API
svn path=/Website/trunk/; revision=32984
2017-02-28 15:31:59 +00:00

180 lines
5.2 KiB
PHP

<% /*
$Revision$
$Id$
File: model_bgt_budget.inc
Description: Model voor bgt_budget
Context:
Notes:
*/
%>
<%
function model_bgt_budget()
{
this.records_name = "budgets";
this.record_name = "budget";
this.table = "bgt_budget";
this.primary = "bgt_budget_key";
this.autfunction = "WEB_BGTUSE";
this.record_title = L("bgt_budget");
this.records_title = L("bgt_budget_m");
this.fields = {
"id": {
"dbs": "bgt_budget_key",
"label": L("lcl_key"),
"typ": "key",
"hidden_fld": true,
"required": true,
"filter": "exact",
"seq": "bgt_s_bgt_budget_key"
},
"budgetdiscipline": {
"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"
}
},
"budgetproject": {
"dbs": "bgt_project_key",
"label": L("bgt_project_omschrijving"),
"typ": "key",
"required": true,
"insertonly": true,
"foreign": {
"tbl": "bgt_project",
"key": "bgt_project_key",
"desc": "bgt_project_omschrijving"
}
},
"budgetcostcategory": {
"dbs": "bgt_kostenrubriek_key",
"label": L("bgt_kostenrubriek_oms"),
"typ": "key",
"required": true,
"insertonly": true,
"foreign": {
"tbl": "bgt_kostenrubriek",
"key": "bgt_kostenrubriek_key",
"desc": "bgt_kostenrubriek_oms"
}
},
"costtypegroup": {
"dbs": "prs_kostensoortgrp_key",
"label": L("prs_kostensoortgrp_key"),
"typ": "key",
"required": true,
"insertonly": true,
"foreign": {
"tbl": "prs_kostensoortgrp",
"key": "prs_kostensoortgrp_key",
"desc": "prs_kostensoortgrp_oms"
},
"LOVinit": "",
"filter": "exact"
},
"costtype": {
"dbs": "prs_kostensoort_key",
"label": L("prs_kostensoort_key"),
"typ": "key",
"required": true,
"insertonly": true,
"foreign": {
"tbl": "prs_kostensoort",
"key": "prs_kostensoort_key",
"desc": "prs_kostensoort_opmerking"
}
},
"amount": {
"dbs": "bgt_budget_bedrag",
"label": L("bgt_budget_bedrag"),
"typ": "float",
"iscurrency": true,
"total": true,
"required": true
},
"vat": {
"dbs": "bgt_budget_btwbedrag",
"label": L("bgt_budget_btwbedrag"),
"typ": "float",
"iscurrency": true,
"total": true,
"required": true
},
"contingency": {
"dbs": "bgt_budget_isreserve",
"label": L("bgt_budget_isreserve"),
"typ": "check0"
},
"begin": {
"dbs": "bgt_budget_begin",
"label": L("bgt_budget_begin"),
"typ": "date",
"required": true
},
"end": {
"dbs": "bgt_budget_eind",
"label": L("bgt_budget_eind"),
"typ": "date",
"required": false
},
"costgroup": {
"dbs": "prs_kostenplaatsgrp_key",
"label": L("prs_kostenplaatsgrp_key"),
"typ": "key",
"foreign": {
"tbl": "prs_kostenplaatsgrp",
"key": "prs_kostenplaatsgrp_key",
"desc": "prs_kostenplaatsgrp_oms"
}
},
"account": {
"dbs": "prs_kostenplaats_key",
"label": L("prs_kostenplaats_key"),
"typ": "key",
"foreign": {
"tbl": "prs_kostenplaats",
"key": "prs_kostenplaats_key",
"desc": "prs_kostenplaats_nr"
}
},
"expirationdate": {
"dbs": "bgt_budget_vervaldatum",
"label": L("bgt_budget_vervaldatum"),
"hidden_fld": true,
"typ": "date"
}
};
this.edit = {
"modal": true
};
this.list = {
"columns": [
"costcategory",
"costtypegroup",
"costtype",
"amount",
"vat"
]
};
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);
}
%>