LP#1929749: add two additional fleshing options to LI retrieval
authorGalen Charlton <gmc@equinoxOLI.org>
Sat, 5 Feb 2022 17:30:45 +0000 (12:30 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Sat, 5 Feb 2022 17:30:45 +0000 (12:30 -0500)
Specifically, flesh_copy_location and flesh_call_number. These take
effect only when flesh_copies is also true and are used to further
flesh values of items attached to line item details.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Lineitem.pm

index 88a0f04..45d62f8 100644 (file)
@@ -188,7 +188,11 @@ sub retrieve_lineitem_impl {
         push(@{$fields->{acqlid}}, 'cancel_reason') if $$options{flesh_cancel_reason};
         push(@{$fields->{acqlid}}, 'circ_modifier') if $$options{flesh_circ_modifier};
         push(@{$fields->{acqlid}}, 'location')      if $$options{flesh_location};
-        push(@{$fields->{acqlid}}, 'eg_copy_id')    if $$options{flesh_copies};
+        if ($$options{flesh_copies}) {
+            push(@{$fields->{acqlid}}, 'eg_copy_id');
+            push(@{$fields->{acp}},    'call_number') if $$options{flesh_call_number};
+            push(@{$fields->{acp}},    'location')    if $$options{flesh_copy_location};
+        }
         push(@{$fields->{acqlid}}, 'receiver')      if $$options{flesh_li_details_receiver};
     }