HSLE#36223 Cateringbestelling extra aanvullingen (tbv goedkeuring)
svn path=/Website/trunk/; revision=30839
This commit is contained in:
@@ -662,6 +662,7 @@ function res_list (pautfunction, params)
|
|||||||
+ ", rec2.res_rsv_ruimte_prijs"
|
+ ", rec2.res_rsv_ruimte_prijs"
|
||||||
+ ", rec2.dirtlevel"
|
+ ", rec2.dirtlevel"
|
||||||
+ ", rec2.res_rsv_ruimte_afgerond"
|
+ ", rec2.res_rsv_ruimte_afgerond"
|
||||||
|
+ ", rec2.approval"
|
||||||
+ ", rec2.waar"
|
+ ", rec2.waar"
|
||||||
+ ", MIN(rec2.datumvan) datumvan"
|
+ ", MIN(rec2.datumvan) datumvan"
|
||||||
+ ", MAX(rec2.datumtot) datumtot"
|
+ ", MAX(rec2.datumtot) datumtot"
|
||||||
@@ -710,7 +711,8 @@ function res_list (pautfunction, params)
|
|||||||
+ ", rec2.res_rsv_ruimte_key"
|
+ ", rec2.res_rsv_ruimte_key"
|
||||||
+ ", rec2.res_srtactiviteit_prefix"
|
+ ", rec2.res_srtactiviteit_prefix"
|
||||||
+ ", rec2.verval"
|
+ ", rec2.verval"
|
||||||
+ ", rec2.res_rsv_ruimte_afgerond";
|
+ ", rec2.res_rsv_ruimte_afgerond"
|
||||||
|
+ ", rec2.approval";
|
||||||
|
|
||||||
if (fronto)
|
if (fronto)
|
||||||
{
|
{
|
||||||
@@ -753,19 +755,26 @@ function res_list (pautfunction, params)
|
|||||||
}
|
}
|
||||||
if (res_tobeapproved)
|
if (res_tobeapproved)
|
||||||
{
|
{
|
||||||
|
switch (S("res_approval"))
|
||||||
|
{
|
||||||
|
case 0: // geen approval
|
||||||
|
break;
|
||||||
|
case 1: // goedkeuren na reserveringdatum
|
||||||
|
approve_sql.push("rec2.res_rsv_ruimte_afgerond = 0"
|
||||||
|
+" AND (rec2.datumtot < TRUNC(SYSDATE, 'DD'))");
|
||||||
|
break;
|
||||||
|
case 2: // goedkeuren na afmelden
|
||||||
approve_sql.push("rec2.res_rsv_ruimte_afgerond = 0"
|
approve_sql.push("rec2.res_rsv_ruimte_afgerond = 0"
|
||||||
+" AND ( (rec2.res_rsv_ruimte_prijs IS NOT NULL AND rec2.res_status_bo_key = 5)"
|
+" AND ( (rec2.res_rsv_ruimte_prijs IS NOT NULL AND rec2.res_status_bo_key = 5)"
|
||||||
+ " OR (rec2.res_rsv_ruimte_prijs IS NULL AND rec2.res_status_bo_key IS NULL))");
|
+ " OR (rec2.res_rsv_ruimte_prijs IS NULL AND rec2.res_status_bo_key IS NULL))");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (res_notapproved) // deze kan weg!!
|
|
||||||
{
|
|
||||||
approve_sql.push("rec2.res_rsv_ruimte_afgerond = 0");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var sqlinside = "WITH " + thePerslid + "," + theResrsv + " " + sqlR + " UNION ALL " + sqlDe + " UNION ALL " + sqlA;
|
var sqlinside = "WITH " + thePerslid + "," + theResrsv + " " + sqlR + " UNION ALL " + sqlDe + " UNION ALL " + sqlA;
|
||||||
// Indien verschillende dirtlevels bij dirty reservering, neem dan het maximum om dubbele regels te voorkomen
|
// Indien verschillende dirtlevels bij dirty reservering, neem dan het maximum om dubbele regels te voorkomen
|
||||||
// Geld hier alleen voor fronto en frontend
|
// Geld hier alleen voor fronto en frontend
|
||||||
sqlinside = " SELECT res_reservering_key"
|
var sql_rec2 = " SELECT res_reservering_key"
|
||||||
+ ", res_reservering_ispool"
|
+ ", res_reservering_ispool"
|
||||||
+ ", res_rsv_ruimte_key"
|
+ ", res_rsv_ruimte_key"
|
||||||
+ ", descr"
|
+ ", descr"
|
||||||
@@ -794,6 +803,24 @@ function res_list (pautfunction, params)
|
|||||||
+ " THEN 1"
|
+ " THEN 1"
|
||||||
+ " ELSE 0"
|
+ " ELSE 0"
|
||||||
+ " END verval"
|
+ " END verval"
|
||||||
|
+ ", CASE"
|
||||||
|
+ " WHEN res_rsv_ruimte_afgerond = 0";
|
||||||
|
|
||||||
|
switch (S("res_approval"))
|
||||||
|
{
|
||||||
|
case 0: // niets aan toevoegen
|
||||||
|
break;
|
||||||
|
case 1: sql_rec2 += " AND (datumtot < TRUNC(SYSDATE, 'DD'))";
|
||||||
|
break;
|
||||||
|
case 2: sql_rec2 += " AND ( (res_rsv_ruimte_prijs IS NOT NULL AND res_status_bo_key = 5)"
|
||||||
|
+ " OR (res_rsv_ruimte_prijs IS NULL AND res_status_bo_key IS NULL)"
|
||||||
|
+ " )";
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
|
||||||
|
sql_rec2 += " THEN 1"
|
||||||
|
+ " ELSE 0"
|
||||||
|
+ " END approval"
|
||||||
+ " FROM (" + sqlinside + ")"
|
+ " FROM (" + sqlinside + ")"
|
||||||
+ " GROUP BY res_reservering_key"
|
+ " GROUP BY res_reservering_key"
|
||||||
+ ", res_reservering_ispool"
|
+ ", res_reservering_ispool"
|
||||||
@@ -829,7 +856,7 @@ function res_list (pautfunction, params)
|
|||||||
+ " AND sn.fac_srtnotificatie_xmlnode = 'reservering') recentdatum";
|
+ " AND sn.fac_srtnotificatie_xmlnode = 'reservering') recentdatum";
|
||||||
|
|
||||||
sql = "SELECT " + sql_select + sqltrack
|
sql = "SELECT " + sql_select + sqltrack
|
||||||
+ " FROM (" + sqlinside + ") rec2"
|
+ " FROM (" + sql_rec2 + ") rec2"
|
||||||
+ " WHERE 1=1 "
|
+ " WHERE 1=1 "
|
||||||
+ (!res_key && approve_sql.length > 0 ? " AND (" + approve_sql.join(" OR ") + ")" : "")
|
+ (!res_key && approve_sql.length > 0 ? " AND (" + approve_sql.join(" OR ") + ")" : "")
|
||||||
|
|
||||||
@@ -1007,7 +1034,7 @@ function res_list (pautfunction, params)
|
|||||||
rst.addColumn(new Column({caption: L("lcl_res_requestor"), content: fncolHostRequestor, combine: (S("res_allow_for_others")?true:false)}));
|
rst.addColumn(new Column({caption: L("lcl_res_requestor"), content: fncolHostRequestor, combine: (S("res_allow_for_others")?true:false)}));
|
||||||
rst.addColumn(new Column({caption: L("lcl_descr"), content: "descr"}));
|
rst.addColumn(new Column({caption: L("lcl_descr"), content: "descr"}));
|
||||||
if (S("res_approval") > 0)
|
if (S("res_approval") > 0)
|
||||||
rst.addColumn(new Column({caption: L("lcl_res_approved"), content: fncolResApproved}));
|
rst.addColumn(new Column({caption: L("lcl_res_approval"), content: fncolResApproved}));
|
||||||
|
|
||||||
// Acties
|
// Acties
|
||||||
rst.addAction({ action: "resEdit", caption: L("lcl_edit"), isDefault: true});
|
rst.addAction({ action: "resEdit", caption: L("lcl_edit"), isDefault: true});
|
||||||
@@ -2180,7 +2207,23 @@ function res_list (pautfunction, params)
|
|||||||
|
|
||||||
function fncolResApproved(oRs)
|
function fncolResApproved(oRs)
|
||||||
{
|
{
|
||||||
return oRs("res_rsv_ruimte_afgerond").Value == 1? L("lcl_Yes") : ""
|
var approved_txt = "";
|
||||||
|
if (oRs("res_rsv_ruimte_afgerond").Value == 1)
|
||||||
|
{
|
||||||
|
approved_txt = L("lcl_res_resappr");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (frontend)
|
||||||
|
{
|
||||||
|
if (oRs("approval").Value == 1)
|
||||||
|
approved_txt = L("lcl_res_tobeapproved");
|
||||||
|
//else 'nog niet goed te keuren'
|
||||||
|
}
|
||||||
|
else
|
||||||
|
approved_txt = L("lcl_res_notapproved");
|
||||||
|
}
|
||||||
|
return approved_txt;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@@ -2250,7 +2293,7 @@ function res_list (pautfunction, params)
|
|||||||
if (outputmode != 0)
|
if (outputmode != 0)
|
||||||
rst.addColumn(new Column({caption: L("lcl_activity"), content: "res_activiteit_omschrijving"}));
|
rst.addColumn(new Column({caption: L("lcl_activity"), content: "res_activiteit_omschrijving"}));
|
||||||
if (S("res_approval") > 0)
|
if (S("res_approval") > 0)
|
||||||
rst.addColumn(new Column({caption: L("lcl_res_approved"), content: fncolResApproved}));
|
rst.addColumn(new Column({caption: L("lcl_res_approval"), content: fncolResApproved}));
|
||||||
|
|
||||||
// Acties
|
// Acties
|
||||||
rst.addAction({action: "resEdit", caption: L("lcl_edit"), isDefault: true});
|
rst.addAction({action: "resEdit", caption: L("lcl_edit"), isDefault: true});
|
||||||
|
|||||||
@@ -132,9 +132,9 @@ var res_closed = (getFParamInt("res_closed", (minfo? 1 : 0)) == 1); // Standaard
|
|||||||
if (!res_open && !res_closed)
|
if (!res_open && !res_closed)
|
||||||
res_open = true;
|
res_open = true;
|
||||||
|
|
||||||
var res_approved = getFParamInt("res_approved", 1); // Standaard aangevinkt.
|
var res_approved = getFParamInt("res_approved", (frontend?0:1)); // Standaard aangevinkt (frontend uit).
|
||||||
var res_notapproved = getFParamInt("res_notapproved", 1); // Standaard aangevinkt.
|
var res_notapproved = getFParamInt("res_notapproved", 1); // Standaard aangevinkt.
|
||||||
var res_tobeapproved = getFParamInt("res_tobeapproved", 1); // Standaard aangevinkt.
|
var res_tobeapproved = getFParamInt("res_tobeapproved", (frontend?0:1)); // Standaard aangevinkt (frontend uit).
|
||||||
// minimaal <20><>n van beiden moet aangekruist zijn
|
// minimaal <20><>n van beiden moet aangekruist zijn
|
||||||
if (!res_approved && !res_notapproved)
|
if (!res_approved && !res_notapproved)
|
||||||
res_approved = true;
|
res_approved = true;
|
||||||
@@ -669,20 +669,20 @@ var authparams = user.checkAutorisation(autfunction);
|
|||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<input type="checkbox" class="fldresnotapproved" name="res_notapproved" id="res_notapproved" onClick="checkCheckboxes();" value="1" <%=res_notapproved? "checked" : ""%>>
|
<input type="checkbox" class="fldresnotapproved" name="res_notapproved" id="res_notapproved" onClick="checkCheckboxes();" value="1" <%=res_notapproved? "checked" : ""%>>
|
||||||
<label for="closed"><%=L("lcl_res_notapproved")%></label>
|
<label for="res_notapproved"><%=L("lcl_res_notapproved")%></label>
|
||||||
<% }
|
<% }
|
||||||
if (frontend)
|
if (frontend)
|
||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<input type="checkbox" class="fldresnotapproved" name="res_tobeapproved" id="res_tobeapproved" onClick="checkCheckboxes();" value="1" <%=res_tobeapproved? "checked" : ""%>>
|
<input type="checkbox" class="fldresnotapproved" name="res_tobeapproved" id="res_tobeapproved" onClick="checkCheckboxes();" value="1" <%=res_tobeapproved? "checked" : ""%>>
|
||||||
<label for="closed""><%=L("lcl_res_tobeapproved")%></label>
|
<label for="res_tobeapproved"><%=L("lcl_res_tobeapproved")%></label>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
if (backo || minfo || frontend)
|
if (backo || minfo || frontend)
|
||||||
{
|
{
|
||||||
%>
|
%>
|
||||||
<input type="checkbox" class="fldresapproved" name="res_approved" id="res_approved" onClick="checkCheckboxes();" value="1" <%=res_approved? "checked" : ""%>>
|
<input type="checkbox" class="fldresapproved" name="res_approved" id="res_approved" onClick="checkCheckboxes();" value="1" <%=res_approved? "checked" : ""%>>
|
||||||
<label for="closed"><%=L("lcl_res_approved")%></label>
|
<label for="res_approved"><%=L("lcl_res_approved")%></label>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
|||||||
Reference in New Issue
Block a user