]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-rollover-dialog.component.html
LP#1904244: Angular funds interface
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / admin / acq / funds / fund-rollover-dialog.component.html
1 <eg-string #successString i18n-text text="Rollover Succeeded"></eg-string>
2 <eg-string #updateFailedString i18n-text text="Rollover Failed"></eg-string>
3
4 <ng-template #dialogContent>
5   <div class="modal-header bg-info" *ngIf="doneLoading">
6     <h3 class="modal-title" i18n>Fund Propagation and Rollover</h3>
7     <button type="button" class="close"
8       [disabled]="isProcessing"
9       i18n-aria-label aria-label="Close" (click)="close()">
10       <span aria-hidden="true">&times;</span>
11     </button>
12   </div>
13   <div class="modal-body" [hidden]="!doneLoading">
14     <form #rolloverForm="ngForm" role="form" class="form-validated">
15       <div class="row col">
16         <label for="year" class="my-1 mr-1" i18n>Year</label>
17         <eg-combobox [entries]="years" *ngIf="years"
18           [required]="true" [selectedId]="year"
19           (onChange)="year = $event ? $event.id : null">
20         </eg-combobox> 
21       </div>    
22       <div class="row col mt-3" i18n>Context Org Unit: {{contextOrg?.shortname()}}</div>
23       <div class="form-check offset-sm-1 mt-1">
24         <input type="checkbox" name="includeDescendants" id="includeDescendants"
25           class="form-check-input"
26           [(ngModel)]="includeDescendants">
27         <label for="includeDescendants" class="form-check-label" i18n>Include funds from descendant Org Units</label>
28       </div>
29       <hr>
30       <h4 i18n>Fund Propagation</h4>
31       <p i18n>
32         Propagation creates new funds for the next fiscal year. Propagating funds will not affect the money or
33         encumbrances in the funds unless Fiscal Year Close-Out is also done. Only funds that have the Propagate
34         setting enabled will be affected.
35       </p>
36       <p i18n>
37         Funds set to propagate will do so automatically when you click <b>Process</b>.
38       </p>
39       <hr>
40       <h4 i81n>Rollover and Close-Out</h4>
41       <div class="form-check">
42         <input type="checkbox" name="doCloseout" id="doCloseout"
43           class="form-check-input"
44           [(ngModel)]="doCloseout">
45         <label for="doCloseout" class="form-check-label" i18n>Perform Fiscal Year Close-Out</label>
46         <eg-help-popover helpText="Perform Fiscal Year Close-Out deactivates funds for the selected fiscal year. It will also move unspent and encumbered funds to the corresponding fund for the next fiscal year if that fund is configured to Propagate and Rollover." i18n-helpText></eg-help-popover>
47         <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>
48       </div>
49       <div class="offset-sm-1 form-check" *ngIf="showEncumbOnly">
50         <input type="checkbox" name="limitToEncumbrances" id="limitToEncumbrances"
51           class="form-check-input"
52           [(ngModel)]="limitToEncumbrances">
53         <label for="limitToEncumbrances" class="form-check-label" i18n>Limit Fiscal Year Close-Out to Encumbrances</label>
54         <eg-help-popover helpText="This option will limit the Perform Fiscal Year Close-Out procedure to only move encumbrances to the corresponding fund for the next fiscal year. Any unspent money in the funds will not roll over." i18n-helpText></eg-help-popover>
55       </div>
56       <hr>
57       <div class="form-check">
58         <input type="checkbox" name="dryRun" id="dryRun"
59           class="form-check-input"
60           [(ngModel)]="dryRun">
61         <label for="dryRun" class="form-check-label" i18n>Dry Run &mdash; no data will be changed</label>
62         <eg-help-popover helpText="Select Dry Run to see a preview of the changes that would occur based on the selected actions. Data will not be changed when Dry Run is selected." i18n-helpText></eg-help-popover>
63       </div>
64     </form>
65     <div class="row" [hidden]="!isProcessing">
66       <div class="col-lg-10 offset-lg-1">
67         <eg-progress-inline #rolloverProgress></eg-progress-inline>
68       </div>
69     </div>
70     <div [hidden]="!showResults" class="row col mt-2">
71         <h4 i18n>Fund Propagation &amp; Rollover Summary for Fiscal Year {{year + 1}}</h4>
72         <ul>
73           <li *ngIf="dryRun" i18n>DRY RUN: these changes have not been committed yet.</li>
74           <li i18n>{{count}} funds propagated for fiscal year {{year + 1}} for the selected locations</li>
75           <li i18n>{{amount_rolled}} unspent money rolled over to fiscal year {{year + 1}} for the selected locations</li>
76         </ul>
77     </div>
78   </div>
79   <div class="modal-footer">
80     <button type="button" class="btn btn-info"
81       [disabled]="isProcessing"
82       (click)="rollover()" i18n>Process</button>
83     <button type="button" class="btn btn-warning"
84       [disabled]="isProcessing"
85       (click)="close()" i18n>Close</button>
86   </div>
87 </ng-template>