<% /*
    $Revision$
    $Id$

    File:           model_prs_bedrijfadres_srtnoti.inc

    Description:

    Context:

    Notes:
*/
%>
<%

function model_prs_bedrijfadres_srtnoti()
{
    this.records_name = "companyconnectsrtnotis";
    this.record_name = "companyconnectsrtnoti";
    this.table = "prs_bedrijfadres_srtnoti";
    this.primary = "prs_bedrijfadres_srtnoti_key";
    this.record_title = L("lcl_prs_bedrijfadres_srtnoti_frame");
    this.records_title = L("lcl_prs_bedrijfadres_srtnoti_title");
    this.autfunction = "WEB_PRSMGT";
    this.defaultIcon = "fa-address-card";

    this.fields = {
        "id": {
            "dbs": "prs_bedrijfadres_srtnoti_key",
            "seq": "prs_s_prs_bedrijfadres_srtnoti_key",
            "typ": "key",
            "label": L("lcl_key"),
            "required": true
        },
        "companyconnect": {
            "dbs": "prs_bedrijfadres_key",
            "typ": "key",
            "label": L("lcl_prs_companies_name_sys"),
            "insertonly": true,
            "foreign": {
                "tbl": "(SELECT prs_bedrijfadres_key, prs_bedrijf_naam"
                     + "   FROM prs_bedrijfadres pba, prs_bedrijf pb"
                     + "  WHERE pba.prs_bedrijf_key = pb.prs_bedrijf_key)",
                "key": "prs_bedrijfadres_key",
                "desc": "prs_bedrijf_naam"
            }
        },
        "srtnotification": {
            "dbs": "fac_srtnotificatie_key",
            "typ": "key",
            "insertonly": true,
            "label": L("fac_srtnotificatie_code"),
            "uniquewith": "companyconnect",
            "multiaddsize": 10,
            "foreign": {
                "tbl": "fac_srtnotificatie",
                "key": "fac_srtnotificatie_key",
                "desc": "fac_srtnotificatie_code || DECODE(fac_srtnotificatie_oms, NULL, '', ' (' || lcl.l(fac_srtnotificatie_oms) || ')')",
                "where": "fac_srtnotificatie_code NOT LIKE '%TRK'"
            }
        },
/*
        "address": {
            "dbs": "prs_bedrijfadres_url",  // = protocol + url
            "typ": "varchar",
            "label": L("lcl_prs_bedrijfadres_url"),  // als overrule
            "track": true
        },
        "method": {
            "dbs": "prs_bedrijfadres_method",  // = PUT/PATCH/POST enz.
            "typ": "varchar",
            "label": L("lcl_prs_bedrijfadres_method"),  // als overrule
            "track": true
        },
*/
        "created": {
            "dbs": "prs_bedrijfadres_srtnoti_aanmaak",
            "label": L("aut_sp_aanmaak"),
            "typ": "date",
            "readonly": true
        }
    };

    this.edit = {
            "modal": true
        };
    this.list = {
        "columns": ["srtnotification", "companyconnect", "created"]
    };

    this.REST_GET    = generic_REST_GET(this);
    this.REST_PUT    = generic_REST_PUT(this);
    this.REST_POST   = generic_REST_POST(this);
    this.REST_DELETE = generic_REST_DELETE(this);
}
%>