From: erickson Date: Sat, 3 Apr 2010 20:46:54 +0000 (+0000) Subject: related items now returns LI's that may be attached to a selection lists only (no po) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e39dace7d6cc8639f204ccd09896991d7bbe5823;p=evergreen%2Fbjwebb.git related items now returns LI's that may be attached to a selection lists only (no po) git-svn-id: svn://svn.open-ils.org/ILS/trunk@16119 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm index e050fee6d..6f840d2b9 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm @@ -315,13 +315,12 @@ sub lineitems_related_by_bib { my $query = { "select"=>{"jub"=>["id"]}, - "from"=>{"jub"=>"acqpo"}, + "from"=>{"jub" => {"acqpo" => {type => 'left'}, "acqpl" => {type => 'left'}}}, "where"=>{ - "+acqpo"=>{ - "ordering_agency"=>{ - "in"=>$perm_orgs - } - } + '-or' => [ + { "+acqpo"=>{ "ordering_agency" => $perm_orgs } }, + { '+acqpl' => { org_unit => $perm_orgs } } + ] }, "order_by"=>[{"class"=>"jub", "field"=>"create_time", "direction"=>"desc"}] };