AKZA#31849: BEZ: rekening houden met gekoppelde locatie contactpersoon/bedrijf.
svn path=/Website/trunk/; revision=24718
This commit is contained in:
@@ -103,7 +103,7 @@ else // nieuwe bestelling. Defaults bepalen
|
||||
+ " WHERE bd.ins_discipline_key = bsg.ins_discipline_key(+)" // Artikelcatalogi (Discipline) hoeft geen artikelgroep (srtgroep) te hebben. Maar dan kan er ook niets besteld worden.
|
||||
+ " AND bd.ins_discipline_key = " + bes_bestelling.dis_key;
|
||||
oRs = Oracle.Execute(sql);
|
||||
bes_bestelling.inclBTW = (!oRs.eof? oRs("inclBTW").value : 0);
|
||||
bes_bestelling.inclBTW = oRs("inclBTW").Value || 0; // Met MAX() is er altijd een waarde aanwezig, ook al kan deze null zijn.
|
||||
oRs.Close();
|
||||
|
||||
var bes_disc_info = bes.disc_info(dis_key, autfunction); // alle discipline informatie
|
||||
|
||||
@@ -127,10 +127,10 @@ else
|
||||
var bez_afspraak = bez.bez_afspraak_info(afspr_key);
|
||||
}
|
||||
var titel = "";
|
||||
if (S("bez_sel_contactpersoon") == 1 && S("bez_sel_internpersoon") == 1)
|
||||
if (S("bez_sel_contactpersoon") > 0 && S("bez_sel_internpersoon") == 1)
|
||||
titel = L("lcl_bez_select_cntprsbezoeker");
|
||||
else
|
||||
if (S("bez_sel_contactpersoon") == 1)
|
||||
if (S("bez_sel_contactpersoon") > 0)
|
||||
titel = L("lcl_bez_select_cntbezoeker");
|
||||
else
|
||||
titel = L("lcl_bez_select_prsbezoeker");
|
||||
|
||||
@@ -103,6 +103,24 @@ function get_freeprk_info()
|
||||
|
||||
function onChangeLocatie()
|
||||
{
|
||||
// Met contactonly zijn de invoervelden geforceerde contactpersoon-suggest velden.
|
||||
// Als de contactpersonen afhankelijk zijn van de locatie moeten de velden leeg worden gemaakt als de locatie is gewijzigd.
|
||||
if (contactonly && bez_sel_contactpersoon == 2)
|
||||
{ // Contactpersoon suggest velden leegmaken.
|
||||
var next_vis = $("#next_vis").val();
|
||||
for (var i = 1; i < next_vis; i++)
|
||||
{ // Maak de contactpersoon suggestboxen leeg
|
||||
// setValue(key, txt, doonChange, checkExist, extraParam, lastTry)
|
||||
window["sgContactPerson" + i].setValue(-1, "", false, false, null, true);
|
||||
}
|
||||
// Als de locatie leeg is moeten de velden ook readonly gemaakt worden.
|
||||
// Invullen heeft dan geen zin omdat de velden toch weer leeg gemaakt worden als de locatie wordt ingvuld.
|
||||
if ($("#locatiekey").val() == -1)
|
||||
$("input[name^='bez']").prop("disabled", true);
|
||||
else
|
||||
$("input[name^='bez']").prop("disabled", false);
|
||||
}
|
||||
|
||||
if ($("#locatiekey").val() == -1)
|
||||
{ // Als suggest velden voor parkeertereinen dan deze leegmaken en checkboxvinkjes ook
|
||||
var next_vis = $("#next_vis").val();
|
||||
@@ -475,7 +493,8 @@ function makeContactSuggest()
|
||||
keyField: $("#contkey" + rowNr)[0], // of $("#prskey" + rowNr)
|
||||
highlightDescript: true,
|
||||
extraParamField: $("#bed" + rowNr)[0],
|
||||
initExtraParam: ""
|
||||
initExtraParam: "",
|
||||
urlAdd: (bez_sel_contactpersoon == 2? [{urlParam: "loc_key", field: "locatiekey"}] : null) // Contactpersoon afhankelijk van locatie?
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -89,10 +89,10 @@ var fronto = urole == "fo"; // DEPRECATED
|
||||
var backo = urole == "bo";
|
||||
|
||||
var titel = "";
|
||||
if (S("bez_sel_contactpersoon") == 1 && S("bez_sel_internpersoon") == 1)
|
||||
if (S("bez_sel_contactpersoon") > 0 && S("bez_sel_internpersoon") == 1)
|
||||
titel = L("lcl_bez_select_cntprsbezoeker");
|
||||
else
|
||||
if (S("bez_sel_contactpersoon") == 1)
|
||||
if (S("bez_sel_contactpersoon") > 0)
|
||||
titel = L("lcl_bez_select_cntbezoeker");
|
||||
else
|
||||
titel = L("lcl_bez_select_prsbezoeker");
|
||||
|
||||
@@ -44,7 +44,7 @@ function bez_edit_bezoekers(afspraak_key, afspraak_begin, afspraak_eind, loc_key
|
||||
<table id="vis_tab" style="white-space: nowrap"> <!--kenmerken achter bezoeker op 1 regel -->
|
||||
<tr>
|
||||
<th><!--delete--></th>
|
||||
<% if (!params.contactonly && (S("bez_sel_contactpersoon") == 1 || S("bez_sel_internpersoon") == 1))
|
||||
<% if (!params.contactonly && (S("bez_sel_contactpersoon") > 0 || S("bez_sel_internpersoon") == 1))
|
||||
{ %>
|
||||
<th><!--contact--></th>
|
||||
<% } %>
|
||||
@@ -136,18 +136,18 @@ function bez_edit_bezoekers(afspraak_key, afspraak_begin, afspraak_eind, loc_key
|
||||
<input type="hidden" name="prskey<%=next_vis%>" id="prskey<%=next_vis%>"
|
||||
value="<%=oRs("prs_perslid_key").Value||-1%>" >
|
||||
</td>
|
||||
<% if (!params.contactonly && (S("bez_sel_contactpersoon") == 1 || S("bez_sel_internpersoon") == 1))
|
||||
<% if (!params.contactonly && (S("bez_sel_contactpersoon") > 0 || S("bez_sel_internpersoon") == 1))
|
||||
{ %>
|
||||
<td><img src="../Pictures/bezcontact.png" class="ilbutton" title="<%=titel%>" onclick=selectPerson(<%=next_vis%>)></td>
|
||||
<% } %>
|
||||
<td>
|
||||
<% /* ContactpersoonBedrijfSelected laadt nieuwe flexkenmerken en bijbehorende verplichte flexkenmerk bij personen zorgen er ook voor dat personen eventueel verplicht wordt [checkRequiredGroup("10S" + params.suggestid.substr(3))]; */ %>
|
||||
<% RWFIELD("bez" + next_vis, "fld", "", oRs("bez_afspraak_naam").Value,
|
||||
{ maxlength:"30", readonly: (oRs("prs_contactpersoon_key").Value != null || oRs("prs_perslid_key").Value != null), html: (params.contactonly? "sgonChange='ContactpersoonBedrijfSelected'" : 'onChange="checkRequiredGroup(\'10S' + next_vis + '\')"') }) %>
|
||||
{ maxlength: "30", readonly: (oRs("prs_contactpersoon_key").Value != null || oRs("prs_perslid_key").Value != null), html: (params.contactonly? "sgonChange='ContactpersoonBedrijfSelected'" : 'onChange="checkRequiredGroup(\'10S' + next_vis + '\')"') }) %>
|
||||
</td>
|
||||
<td>
|
||||
<% RWFIELD("bed" + next_vis, "fld", "", oRs("bez_afspraak_bedrijf").Value,
|
||||
{ maxlength:"60", readonly: (oRs("prs_contactpersoon_key").Value != null || oRs("prs_perslid_key").Value != null), html: (params.contactonly? "sgonChange='ContactpersoonBedrijfSelected'" : '') } ) %>
|
||||
{ maxlength: "60", readonly: (oRs("prs_contactpersoon_key").Value != null || oRs("prs_perslid_key").Value != null), html: (params.contactonly? "sgonChange='ContactpersoonBedrijfSelected'" : '') } ) %>
|
||||
</td>
|
||||
<td>
|
||||
<!--Gebouw/Terrein-->
|
||||
@@ -197,7 +197,7 @@ function bez_edit_bezoekers(afspraak_key, afspraak_begin, afspraak_eind, loc_key
|
||||
} %>
|
||||
</tr>
|
||||
<tr id="trbez<%=next_vis%>flex"><td></td>
|
||||
<% if (!params.contactonly && (S("bez_sel_contactpersoon") == 1 || S("bez_sel_internpersoon") == 1))
|
||||
<% if (!params.contactonly && (S("bez_sel_contactpersoon") > 0 || S("bez_sel_internpersoon") == 1))
|
||||
{ %>
|
||||
<td></td>
|
||||
<% } %>
|
||||
@@ -247,8 +247,9 @@ function bez_edit_bezoekers(afspraak_key, afspraak_begin, afspraak_eind, loc_key
|
||||
var vis_parking_key = <%=S("vis_parking_key")%>;
|
||||
var canWritePrk = <%=this_bez.canWritePrk? 1 : 0%> == 1;
|
||||
var contactonly = <%=params.contactonly? 1 : 0%> == 1;
|
||||
var bez_sel_contactpersoon = <%=S("bez_sel_contactpersoon")%>;
|
||||
// Aantal kolommen zonder de flexkenmerken.
|
||||
var aantal_std_td = 4 + <%=(!params.contactonly && (S("bez_sel_contactpersoon") == 1 || S("bez_sel_internpersoon") == 1))? 1 : 0%> + <%=(S("vis_bo_uses_badgenrs") == 1)? 1 : 0%>;
|
||||
var aantal_std_td = 4 + <%=(!params.contactonly && (S("bez_sel_contactpersoon") > 0 || S("bez_sel_internpersoon") == 1))? 1 : 0%> + <%=(S("vis_bo_uses_badgenrs") == 1)? 1 : 0%>;
|
||||
|
||||
<% if (params.contactonly) { /* automatisch contactpersonificeren */ %>
|
||||
makeContactSuggest();
|
||||
@@ -278,14 +279,14 @@ function bez_edit_bezoekers(afspraak_key, afspraak_begin, afspraak_eind, loc_key
|
||||
ih = $("#vis_tab")[0].insertRow(-1);
|
||||
ih.id = 'trbez' + next_vis;
|
||||
var newHTML = '<img src="../Pictures/delete.png" class="ilbutton" title="<%=L("lcl_delete")%>" OnClick="deleteVisit(' + next_vis + ')">';
|
||||
<% if (S("bez_sel_contactpersoon") == 1) { %>
|
||||
<% if (S("bez_sel_contactpersoon") > 0) { %>
|
||||
newHTML += '<input type="hidden" name="contkey' + next_vis + '" id="contkey' + next_vis + '" value="-1">'
|
||||
<% } %>
|
||||
<% if (S("bez_sel_internpersoon") == 1) { %>
|
||||
newHTML += '<input type="hidden" name="prskey' + next_vis + '" id="prskey' + next_vis + '" value="-1">'
|
||||
<% } %>
|
||||
ih.insertCell(-1).innerHTML = newHTML;
|
||||
<% if (!params.contactonly && (S("bez_sel_contactpersoon") == 1 || S("bez_sel_internpersoon") == 1))
|
||||
<% if (!params.contactonly && (S("bez_sel_contactpersoon") > 0 || S("bez_sel_internpersoon") == 1))
|
||||
{ %>
|
||||
ih.insertCell(-1).innerHTML = '<img src="../Pictures/bezcontact.png" class="ilbutton" title="<%=titel%>" OnClick=selectPerson(' + next_vis + ')>';
|
||||
<% } %>
|
||||
@@ -308,7 +309,7 @@ function bez_edit_bezoekers(afspraak_key, afspraak_begin, afspraak_eind, loc_key
|
||||
ih = $("#vis_tab")[0].insertRow(-1);
|
||||
ih.id = "trbez" + next_vis + "flex";
|
||||
ih.insertCell(-1).innerHTML = "";
|
||||
<% if (!params.contactonly && (S("bez_sel_contactpersoon") == 1 || S("bez_sel_internpersoon") == 1))
|
||||
<% if (!params.contactonly && (S("bez_sel_contactpersoon") > 0 || S("bez_sel_internpersoon") == 1))
|
||||
{ %>
|
||||
ih.insertCell(-1).innerHTML = "";
|
||||
<% } %>
|
||||
|
||||
@@ -78,12 +78,12 @@ function generateFlexKenmerkCode(params)
|
||||
"BEZ", // Module
|
||||
bez_key,
|
||||
{ flexcolumns: flexcolumns,
|
||||
label_colspan: notr? null : (params.mobile? 1 : (S("bez_sel_contactpersoon") || S("bez_sel_internpersoon")? 3 : 2)),
|
||||
label_colspan: notr? null : (params.mobile? 1 : (S("bez_sel_contactpersoon") > 0 || S("bez_sel_internpersoon")? 3 : 2)),
|
||||
kenmerk_search: advanced,
|
||||
fnIsReadonly: isReadonly,
|
||||
prs_key: prs_key, // Wordt alleen gebruikt als geldt (!kenmerk_search && !multiMode)
|
||||
cont_key: cont_key, // Wordt alleen gebruikt als geldt (!kenmerk_search && !multiMode)
|
||||
hideVervallen: bez_key<0,
|
||||
hideVervallen: bez_key < 0,
|
||||
nameprefix: "flex" + beznum + "_",
|
||||
mobile: params.mobile,
|
||||
requiredbyfield: requiredbyfield,
|
||||
|
||||
Reference in New Issue
Block a user