__PACKAGE__->register_method(
method => 'retrieve_org_funding_sources',
api_name => 'open-ils.acq.funding_source.org.retrieve',
+ stream => 1,
signature => {
desc => 'Retrieves all the funding_sources associated with an org unit that the requestor has access to see',
params => [
return [] unless @$org_ids;
my $sources = $e->search_acq_funding_source({owner => $org_ids});
- if($$options{flesh_summary}) {
- for my $source (@$sources) {
- $source->summary(retrieve_funding_source_summary_impl($e, $source));
- }
+ for my $source (@$sources) {
+ $source->summary(retrieve_funding_source_summary_impl($e, $source))
+ if $$options{flesh_summary};
+ $conn->respond($source);
}
- return $sources;
+ return undef;
}
sub retrieve_funding_source_summary_impl {
__PACKAGE__->register_method(
method => 'retrieve_org_funds',
api_name => 'open-ils.acq.fund.org.retrieve',
+ stream => 1,
signature => {
desc => 'Retrieves all the funds associated with an org unit',
params => [
return [] unless @$org_ids;
my $funds = $e->search_acq_fund({org => $org_ids});
- if($$options{flesh_summary}) {
- for my $fund (@$funds) {
- $fund->summary(retrieve_fund_summary_impl($e, $fund));
- }
+ for my $fund (@$funds) {
+ $fund->summary(retrieve_fund_summary_impl($e, $fund))
+ if $$options{flesh_summary};
+ $conn->respond($fund);
}
- return $funds;
+ return undef;
}
__PACKAGE__->register_method(
__PACKAGE__->register_method(
method => 'retrieve_org_providers',
api_name => 'open-ils.acq.provider.org.retrieve',
+ stream => 1,
signature => {
desc => 'Retrieves all the providers associated with an org unit that the requestor has access to see',
params => [
$U->find_highest_work_orgs($e, $limit_perm, {descendants =>1});
return [] unless @$org_ids;
- my $sources = $e->search_acq_provider({owner => $org_ids});
+ $conn->respond($_) for @{$e->search_acq_provider({owner => $org_ids})};
- return $sources;
+ return undef;
}