<% /*
    $Revision$
    $Id$

    File:           model_prs_staffel.inc

    Description:    Vanuit CodeCharge gegenereerd model voor prs_staffel

    Context:

    Notes:
*/
%>
<%

function model_prs_staffel()
{
    this.table = "prs_staffel";
    this.primary = "prs_staffel_key";
    this.records_name = "prs_staffels";
    this.record_name = "prs_staffel";
    this.autfunction = "WEB_PRSMGT";
    this.record_title = L("prs_staffel");
    this.records_title = L("prs_staffel_m");


    this.fields = {
        "id": {
            "dbs": "prs_staffel_key",
            "label": "Key",
            "typ": "key",
            "hidden_fld": true,
            "required": true,
            "filter": "exact",
            "seq": "prs_s_prs_staffel_key"
        },
        "supplier": {
            "dbs": "prs_bedrijf_key",
            "label": L("prs_bedrijf_key"),
            "typ": "key",
            "required": true,
            "foreign": {
                "tbl": "prs_v_leverancierbedrijf",
                "key": "prs_bedrijf_key",
                "desc": "prs_bedrijf_naam"
            },
            "filter": "exact"
        },
        "limit_value": {
            "dbs": "prs_staffel_grenswaarde",
            "label": L("prs_staffel_grenswaarde"),
            "typ": "number"
        },
        "discount": {
            "dbs": "prs_staffel_korting",
            "label": L("prs_staffel_korting"),
            "typ": "float",
            "iscurrency": true,
            "required": true
        }
    };


    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, {});
}
%>