diff --git a/APPL/BES/bes_bestelling.asp b/APPL/BES/bes_bestelling.asp index 751b1b40f2..c1c39bb9d6 100644 --- a/APPL/BES/bes_bestelling.asp +++ b/APPL/BES/bes_bestelling.asp @@ -155,9 +155,9 @@ transitParam = buildTransitParam(["punch", "mld_key", "artikel_key", "ps", "pn", var bes_disc_info = bes.disc_info(dis_key); var newWindow = false; - if (!from_punch && bes_disc_info.isPunchout) + if (!from_punch && bes_disc_info.disc_params_punchouturl && !bes_disc_info.isFreeArticle) { - var purl = oRsbes_disc_info.disc_params_punchouturl; + var purl = bes_disc_info.disc_params_punchouturl; var hook_url = "bes_hook_punch.asp?urole="+urole+"&dis_key="+dis_key+transitParam; // Biedt de mogelijkheid de url te verrijken met gebruikers info var subst_table = { "RANDOM" : shared.random(16), diff --git a/APPL/BES/bes_bestelling.js b/APPL/BES/bes_bestelling.js index 75e1d3ea02..e14295f6ab 100644 --- a/APPL/BES/bes_bestelling.js +++ b/APPL/BES/bes_bestelling.js @@ -86,6 +86,7 @@ function show_item_details(bes_item_info) window.stock_info = {}; // even onbekend. var imgObj = $("#photo")[0]; + if (imgObj == null) return; // free artikel if (bes_item_info.srtdeel_image) { diff --git a/APPL/BES/bes_edit_bestelling.asp b/APPL/BES/bes_edit_bestelling.asp index 636904bedf..2f6b6815a0 100644 --- a/APPL/BES/bes_edit_bestelling.asp +++ b/APPL/BES/bes_edit_bestelling.asp @@ -712,21 +712,22 @@ else // nieuwe bestelling. Defaults bepalen <% // ======== BLOCK om itemregels toe te voegen ======== if (this_bes.canItemsChange) { - BLOCK_START("besItemSel" , L("lcl_bes_selectieblok") + " " + bes_disc_info.discipline_omschrijving + " " + (bes_bestelling.inclBTW? L("lcl_shared_inclBTW") : L("lcl_shared_exclBTW"))); + BLOCK_START("besItemSel" , L("lcl_bes_selectieblok") + " " + safe.html(bes_disc_info.discipline_omschrijving) + " " + (bes_bestelling.inclBTW? L("lcl_shared_inclBTW") : L("lcl_shared_exclBTW"))); if (bes_disc_info.isFreeArticle) { FCLTbedrijfselector("lev_key", // Leverancier "sg_lev", - { companyKey: -1, + { companyKey: bes_bestelling.bedrijf_key||-1, label: L("lcl_bes_Supplier"), filtercode: "L", - required: true + required: true, + readonly: bes_bestelling.bedrijf_key > 0 }); RWFIELDTR("srtdeel_nr", "fld", L("lcl_bes_srtdeel_nr"), "", { required: true, maxlength: 32 }); RWFIELDTR("omschrijving", "fld", L("lcl_bes_srtdeel_oms"), "", { required: true, maxlength: 100 }) RWFIELDTR("unit", "fld", L("lcl_bes_unity"), "", { maxlength: 30 }) - RWFIELDTR("price", "fld currency", L("lcl_bes_price_per_unity"), "", { required: true, maxlength: 10 }) + RWFIELDTR("price", "fld currency", L("lcl_bes_price_per_unity"), "", { requiredor0: true, maxlength: 10 }) RWFIELDTR("aantal_text", "fld", L("lcl_bes_amount"), "", { required: true, maxlength: 10 }) %>