<li *ngIf="dryRun" i18n>DRY RUN: these changes have not been committed yet.</li>
<li i18n>{{count}} funds propagated for fiscal year {{year + 1}} for the selected locations</li>
<li i18n>{{amount_rolled}} unspent money rolled over to fiscal year {{year + 1}} for the selected locations</li>
+ <li i18n>{{encumb_rolled}} in encumbrances rolled over to fiscal year {{year + 1}} for the selected locations</li>
</ul>
</div>
</div>
count: number;
amount_rolled: number;
+ encumb_rolled: number;
constructor(
private idl: IdlService,
this.count = 0;
this.amount_rolled = 0;
+ this.encumb_rolled = 0;
this.net.request(
'open-ils.acq',
rolloverResponses.push(r.fund);
this.count++;
this.amount_rolled += Number(r.rollover_amount);
+ this.encumb_rolled += Number(r.encumb_amount);
},
err => {},
() => {
my $fund = $e->retrieve_acq_fund($_) or return $e->die_event;
$fund->summary(retrieve_fund_summary_impl($e, $fund));
- my $amount = 0;
+ my $rollover_amount = 0;
+ my $encumb_amount = 0;
if($combined and $U->is_true($fund->rollover)) {
# see how much money was rolled over
where => {dest_fund => $fund->id, note => { like => 'Rollover%' } }
})->[0];
- $amount = $sum->{dest_amount} if $sum;
+ $rollover_amount = $sum->{dest_amount} if $sum;
+
+ $sum = $e->json_query({
+ select => {acqfdeb => [{column => 'amount', transform => 'sum'}]},
+ from => 'acqfdeb',
+ where => {fund => $fund->id, encumbrance => 't' }
+ })->[0];
+
+ $encumb_amount = $sum->{amount} if $sum;
}
- $conn->respond({fund => $fund, rollover_amount => $amount});
+ $conn->respond({fund => $fund, rollover_amount => $rollover_amount, encumb_amount => $encumb_amount});
}
$self->api_name =~ /dry_run/ and $e->rollback or $e->commit;