DJIN#38020 rechten worden nu goed nagekeken alvorens te deleten ( ook detail scherm nu consistent met inline en multi acties )
svn path=/Website/trunk/; revision=32763
This commit is contained in:
@@ -312,7 +312,7 @@ bez =
|
||||
var rsv_ruimte_key = -1;
|
||||
var aantaldone = 0;
|
||||
var aantalnotout = 0;
|
||||
|
||||
var tVan, tExpire = 0;
|
||||
if (afspr_key > 0)
|
||||
{
|
||||
var sql = "SELECT a.bez_afspraak_host_key"
|
||||
@@ -320,7 +320,9 @@ bez =
|
||||
+ " , a.alg_onrgoed_keys"
|
||||
+ " , a.prs_perslid_key"
|
||||
+ " , a.res_rsv_ruimte_key"
|
||||
+ " , SUM (CASE WHEN b.bez_bezoekers_done IS NOT NULL THEN 1 ELSE 0 END) aantaldone"
|
||||
+ " , a.bez_afspraak_datum AS tVan"
|
||||
+ " , fac.DatumTijdPlusUitvoerTijd (SYSDATE, " + S("vis_expire") + ", 'DAGEN') AS tExpire"
|
||||
+ " , COUNT (b.bez_bezoekers_done) AS aantaldone"
|
||||
+ " , SUM (CASE WHEN b.bez_bezoekers_out IS NULL THEN 1 ELSE 0 END) aantalnotout"
|
||||
+ " FROM bez_afspraak a"
|
||||
+ " , bez_bezoekers b"
|
||||
@@ -330,7 +332,8 @@ bez =
|
||||
+ " , a.bez_afspraak_contact_key"
|
||||
+ " , a.alg_onrgoed_keys"
|
||||
+ " , a.prs_perslid_key"
|
||||
+ " , a.res_rsv_ruimte_key";
|
||||
+ " , a.res_rsv_ruimte_key"
|
||||
+ " , a.bez_afspraak_datum";
|
||||
var oRs = Oracle.Execute(sql);
|
||||
if (oRs.eof)
|
||||
shared.record_not_found("<!--" + afspr_key + "-->");
|
||||
@@ -339,6 +342,8 @@ bez =
|
||||
contact_key = oRs("bez_afspraak_contact_key").Value;
|
||||
alg_key = oRs("alg_onrgoed_keys").Value;
|
||||
rsv_ruimte_key = oRs("res_rsv_ruimte_key").Value;
|
||||
tVan = oRs("tVan").Value;
|
||||
tExpire = oRs("tExpire").Value;
|
||||
aantaldone = oRs("aantaldone").Value;
|
||||
aantalnotout = oRs("aantalnotout").Value;
|
||||
oRs.Close();
|
||||
@@ -356,7 +361,8 @@ bez =
|
||||
// Als alle bezoekers zijn uitgecheckt, dan mag de afspraak niet meer gewijzigd worden.
|
||||
bresult.canChange = (bresult.canWrite("WEB_BEZFOF") || bresult.canWrite("WEB_BEZBOF") || bresult.canWrite("WEB_BEZUSE")) && aantalnotout > 0;
|
||||
// Als er bezoekers zijn binnen geboekt, dan mag de afspraak niet meer verwijderd worden.
|
||||
bresult.canDelete = (bresult.canWrite("WEB_BEZFOF") || bresult.canWrite("WEB_BEZBOF") || bresult.canWrite("WEB_BEZUSE")) && aantaldone == 0;
|
||||
bresult.canDelete = (bresult.canWrite("WEB_BEZFOF") || bresult.canWrite("WEB_BEZBOF") || bresult.canWrite("WEB_BEZUSE"))
|
||||
&& (bresult.canWrite("WEB_BEZFOF") || (tVan > tExpire)) && aantaldone == 0;
|
||||
|
||||
// Als er parkeerplaatsen aanzitten die PAF nodig hebben gelden soms andere regels
|
||||
sql = "SELECT count(*) aantal"
|
||||
|
||||
Reference in New Issue
Block a user