<%@language = "javascript" %>

<!-- #include file="../scf/scaffolding.inc" -->
<!-- #include file="../mgt/mgt_tools.inc" -->
<!-- #include file="../api2/model_fac_import_app.inc" -->

<%
var generic = getQParamInt("gen", 0);
var  this_model = new model_fac_import_app();

if (generic == 1)
{
    this_model.autfunction = "WEB_PRSSYS";
    delete this_model.fields.name.hidden_fld;
    delete this_model.fields.code.hidden_fld;
    delete this_model.gparams.GET.wheres;
}

scaffolding(this_model,
    {
        "search": {
            "autosearch": true,
            "filters": [
                "catalog",
                "authorization",
                "company"
            ]
        },
        "list": {
            "columns": [
                "id",
                "code",
                "catalog",
                "company",
                "name"
            ]
        },
        "edit": {
            "requires": {
                js: ["./fac_import_app.js"]
            }
        },
        "transit": {
            "gen": generic
        },
        "print": {}
    });
%>