DJIN#57247: DV&O: Zoeken op Persoon in Uitleenregistratie levert nauwelijks resultaten op.
svn path=/Website/branches/v2019.1/; revision=41987
This commit is contained in:
@@ -2224,8 +2224,10 @@ ins = {checkAutLevel:
|
||||
|
||||
}
|
||||
|
||||
if (!hasOwner)
|
||||
{ // Owner filter would imply only owned objects
|
||||
if (!hasOwner || auth_org)
|
||||
{ // Owner filter would imply only owned objects (!hasOwner)
|
||||
// S("ins_auth_obj_lendout") == 1 && fronto && insLentOut => Orginele plaats/eigenaar (ins_alg_ruimte_key_org) is de eigenaar van het object (auth_org).
|
||||
// Deze orginele plaats/eigenaar (ins_alg_ruimte_key_org) kan nu de ingevulde persoon zijn.
|
||||
sqlPosition = "SELECT DISTINCT"
|
||||
+ (terr_key
|
||||
? " t.alg_terreinsector_omschrijving"
|
||||
@@ -2633,12 +2635,19 @@ ins = {checkAutLevel:
|
||||
}
|
||||
}
|
||||
|
||||
if (auth_org && sqlPosition != "" && persoon_key)
|
||||
{
|
||||
sqlPosition_org = "SELECT * FROM (" + sqlPosition_org + ") x WHERE x.ins_alg_ruimte_type = 'P' AND x.alg_ruimte_key = " + persoon_key;
|
||||
}
|
||||
|
||||
sql = (sqlOwner != ""
|
||||
? sqlOwner + (sqlPosition != ""? " UNION ALL " : "")
|
||||
: "")
|
||||
+ sqlPosition
|
||||
+ (!hasOwner
|
||||
? sqlPosition
|
||||
: "")
|
||||
+ (auth_org && sqlPosition != ""
|
||||
? " UNION " + sqlPosition_org
|
||||
? (!hasOwner? " UNION " : "") + sqlPosition_org
|
||||
: "");
|
||||
|
||||
if (inspect)
|
||||
|
||||
Reference in New Issue
Block a user