<%@language = "javascript" %>
<% /*
    $Revision$
    $Id$

    File:           prs_kostensoort.asp

    Description:    fac_management aanroep van model_prs_kostensoort

    Context:

    Notes:
*/
%>
<!-- #include file="../scf/scaffolding.inc" -->
<!-- #include file="../api2/model_prs_kostensoort.inc" -->
<%
var discipline_key = getQParamInt("budgetdiscipline", -1);
var project_key = getQParamInt("budgetproject", -1);
var kostenrubriek_key = getQParamInt("budgetcostcategory", -1);
var kostensoortgrp_key = getQParamInt("costtypegroup", -1);
var this_model = new model_prs_kostensoort();

var model_params = {
        "search": {
            "autosearch": true,
            "filters": [
                "budgetdiscipline",
                "budgetproject",
                "budgetcostcategory",
                "costtypegroup",
                "name",
                "remark",
                "altcode"
            ],
            "transit": [
                "budgetdiscipline",
                "budgetproject",
                "budgetcostcategory",
                "costtypegroup"
            ]
        }
    };

if (S("bgt_enabled"))
{
    model_params.search.requires = {
            "js": ["../bgt/bgt_budget.js"]
        };
    model_params.list = {
            "columns": [
                "costtypegroup",
                "name",
                "altcode",
                "vat"
            ]
        };
    model_params.edit = {
            "requires": {
                "js": ["../bgt/bgt_budget.js"]
            }
        };
    model_params.wrap = {
            "no_default_frames": true,
            "frames": [{
                url: "../bgt/bgt_budget.asp?mode=list&parent="+this_model.record_name+"&costtype={0}",
                title: L("bgt_budget_m")
            }]
        };
}
else
{
     model_params.list = {
            "columns": [
                "costtypegroup",
                "name",
                "remark",
                "altcode",
                "refcode"
            ]
        };
}
model_params.layout = {
    "miscellaneous": {
        "icon" : "fa-money-check-dollar"
    }
}

scaffolding(this_model, model_params);
%><% ASPPAGE_END(); %>
