1 <eg-string #successString i18n-text text="Fund Update Succeeded"></eg-string>
2 <eg-string #updateFailedString i18n-text text="Fund Update Failed"></eg-string>
4 <ng-template #summaryField let-field="field" let-value="value" let-rawValue="rawValue">
6 <label style="font-weight: bold" for="fund-{{field}}">{{idlDef.field_map[field].label}}</label>
9 <span id="fund-{{field}}" [ngClass]="{'negative-money-amount': checkNegativeAmount(rawValue)}">
14 <ng-template #dialogContent>
15 <div class="modal-header bg-info">
16 <h3 class="modal-title" i18n>Fund Details - {{fund?.name()}} ({{fund?.code()}} ({{fund?.year()}}) ({{fund?.org().shortname()}}))</h3>
17 <button type="button" class="close"
18 i18n-aria-label aria-label="Close" (click)="close()">
19 <span aria-hidden="true">×</span>
22 <div class="modal-body">
23 <div class="row mt-3">
24 <div class="col-lg-3">
25 <button class="btn btn-primary"
26 (click)="allocateToFund()" i18n>Create Allocation</button>
27 <button class="btn btn-primary ml-1"
28 (click)="doTransfer()" i18n>Transfer Money</button>
30 <div class="col-lg-9 text-right pb-1">
31 <button class="btn btn-secondary btn-xs" [disabled]="activeTab === defaultTabType"
32 (click)="setDefaultTab()" i18n>Set Default View</button>
35 <ul ngbNav #fundDetailsNav="ngbNav" [(activeId)]="activeTab" class="nav-tabs">
36 <li [ngbNavItem]="'summary'" *ngIf="fund">
37 <a ngbNavLink i18n>Summary</a>
38 <ng-template ngbNavContent>
41 <button class="btn btn-info ml-3" (click)="openEditDialog()" i18n>Edit Fund</button>
44 <ng-container *ngTemplateOutlet="summaryField;context:{value:fund.code(),field:'code'}"></ng-container>
45 <ng-container *ngTemplateOutlet="summaryField;context:{value:fund.name(),field:'name'}"></ng-container>
48 <ng-container *ngTemplateOutlet="summaryField;context:{value:fund.id(),field:'id'}"></ng-container>
49 <ng-container *ngTemplateOutlet="summaryField;context:{value:fund.year(),field:'year'}"></ng-container>
52 <ng-container *ngTemplateOutlet="summaryField;context:{value:fund.org().shortname(),field:'org'}"></ng-container>
53 <ng-container *ngTemplateOutlet="summaryField;context:{value:fund.currency_type().code(),field:'currency_type'}"></ng-container>
56 <ng-container *ngTemplateOutlet="summaryField;context:{value:formatCurrency(fund.combined_balance()?.amount()),field:'combined_balance',rawValue:fund.combined_balance()?.amount()}"></ng-container>
57 <ng-container *ngTemplateOutlet="summaryField;context:{value:formatCurrency(fund.allocation_total()?.amount()),field:'allocation_total',rawValue:fund.allocation_total()?.amount()}"></ng-container>
60 <ng-container *ngTemplateOutlet="summaryField;context:{value:formatCurrency(fund.spent_balance()?.amount()),field:'spent_balance',rawValue:fund.spent_balance()?.amount()}"></ng-container>
61 <ng-container *ngTemplateOutlet="summaryField;context:{value:formatCurrency(fund.debit_total()?.amount()),field:'debit_total',rawValue:fund.debit_total()?.amount()}"></ng-container>
64 <ng-container *ngTemplateOutlet="summaryField;context:{value:formatCurrency(fund.spent_total()?.amount()),field:'spent_total',rawValue:fund.spent_total()?.amount()}"></ng-container>
65 <ng-container *ngTemplateOutlet="summaryField;context:{value:formatCurrency(fund.encumbrance_total()?.amount()),field:'encumbrance_total',rawValue:fund.encumbrance_total()?.amount()}"></ng-container>
70 <li [ngbNavItem]="'allocations'" *ngIf="fund">
71 <a ngbNavLink i18n>Allocations</a>
72 <ng-template ngbNavContent>
74 <eg-grid #fundDetailsAllocationsGrid idlClass="acqfa" [dataSource]="acqfaDataSource"
75 [sortable]="true" persistKey="acq.fund.fund_allocation"
76 [cellTextGenerator]="cellTextGenerator"
77 [filterable]="true" [stickyHeader]="true">
79 <ng-template #sourceTmpl let-row="row">
80 <a href="/eg2/staff/admin/acq/funds/funding_source/{{row.funding_source().id()}}" target="_blank">
81 {{row.funding_source().code()}} ({{getOrgShortname(row.funding_source().owner())}})
84 <eg-grid-column path="funding_source" [cellTemplate]="sourceTmpl"></eg-grid-column>
85 <eg-grid-column path="amount"></eg-grid-column>
86 <eg-grid-column path="create_time" [datePlusTime]="true"></eg-grid-column>
87 <eg-grid-column path="allocator"></eg-grid-column>
88 <eg-grid-column path="note"></eg-grid-column>
89 <eg-grid-column path="id" [hidden]="true"></eg-grid-column>
90 <eg-grid-column path="fund" [hidden]="true" [filterable]="false"></eg-grid-column>
95 <li [ngbNavItem]="'transfers'" *ngIf="fund">
96 <a ngbNavLink i18n>Transfers</a>
97 <ng-template ngbNavContent>
99 <eg-grid #fundDetailsTransfersGrid idlClass="acqftr" [dataSource]="acqftrDataSource"
100 [sortable]="true" persistKey="acq.fund.fund_transfer"
101 [cellTextGenerator]="cellTextGenerator"
102 [filterable]="true" [stickyHeader]="true">
104 <ng-template #sourcefundTmpl let-row="row">
105 <ng-container *ngIf="row.src_fund().id() === fundId">
106 {{row.src_fund().code()}} ({{row.src_fund().year()}}) ({{getOrgShortname(row.src_fund().org())}})
108 <ng-container *ngIf="row.src_fund().id() !== fundId">
109 <a href="/eg2/staff/admin/acq/funds/fund/{{row.src_fund().id()}}" target="_blank">
110 {{row.src_fund().code()}} ({{row.src_fund().year()}}) ({{getOrgShortname(row.src_fund().org())}})
114 <eg-grid-column path="src_fund" [cellTemplate]="sourcefundTmpl"></eg-grid-column>
115 <eg-grid-column path="src_amount"></eg-grid-column>
116 <ng-template #destfundTmpl let-row="row">
117 <ng-container *ngIf="row.dest_fund().id() === fundId">
118 {{row.dest_fund().code()}} ({{row.dest_fund().year()}}) ({{getOrgShortname(row.dest_fund().org())}})
120 <ng-container *ngIf="row.dest_fund().id() !== fundId">
121 <a href="/eg2/staff/admin/acq/funds/fund/{{row.dest_fund().id()}}" target="_blank">
122 {{row.dest_fund().code()}} ({{row.dest_fund().year()}}) ({{getOrgShortname(row.dest_fund().org())}})
126 <eg-grid-column path="dest_fund" [cellTemplate]="destfundTmpl"></eg-grid-column>
127 <eg-grid-column path="dest_amount"></eg-grid-column>
128 <eg-grid-column path="transfer_time" [datePlusTime]="true"></eg-grid-column>
129 <eg-grid-column path="transfer_user"></eg-grid-column>
130 <eg-grid-column path="note"></eg-grid-column>
131 <ng-template #fsCredTmpl let-row="row">
132 <a href="/eg2/staff/admin/acq/funds/funding_source/{{row.funding_source_credit().funding_source().id()}}" target="_blank">
133 {{row.funding_source_credit().funding_source().code()}} ({{getOrgShortname(row.funding_source_credit().funding_source().owner())}})
136 <eg-grid-column path="funding_source_credit" [cellTemplate]="fsCredTmpl" i18n-label label="Funding Source"></eg-grid-column>
137 <eg-grid-column path="id" [hidden]="true"></eg-grid-column>
142 <li [ngbNavItem]="'debits'" *ngIf="fund">
143 <a ngbNavLink i18n>Debits</a>
144 <ng-template ngbNavContent>
146 <eg-grid #fundDetailsDebitsGrid idlClass="acqfdeb" [dataSource]="acqfdebDataSource"
147 [cellTextGenerator]="cellTextGenerator"
148 [sortable]="true" persistKey="acq.fund.fund_debit"
149 ignoreFields="invoice_entry"
150 [filterable]="true" [stickyHeader]="true">
152 <eg-grid-column path="amount"></eg-grid-column>
153 <eg-grid-column path="encumbrance"></eg-grid-column>
154 <eg-grid-column path="debit_type"></eg-grid-column>
155 <eg-grid-column path="origin_amount"></eg-grid-column>
156 <eg-grid-column path="origin_currency_type"></eg-grid-column>
157 <eg-grid-column path="create_time" [datePlusTime]="true"></eg-grid-column>
158 <ng-template #liTmpl let-row="row">
159 <a href="/eg/staff/acq/legacy/po/view/{{row.po_id}}?focus_li={{row.li_id}}" target="_blank">
163 <eg-grid-column path="li" i18n-label label="Line Item" [cellTemplate]="liTmpl" [filterable]="false" [sortable]="false"></eg-grid-column>
164 <ng-template #poTmpl let-row="row">
165 <a href="/eg/staff/acq/legacy/po/view/{{row.po_id}}" target="_blank">
169 <eg-grid-column path="po" i18n-label label="Purchase Order" [cellTemplate]="poTmpl" [filterable]="false" [sortable]="false"></eg-grid-column>
170 <ng-template #invTmpl let-row="row">
171 <a href="/eg/staff/acq/legacy/invoice/view/{{row.invoice_id}}" target="_blank">
172 {{row.vendor_invoice_id}}
175 <eg-grid-column path="invoice" i18n-label label="Invoice" [cellTemplate]="invTmpl" [filterable]="false" [sortable]="false"></eg-grid-column>
176 <eg-grid-column path="po_id" i18n-label label="PO ID" [hidden]="true" [filterable]="false" [sortable]="false"></eg-grid-column>
177 <eg-grid-column path="invoice_id" i18n-label label="Internal Invoice ID" [hidden]="true" [filterable]="false" [sortable]="false"></eg-grid-column>
178 <eg-grid-column path="id" [hidden]="true"></eg-grid-column>
179 <eg-grid-column path="fund" [hidden]="true" [filterable]="false"></eg-grid-column>
184 <li [ngbNavItem]="'tags'" *ngIf="fund">
185 <a ngbNavLink i18n>Tags</a>
186 <ng-template ngbNavContent>
188 <eg-fund-tags [fundId]="fundId" [fundOwner]="fund.org()"></eg-fund-tags>
193 <div [ngbNavOutlet]="fundDetailsNav"></div>
195 <div class="modal-footer">
196 <button type="button" class="btn btn-warning"
197 (click)="close()" i18n>Close</button>
201 <eg-fm-record-editor #editDialog idlClass="acqf"
202 [preloadLinkedValues]="true">
203 </eg-fm-record-editor>
205 <eg-fm-record-editor #allocateToFundDialog idlClass="acqfa"
206 [fieldOptions]="{funding_source:{linkedSearchConditions:{'active':'t'},preloadLinkedValues:true}}">
207 </eg-fm-record-editor>
209 <eg-fund-transfer-dialog #transferDialog></eg-fund-transfer-dialog>