2 <h4 i18n>Direct Charges, Taxes, Fees, etc.
3 <button class="btn btn-info btn-sm" (click)="newCharge()">New Charge</button>
6 <ng-container *ngIf="showBody">
7 <div class="row d-flex">
8 <div class="flex-2 p-2 font-weight-bold">Charge Type</div>
9 <div class="flex-2 p-2 font-weight-bold">Fund</div>
10 <div class="flex-2 p-2 font-weight-bold">Title/Description</div>
11 <div class="flex-2 p-2 font-weight-bold">Author</div>
12 <div class="flex-2 p-2 font-weight-bold">Note</div>
13 <div class="flex-2 p-2 font-weight-bold">Estimated Cost</div>
14 <div class="flex-2 p-2"> </div>
16 <div class="row mt-2 pt-2 d-flex border-top form-validated"
17 *ngFor="let charge of po().po_items()">
18 <div class="flex-2 p-2">
19 <eg-combobox idlClass="aiit" [selectedId]="charge.inv_item_type()"
20 (onChange)="charge.inv_item_type($event ? $event.id : null)"
21 i18n-placeholder placeholder="Charge Type..."
22 [required]="true" [readOnly]="!charge.isnew()"></eg-combobox>
24 <div class="flex-2 p-2">
25 <!-- the IDL does not require a fund, but the Perl code assumes
27 <eg-combobox idlClass="acqf" [selectedId]="charge.fund()"
28 (onChange)="charge.fund($event ? $event.id : null)"
29 i18n-placeholder placeholder="Fund..."
30 [required]="true" [readOnly]="!charge.isnew()"></eg-combobox>
32 <div class="flex-2 p-2">
33 <span *ngIf="!charge.isnew()">{{charge.title()}}</span>
34 <input *ngIf="charge.isnew()" type="text" class="form-control"
35 i18n-placeholder placeholder="Title..."
36 [ngModel]="charge.title()" (ngModelChange)="charge.title($event)"/>
38 <div class="flex-2 p-2">
39 <span *ngIf="!charge.isnew()">{{charge.author()}}</span>
40 <input *ngIf="charge.isnew()" type="text" class="form-control"
41 i18n-placeholder placeholder="Author..."
42 [ngModel]="charge.author()" (ngModelChange)="charge.author($event)"/>
44 <div class="flex-2 p-2">
45 <span *ngIf="!charge.isnew()">{{charge.note()}}</span>
46 <input *ngIf="charge.isnew()" type="text" class="form-control"
47 i18n-placeholder placeholder="Note..."
48 [ngModel]="charge.note()" (ngModelChange)="charge.note($event)"/>
50 <div class="flex-2 p-2">
51 <span *ngIf="!charge.isnew()">{{charge.estimated_cost() | currency}}</span>
52 <input *ngIf="charge.isnew()" type="number" min="0" class="form-control"
53 i18n-placeholder placeholder="Esimated Cost..."
54 [ngModel]="charge.estimated_cost()" (ngModelChange)="charge.estimated_cost($event)"/>
56 <div class="flex-1 p-1">
57 <button *ngIf="charge.isnew()" class="btn btn-success btn-sm"
58 (click)="saveCharge(charge)" i18n>Save</button>
60 <div class="flex-1 p-1">
61 <button class="btn btn-danger btn-sm"
62 (click)="removeCharge(charge)" i18n>Remove</button>