From: Galen Charlton Date: Thu, 13 Jan 2022 23:02:41 +0000 (-0500) Subject: LP#1929749: fix handling of match set and fiscal year X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c4b0cb0ed63c24050e54b44a612186ea0d40900e;p=working%2FEvergreen.git LP#1929749: fix handling of match set and fiscal year Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts index b35b886dd7..3b797b7190 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/picklist/upload.component.ts @@ -374,9 +374,21 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { ); } + // helper method to return the year string rather than the FY ID + // TODO: can remove this once fiscal years are better managed + _getFiscalYearLabel(): string { + if (this.selectedFiscalYear) { + const found = (this.vlagent.fiscalYears || []).find(x => x.id() === this.selectedFiscalYear); + return found ? found.year() : ''; + } else { + return ''; + } + } + performCustomAction() { const vandelayOptions = { + match_set: this.selectedMatchSet, import_no_match: this.importNonMatching, auto_overlay_exact: this.mergeOnExact, auto_overlay_best_match: this.mergeOnBestMatch, @@ -394,7 +406,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { ordering_agency: this.orderingAgency, create_po: this.createPurchaseOrder, activate_po: this.activatePurchaseOrder, - fiscal_year: this.selectedFiscalYear, + fiscal_year: this._getFiscalYearLabel(), picklist: this.activeSelectionListId, vandelay: vandelayOptions }; @@ -504,6 +516,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { const spoolType = this.recordType; const vandelayOptions = { + match_set: this.selectedMatchSet, import_no_match: this.importNonMatching, auto_overlay_exact: this.mergeOnExact, auto_overlay_best_match: this.mergeOnBestMatch, @@ -521,7 +534,7 @@ export class UploadComponent implements OnInit, AfterViewInit, OnDestroy { ordering_agency: this.orderingAgency, create_po: this.createPurchaseOrder, activate_po: this.activatePurchaseOrder, - fiscal_year: this.selectedFiscalYear, + fiscal_year: this._getFiscalYearLabel(), picklist: this.activeSelectionListId, vandelay: vandelayOptions };