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

    File:           cnt_discipline.asp

    Description:    fac_management aanroep van model_cnt_discipline

    Context:

    Notes:
*/
%>
<!-- #include file="../scf/scaffolding.inc" -->
<!-- #include file="../api2/model_cnt_discipline.inc" -->
<%
var this_model = new model_cnt_discipline();

if (S("cnt_contract_approval") == 0) {
    // nieuw/gesplitst contract accorderen als contract approval mechanisme aan staat.
    delete this_model.fields.approvenew;
}

scaffolding(this_model,
    {
        "search": {
            "autosearch": true,
            "filters": [
                "name"
            ]
        },
        "list": {
            "columns": [
                "id",
                "name",
                "contracttype",
                "costtype",
                "invoice_type"
            ]
        },
        "edit": {
            "requires": {
                js: ["./cnt_discipline.js",
                     "./ins_discipline.js"
                ]
            }
        },
        "layout": {
            "block": [
                {
                    "blockid": "cntDiscGeneral",
                    "label": L("cnt_discipline"),
                    "icon": "fa-tag",
                    "fields": [
                        "name",
                        "contracttype",
                        "salescontract",
                        "symbolname",
                        "remark",
                        "binding",
                        "forsupplier",
                        "forexecutor",
                        "forrenter",
                        "options",
                        "email",
                        "externnr"
                    ]
                },
                {
                    "blockid": "cntDiscFinance",
                    "label": L("cnt_discipline_fin"),
                    "icon": "fa-euro-sign",
                    "fields": [
                        "financialdata",
                        "approvenew",
                        "costtype",
                        "costtypemandatory",
                        "percentage",
                        "margin",
                        "approve",
                        "invoicelimit",
                        "schedule"
                    ]
                }
            ]
        },
        "wrap": {
            "frames": [
                {
                    url: "fac_functie.asp?mode=list&ins_discipline={0}",
                    title: L("fac_functie_m"),
                    autfunction: "WEB_PRSSYS"
                }
            ]
        }
    });
%>
<% ASPPAGE_END(); %>
