ACQ upload persists fiscal year
authorBill Erickson <berick@esilibrary.com>
Wed, 13 Feb 2013 20:20:37 +0000 (15:20 -0500)
committerBen Shum <bshum@biblio.org>
Thu, 14 Feb 2013 22:43:17 +0000 (17:43 -0500)
Persist the last used value for the fiscal year selector.  As noted in
the code, this is a stop-gap for using the current org unit fiscal year
as a default, which requires additional UI components.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/web/js/ui/default/acq/picklist/upload.js

index 621e1e5..6b85dbc 100644 (file)
@@ -73,6 +73,11 @@ function init2() {
 function setDefaultFiscalYear(org) {
     org = org || orderAgencyWidget.attr('value');
 
+    // NOTE: Evergreen does not yet offer an interface for managing
+    // fiscal years.  For now, make the fiscal year selector persistant
+    vlAgent.readCachedValue(acqUploadYearSelector, 'fiscal_year');
+    return;
+
     if (org) {
 
         fieldmapper.standardRequest(
@@ -95,6 +100,7 @@ function acqUploadRecords() {
     vlAgent.writeCachedValue(acqPlUploadActivatePo, 'activate_po');
     vlAgent.writeCachedValue(providerWidget, 'provider');
     vlAgent.writeCachedValue(orderAgencyWidget, 'ordering_agency');
+    vlAgent.writeCachedValue(acqUploadYearSelector, 'fiscal_year');
 
     openils.Util.show('acq-pl-upload-progress');
     var picklist = acqPlUploadPlSelector.attr('value');