From 3a17e034f79539934fb38ae7d1508c3412bb64f2 Mon Sep 17 00:00:00 2001 From: Tiffany Little Date: Fri, 16 Dec 2022 15:55:21 -0500 Subject: [PATCH] LP1999544 Also fixes fund dropdown in PO charges Signed-off-by: Tiffany Little Signed-off-by: John Amundson Signed-off-by: Jason Stephenson --- Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.html | 4 ++-- Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.html b/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.html index 9ecff20d80..ad84b16f0f 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.html @@ -33,7 +33,7 @@ [asyncSupportsEmptyTermClick]="true" [required]="true" [readOnly]="!charge.isnew() && !charge.ischanged()" [idlQuerySort]="{acqf: 'year DESC, code'}" - [idlQueryAnd]="{active: 't'}"> + [idlQueryAnd]="{org: owners, active: 't'}">
@@ -63,7 +63,7 @@
{{charge.estimated_cost() | currency}}
diff --git a/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.ts index d38f54b802..25fc6360da 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.ts @@ -2,6 +2,7 @@ import {Component, OnInit, OnDestroy, Input, ViewChild} from '@angular/core'; import {Subscription} from 'rxjs'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; import {IdlService, IdlObject} from '@eg/core/idl.service'; +import {OrgService} from '@eg/core/org.service'; import {AuthService} from '@eg/core/auth.service'; import {NetService} from '@eg/core/net.service'; import {EventService} from '@eg/core/event.service'; @@ -20,6 +21,7 @@ export class PoChargesComponent implements OnInit, OnDestroy { canModify = false; autoId = -1; poSubscription: Subscription; + owners: number[]; @ViewChild('disencumberChargeDialog') disencumberChargeDialog: DisencumberChargeDialogComponent; @@ -29,6 +31,7 @@ export class PoChargesComponent implements OnInit, OnDestroy { private evt: EventService, private auth: AuthService, private pcrud: PcrudService, + private org: OrgService, public poService: PoService ) {} @@ -44,6 +47,8 @@ export class PoChargesComponent implements OnInit, OnDestroy { this.showBody = this.po().po_items().length > 0; this.canModify = this.po().order_date() ? false : true; }); + + this.owners = this.org.ancestors(this.auth.user().ws_ou(), true); } ngOnDestroy() { -- 2.11.0