<% /*
    $Revision$
    $Id$

    File:           model_mld_typeopdr.inc

    Description:    Vanuit CodeCharge gegenereerd model voor mld_typeopdr

    Context:

    Notes:
*/
%>
<%

function model_mld_typeopdr()
{
    this.records_name = "issueordertypes";
    this.record_name = "issueordertype";
    this.table = "mld_typeopdr";
    this.primary = "mld_typeopdr_key";
    this.autfunction = "WEB_PRSSYS";
    this.record_title = L("mld_typeopdr");
    this.records_title = L("mld_typeopdr_m");


    this.fields = {
        "id": {
            "dbs": "mld_typeopdr_key",
            "label": L("lcl_key"),
            "typ": "key",
            "required": true,
            "seq": "mld_s_mld_stdmelding_key"
        },
        "name": {
            "dbs": "mld_typeopdr_omschrijving",
            "label": L("mld_typeopdr_omschrijving"),
            "typ": "varchar",
            "translate": true,
            "required": true
        },
        "module": {
            "dbs": "mld_typeopdr_module",
            "label": L("mld_typeopdr_module"),
            "typ": "varchar",
            "hidden_fld": true,
            "defaultvalue": "MLD"
        },
        "close": {
            "dbs": "mld_typeopdr_decentraal",
            "label": L("mld_typeopdr_decentraal"),
            "typ": "key",
            "LOV": L("mld_typeopdr_decentraalLOV"),
            "emptyoption": null
        },
        "external": {
            "dbs": "mld_typeopdr_afmelden_extern",
            "label": L("mld_typeopdr_afmelden_extern"),
            "typ": "key",
            "LOV": L("mld_typeopdr_afmelden_externLOV"),
            "emptyoption": null
        },
        "costs": {
            "dbs": "mld_typeopdr_kosten",
            "label": L("mld_typeopdr_kosten"),
            "typ": "check0"
        },
        "closecall": {
            "dbs": "mld_typeopdr_sluitmelding",
            "label": L("mld_typeopdr_sluitmelding"),
            "typ": "key",
            "defaultvalue": "0",
            "LOV": L("mld_typeopdr_sluitmeldingLOV"),
            "emptyoption": null
        },
        "cancelcall": {
            "dbs": "mld_typeopdr_annuleermelding",
            "label": L("mld_typeopdr_annuleermelding"),
            "typ": "key",
            "defaultvalue": "0",
            "LOV": L("mld_typeopdr_sluitmeldingLOV"),
            "emptyoption": null
        },
        //"matchtype": {
        //    "dbs": "mld_typeopdr_matchtype",
        //    "label": L("mld_typeopdr_matchtype"),
        //    "typ": "key",
        //    "defaultvalue": "2",
        //    "LOV": L("mld_typeopdr_matchtypeLOV"),
        //    "emptyoption": null
        //},
        "hours": {
            "dbs": "mld_typeopdr_uren",
            "label": L("mld_typeopdr_uren"),
            "typ": "key",
            "defaultvalue": "1",
            "LOV": L("mld_typeopdr_urenLOV"),
            "emptyoption": null
        },
        "materiaal": {
            "dbs": "mld_typeopdr_materiaal",
            "label": L("mld_typeopdr_materiaal"),
            "typ": "key",
            "defaultvalue": "1",
            "LOV": L("mld_typeopdr_materiaalLOV"),
            "emptyoption": null
        },
        "total": {
            "dbs": "mld_typeopdr_totaal",
            "label": L("mld_typeopdr_totaal"),
            "typ": "key",
            "defaultvalue": "1",
            "LOV": L("mld_typeopdr_totaalLOV"),
            "emptyoption": null
        },
        "invoicematching": {
            "dbs": "mld_typeopdr_factuur",
            "label": L("mld_typeopdr_factuurmatching"),
            "typ": "key",
            "defaultvalue": "1",
            "LOV": L("mld_typeopdr_factuurmatchLOV"),
            "emptyoption": null
        },
        "closemargin": {
            "dbs": "mld_typeopdr_afmeldmarge",
            "label": L("mld_typeopdr_afmeldmarge"),
            "typ": "number",
            "defaultvalue": "0",
            "multiedit": true
        },
        "visiblefe": {
            "dbs": "mld_typeopdr_zichtbaarfe",
            "label": L("mld_typeopdr_zichtbaarfe"),
            "typ": "check"
        },
        "offerrequest": {
            "dbs": "mld_typeopdr_isofferte",
            "label": L("mld_typeopdr_isofferte"),
            "typ": "check0"
        },
        "offerlimit": {
            "dbs": "mld_typeopdr_offertelimiet",
            "label": L("mld_typeopdr_offertelimiet"),
            "iscurrency": true,
            "typ": "float",
            "multiedit": true
        },
        "approval": {
            "dbs": "mld_typeopdr_gvs",
            "label": L("mld_typeopdr_gvs"),
            "iscurrency": true,
            "typ": "float",
            "multiedit": true
        },
        "approvalfiat": {
            "dbs": "mld_typeopdr_fvs",
            "label": L("mld_typeopdr_fvs"),
            "iscurrency": true,
            "typ": "float",
            "multiedit": true
        },
        "nextissueordertype": {
            "dbs": "mld_typeopdr_typeopdr_key",
            "label": L("mld_typeopdr_typeopdr_key"),
            "typ": "key",
            "foreign": {
                "tbl": "mld_typeopdr",
                "key": "mld_typeopdr_key",
                "desc": "mld_typeopdr_omschrijving"
            },
            "LOVinit": ""
        },
        "contract": {
            "dbs": "mld_typeopdr_contract",
            "label": L("mld_typeopdr_contract"),
            "typ": "number",
            "defaultvalue": "2",
            "LOV": L("mld_typeopdr_contractLOV"),
            "emptyoption": null
        },
        "visitors": {
            "dbs": "mld_typeopdr_bez",
            "label": L("mld_typeopdr_bez_register"),
            "typ": "check0"
        },
        "progress": {
            "dbs": "mld_typeopdr_afhandeling",
            "label": L("mld_typeopdr_afhandeling"),
            "typ": "check0"
        },
        "confirmforsend": {
            "dbs": "mld_typeopdr_confirm_for_send",
            "label": L("mld_typeopdr_confirmforsend"),
            "typ": "number",
            "multiedit": true,
            "defaultvalue": "0",
            "LOV": L("mld_typeopdr_confirmforsendLOV"),
            "emptyoption": null
        },
        "mandatorycosts": {
            "dbs": "mld_typeopdr_kosten_verplicht",
            "label": L("mld_typeopdr_kosten_verplicht"),
            "typ": "number",
            "LOV": L("mld_typeopdr_kosten_verplichtLOV"),
            "emptyoption": null,
            "multiedit": true
        },
        "slamode": {
            "dbs": "mld_typeopdr_slamode",
            "label": L("mld_typeopdr_slamode"),
            "typ": "number",
            "defaultvalue": "1",
            "LOV": L("mld_typeopdr_slamodeLOV"),
            "emptyoption": null,
            "multiedit": true
        },
        "symbolname": {
            "dbs": "mld_typeopdr_image",
            "typ": "icon",
            "label": L("lcl_mld_symbol_name")
        },
        "accept": {
            "dbs": "mld_typeopdr_accept",
            "label": L("mld_typeopdr_accept"),
            "defaultvalue": "1",
            "typ": "check0"
        },
        "sequential": {
            "dbs": "mld_typeopdr_sequential",
            "label": L("lcl_typeopdr_sequential"),
            "typ": "number",
            "multiedit": true,
            "bits": [
                {
                    "name": "",
                    "label": "",
                    "typ": "check",
                    "mask": 7,
                    "radios": [
                        {
                            "name": "inplan",
                            "label": L("mld_typeopdr_hold_allowed"),
                            "mask": 1,
                            "defaultvalue": 0
                        },
                        {
                            "name": "start",
                            "label": L("ins_srtcontrole_seq_strict"),
                            "mask": 2,
                            "defaultvalue": 0
                        },
                        {
                            "name": "afmeld",
                            "label": L("ins_srtcontrole_halt_start"),
                            "mask": 4,
                            "defaultvalue": 0
                        }
                    ]
                }
            ],
            "track": true
        },
        "code": {
            "dbs": "mld_typeopdr_code",
            "label": L("lcl_mld_code"),
            "typ": "varchar",
            "readonly": !user.has("WEB_FACTAB")
        }
    };


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