<% /*
    $Revision$
    $Id$

    File:           model_bes_disc_params.inc

    Description:    Vanuit CodeCharge gegenereerd model voor bes_discipline

    Context:

    Notes:          *uitsluitend* gebruikt als include van model_bes_discipline
*/
%>
<%
model_bes_disc_params =
{
    "records_name": "orderdisciplineparams",
    "record_name": "orderdisciplineparam",
    "table": "bes_disc_params",
    "primary": "bes_disc_params_key",
    "autfunction": "WEB_BESMSU",


    "fields": {
        "id": {
            "dbs": "bes_disc_params_key",
            "label": L("lcl_key"),
            "typ": "key",
            "seq": "bes_s_bes_disc_params_key"
        },
        "orderdiscipline": {
            "dbs": "bes_ins_discipline_key",
            "label": "Foreign key",
            "typ": "key",
            "hidden_fld": true
        },
        "approvalflow": {
            "dbs": "bes_disc_params_fiatflow",
            "label": L("bes_discipline_fiatflow"),
            "typ": "number",
            "LOV": L("bes_discipline_fiatflowLOV"),
            "emptyoption": null
        },
        "purchaseorderlimit1": {
            "dbs": "bes_disc_params_bestellimiet",
            "label": L("bes_discipline_bestellimiet1"),
            "iscurrency": true,
            "typ": "float"
        },
        "purchaseorderlimit2": {
            "dbs": "bes_disc_params_bestellimiet2",
            "label": L("bes_discipline_bestellimiet2"),
            "iscurrency": true,
            "typ": "float"
        },
        "purchaseorderlimit3": {
            "dbs": "bes_disc_params_bestellimiet3",
            "label": L("bes_discipline_bestellimiet3"),
            "iscurrency": true,
            "typ": "float"
        },
        "purchaseorderlimit4": {
            "dbs": "bes_disc_params_bestellimiet4",
            "label": L("bes_discipline_bestellimiet4"),
            "iscurrency": true,
            "typ": "float"
        },
        "purchaseorderlimit5": {
            "dbs": "bes_disc_params_bestellimiet5",
            "label": L("bes_discipline_bestellimiet5"),
            "iscurrency": true,
            "typ": "float"
        },
        "minimalamount": {
            "dbs": "bes_disc_params_min_bedrag",
            "label": L("bes_discipline_min_bedrag"),
            "iscurrency": true,
            "iscurrency": true,
            "typ": "float"
        },
        "createorder": {
            "dbs": "bes_disc_params_auto_order",
            "label": L("bes_discipline_auto_order"),
            "typ": "check0"
        },
        "acceptrequest": {
            "dbs": "bes_disc_params_autoacceptrfo",
            "label": L("bes_discipline_autoacceptrfo"),
            "typ": "check0"
        },
        "mutationallowed": {
            "dbs": "bes_disc_params_herfiat",
            "label": L("bes_discipline_herfiat"),
            "typ": "number",
            "LOV": L("bes_discipline_herfiatLOV"),
            "emptyoption": null
        },
        "deviationpercentage": {
            "dbs": "bes_disc_params_herfiatpct",
            "label": L("bes_discipline_herfiatpct"),
            "typ": "number"
        },
        "deviationamount": {
            "dbs": "bes_disc_params_herfiatmarge",
            "label": L("bes_discipline_herfiatmarge"),
            "iscurrency": true,
            "typ": "float"
        },
        "invoicepercentage": {
            "dbs": "bes_disc_params_factuurpct",
            "label": L("bes_discipline_factuurpct"),
            "typ": "number"
        },
        "invoiceamount": {
            "dbs": "bes_disc_params_factuurmarge",
            "label": L("bes_discipline_factuurmarge"),
            "iscurrency": true,
            "typ": "float"
        },
        "invoicematching": {
            "dbs": "bes_disc_params_factmatchmode",
            "label": L("bes_discipline_factmatchmode"),
            "typ": "number",
            "LOV": L("bes_discipline_factmatchmodeLOV"),
            "emptyoption": null
        },
        "approveinvoice": {
            "dbs": "bes_disc_params_factuurappr",
            "label": L("bes_discipline_factuurappr"),
            "typ": "check0"
        },
        "invoicelimit": {
            "dbs": "bes_disc_params_factuurgrens",
            "label": L("bes_discipline_factuurgrens"),
            "typ": "number"
        },
        "chargebudget": {
            "dbs": "bes_disc_params_pgb",
            "label": L("bes_discipline_pgb"),
            "typ": "number",
            "LOV": L("bes_discipline_pgbLOV"),
            "emptyoption": null
        },
        "deliverytime": {
            "dbs": "bes_disc_params_leverdagen",
            "label": L("bes_discipline_leverdagen"),
            "typ": "number"
        },
        "expiretime": {
            "dbs": "bes_disc_params_expire_tijd",
            "label": L("bes_discipline_expire_tijd"),
            "typ": "float",
            "LOV": api2.getTimetable(), // TODO timepicker?
            "emptyoption": L("bes_discipline_standaard"),
            "multiedit": true
        },
        "remoteconfirm": {
            "dbs": "bes_disc_params_remoteconfirm",
            "label": L("bes_discipline_remoteconfirm"),
            "typ": "check0"
        },
        "ordermode": {
            "dbs": "bes_disc_params_bestelmode",
            "label": L("bes_discipline_bestelmode"),
            "typ": "number",
            "LOV": L("bes_discipline_bestelmodeLOV"),
            "emptyoption": null
        },
        "photomode": {
            "dbs": "bes_disc_params_fotomode",
            "label": L("bes_discipline_fotomode"),
            "typ": "number",
            "LOV": L("bes_discipline_fotomodeLOV"),
            "emptyoption": null
        },
        "punchouturl": {
            "dbs": "bes_disc_params_punchouturl",
            "label": L("bes_discipline_punchouturl"),
            "typ": "varchar"
        },
        "company": {
            "dbs": "bes_disc_params_punch_bedr_key",
            "label": L("bes_discipline_punch_bedr_key"),
            "typ": "key",
            "foreign": {
                "tbl": "prs_v_aanwezigbedrijf",
                "key": "prs_bedrijf_key",
                "desc": "prs_bedrijf_naam"
            }
        },
        "logourl": {
            "dbs": "bes_disc_params_logo_url",
            "label": L("bes_discipline_logo_url"),
            "typ": "varchar"
        },
        "reminderdays": {
            "dbs": "bes_disc_params_noti_dagen",
            "label": L("bes_discipline_noti_dagen"),
            "typ": "number"
        },
        "notifypurchaser": {
            "dbs": "bes_disc_params_noti_opdr",
            "label": L("bes_discipline_noti_opdr"),
            "typ": "check0"
        },
        "notifybackoffice": {
            "dbs": "bes_disc_params_bonotify",
            "label": L("bes_discipline_bonotify"),
            "typ": "check0"
        },
        "returnallowd": {
            "dbs": "bes_disc_params_retour",
            "label": L("bes_discipline_retour"),
            "typ": "check0"
        },
        "returnurl": {
            "dbs": "bes_disc_params_retour_url",
            "label": L("bes_discipline_retour_url"),
            "typ": "varchar"
        },
        "remarkurl": {
            "dbs": "bes_disc_params_levopm_url",
            "label": L("bes_discipline_levopm_url"),
            "typ": "varchar"
        },
        "orderdisciplines": {
            "dbs": "bes_ins_discipline_key_inkoop",
            "label": L("bes_discipline_key_inkoop"),
            "typ": "key",
            "foreign": {
                "tbl": "bes_v_aanwezigdiscipline",
                "key": "ins_discipline_key",
                "desc": "ins_discipline_omschrijving"
            }
        },
        "singlegroup": {
            "dbs": "bes_disc_params_singlegroep",
            "label": L("bes_discipline_singlegroep"),
            "typ": "check0"
        },
        "ordermandate": {
            "dbs": "bes_disc_params_kpautorisatie",
            "label": L("bes_discipline_kpautorisatie"),
            "typ": "check0"
        },
        "maximumarticles": {
            "dbs": "bes_disc_params_maxartikel",
            "label": L("bes_discipline_maxartikel"),
            "typ": "number"
        },
        "subscription": {
            "dbs": "bes_disc_params_contract",
            "label": L("bes_discipline_contract"),
            "typ": "check0"
        },
        "contractdisciplines": {
            "dbs": "bes_disc_params_cnt_disckey",
            "label": L("bes_discipline_cnt_disckey"),
            "typ": "key",
            "foreign": {
                "tbl": "cnt_v_aanwezigdiscipline",
                "key": "ins_discipline_key",
                "desc": "ins_discipline_omschrijving"
            }
        },
        "contractperiod": {
            "dbs": "bes_disc_params_cnt_termijn",
            "label": L("bes_discipline_cnt_termijn"),
            "typ": "key",
            "foreign": {
                "tbl": "(SELECT cnt_termijn_key"
                     + "      , cnt_termijn_omschrijving"
                     + "   FROM cnt_termijn"
                     + "  ORDER BY cnt_termijn_volgnummer)",
                "key": "cnt_termijn_key",
                "desc": "cnt_termijn_omschrijving"
            }
        },
        "noticeperiod": {
            "dbs": "bes_disc_params_cnt_opzegterm",
            "label": L("bes_discipline_cnt_opzegterm"),
            "typ": "key",
            "foreign": {
                "tbl": "(SELECT cnt_termijn_key"
                     + "      , cnt_termijn_omschrijving"
                     + "   FROM cnt_termijn"
                     + "  ORDER BY cnt_termijn_volgnummer)",
                "key": "cnt_termijn_key",
                "desc": "cnt_termijn_omschrijving"
            }
        },
        "forothers": {
            "dbs": "bes_disc_params_for_others",
            "label": L("bes_discipline_for_others"),
            "typ": "check0"
        },
        "objectmode": {
            "dbs": "bes_disc_params_ins_mode",
            "label": L("lcl_ins_mode"),
            "typ": "number",
            "LOV": L("bes_discipline_ins_modeLOV"),
            "emptyoption": null
        },
        "feconfirm": {
            "dbs": "bes_disc_params_fe_confirm",
            "label": L("bes_discipline_fe_confirm"),
            "typ": "check0"
        },
        "fehidecost": {
            "dbs": "bes_disc_params_hide_cost_fe",
            "label": L("bes_discipline_fe_hide_cost"),
            "typ": "check0"
        },
        "fedeliver": {
            "dbs": "bes_disc_params_deliver_fe",
            "label": L("bes_discipline_fe_deliver"),
            "typ": "check0"
        },
        "autodeliver": {
            "dbs": "bes_disc_params_autodeliverdays",
            "label": L("bes_discipline_autodeliverdays"),
            "typ": "number",
            "len": 4
        }
    }
}

api2.generic_REST(model_bes_disc_params);
%>