funds: conditionally display the "Limit Fiscal Year Close-Out to Encumbrance" checkbox
authorGalen Charlton <gmc@equinoxOLI.org>
Wed, 2 Jun 2021 21:05:14 +0000 (17:05 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 2 Jun 2021 21:05:14 +0000 (17:05 -0400)
This now displays only when the Limit Fiscal Year Close-Out to Encumbrances
library setting is active.

LH#20, LH#53

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-rollover-dialog.component.html
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-rollover-dialog.component.ts

index 1850ea1..c22132a 100644 (file)
@@ -41,7 +41,7 @@
         <eg-help-popover helpText="Perform Fiscal Year Close-Out moves encumbrances to the corresponding fund for the next fiscal year and deactivates funds for the selected fiscal year. If funds have the Rollover setting enabled, all unspect money will also be moved to the corresponding fund for the next fiscal year." i18n-helpText></eg-help-popover>
         <span class="alert-warning" *ngIf="doCloseout && !dryRun">Will do a Close-Out for real. If you need to double-check first, check the "Dry Run" checkbox.</span>
       </div>
-      <div class="offset-sm-1 form-check">
+      <div class="offset-sm-1 form-check" *ngIf="showEncumbOnly">
         <input type="checkbox" name="limitToEncumbrances" id="limitToEncumbrances"
           class="form-check-input"
           [(ngModel)]="limitToEncumbrances">
index 4aec6e5..ca5778b 100644 (file)
@@ -38,6 +38,7 @@ export class FundRolloverDialogComponent
     includeDescendants = false;
     propagateFunds = false;
     doCloseout = false;
+    showEncumbOnly = false;
     limitToEncumbrances = false;
     dryRun = true;
     contextOrg: IdlObject;
@@ -94,6 +95,10 @@ export class FundRolloverDialogComponent
                 this.year = maxYear;
             }
         );
+        this.showEncumbOnly = false;
+        this.org.settings('acq.fund.allow_rollover_without_money', this.contextOrgId).then((ous) => {
+            this.showEncumbOnly = ous['acq.fund.allow_rollover_without_money'];
+        });
     }
 
     rollover() {