]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.html
LP1929741 ACQ Selection List & PO Angluar Port
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / acq / po / charges.component.html
1
2 <h4 i18n>Direct Charges, Taxes, Fees, etc. 
3   <button class="btn btn-info btn-sm" (click)="newCharge()">New Charge</button>
4 </h4>
5
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>
15   </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>
23     </div>
24     <div class="flex-2 p-2">
25       <!--  the IDL does not require a fund, but the Perl code assumes
26             one is present -->
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>
31     </div>
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)"/>
37     </div>
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)"/>
43     </div>
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)"/>
49     </div>
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)"/>
55     </div>
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>
59     </div>
60     <div class="flex-1 p-1">
61       <button class="btn btn-danger btn-sm" 
62         (click)="removeCharge(charge)" i18n>Remove</button>
63     </div>
64   </div>
65 </ng-container>