From: Tiffany Little Date: Fri, 16 Dec 2022 20:55:21 +0000 (-0500) Subject: LP1999544 Also fixes fund dropdown in PO charges X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2d86ea932455ba3b98436d878f9995de3b9756eb;p=Evergreen.git LP1999544 Also fixes fund dropdown in PO charges Signed-off-by: Tiffany Little Signed-off-by: John Amundson Signed-off-by: Jason Stephenson --- 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() {