From: Galen Charlton Date: Tue, 14 Dec 2021 01:36:16 +0000 (-0500) Subject: LP#1942220: add flesh_po_items_further option to PO retrieval X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4b0b351f939a33ca1afd25f5171a06195a0c400c;p=working%2FEvergreen.git LP#1942220: add flesh_po_items_further option to PO retrieval This fleshes in any fund debits and debit invoice items associated with PO direct charges Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Financials.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Financials.pm index bc273386c6..f5680f2ccb 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Financials.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Financials.pm @@ -1026,6 +1026,11 @@ sub retrieve_purchase_order_impl { } push (@{$flesh->{flesh_fields}->{acqpo}}, 'po_items') if $options->{flesh_po_items}; + if ($options->{flesh_po_items_further}) { + push (@{$flesh->{flesh_fields}->{acqpoi}}, 'fund_debit'); + push (@{$flesh->{flesh_fields}->{acqfdeb}}, 'invoice_items'); + $flesh->{'flesh'} = 3; + } my $args = (@{$flesh->{"flesh_fields"}->{"acqpo"}}) ? [$po_id, $flesh] : $po_id;