From e39dace7d6cc8639f204ccd09896991d7bbe5823 Mon Sep 17 00:00:00 2001 From: erickson Date: Sat, 3 Apr 2010 20:46:54 +0000 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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"}] }; -- 2.11.0