a3f4998e3822695a707ba02cc0e48a2aa3475ee0
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / staff / circ / patron / billing-history.component.html
1 <h3 i18n>Bill History</h3>
2
3 <eg-add-billing-dialog [patronId]="patronId" #billingDialog>
4 </eg-add-billing-dialog>
5
6 <ng-template #titleTemplate let-r="row">
7   <ng-container *ngIf="r.record">
8     <a routerLink="/staff/catalog/record/{{r.record_id}}">{{r.title}}</a>
9   </ng-container>
10   <ng-container *ngIf="!r.record">{{r.title}}</ng-container>
11 </ng-template>
12
13 <ng-template #barcodeTemplate let-r="row">
14   <ng-container *ngIf="r.copy_id">
15     <a href="/eg/staff/cat/item/{{r.copy_id}}">{{r.copy_barcode}}</a>
16   </ng-container>
17 </ng-template>
18
19
20 <ul ngbNav #nav="ngbNav" class="nav-tabs" 
21   [activeId]="tab" (navChange)="beforeTabChange($event)">
22   <li ngbNavItem="transactions">
23     <a ngbNavLink i18n>Transactions</a>
24     <ng-template ngbNavContent>
25
26       <div class="row mt-3 mb-3 pt-2 pb-2 border rounded">
27         <div class="col-lg-4">
28           <div class="row">
29             <div class="col-lg-5" i18n>Selected Billed:</div>
30             <div class="col-lg-4" i18n>{{selectedXactsInfo().billed | currency}}</div>
31           </div>
32           <div class="row">
33             <div class="col-lg-5" i18n>Selected Paid:</div>
34             <div class="col-lg-4" i18n>{{selectedXactsInfo().paid | currency}}</div>
35           </div>
36         </div>
37         <div class="col-lg-4 form-inline">
38           <span class="mr-2" i18n>Start Date:</span>
39           <eg-date-select [initialIso]="xactsStart"
40             (onChangeAsIso)="dateChange('xactsStart', $event)"></eg-date-select>
41         </div>
42         <div class="col-lg-4 form-inline">
43           <span class="mr-2" i18n>End Date:</span>
44           <eg-date-select [initialIso]="xactsEnd"
45             (onChangeAsIso)="dateChange('xactsEnd', $event)"></eg-date-select>
46         </div>
47       </div>
48
49       <eg-grid idlClass="mbt" #xactsGrid
50         persistKey="circ.patron.billhistory_xacts"
51         (onRowActivate)="showStatement($event)"
52         [showDeclaredFieldsOnly]="true"
53         [reloadOnColumnChange]="true"
54         [dataSource]="xactsDataSource" [sortable]="true">
55
56         <eg-grid-toolbar-action i18n-label label="Add Billing"
57           (onClick)="addBillingForXact($event)"></eg-grid-toolbar-action>
58
59         <eg-grid-toolbar-action
60           i18n-label label="Print Bills" (onClick)="printBills($event)">
61         </eg-grid-toolbar-action>
62
63         <eg-grid-toolbar-action
64           i18n-label label="Full Details" (onClick)="showStatement($event)">
65         </eg-grid-toolbar-action>
66
67         <eg-grid-column name="balance_owed" [required]="true" path="summary.balance_owed"></eg-grid-column>
68         <eg-grid-column path="id" [index]="true" i18n-label label="Bill #" [required]="true"></eg-grid-column>
69         <eg-grid-column path="xact_finish" i18n-label label="Finish" 
70           datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
71         <eg-grid-column path="xact_start" i18n-label label="Start" 
72           datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
73         <eg-grid-column name="total_owed" [required]="true" 
74           path="summary.total_owed" i18n-label label="Total Billed"></eg-grid-column>
75         <eg-grid-column name="total_paid" [required]="true" 
76           path="summary.total_paid" i18n-label label="Total Paid"></eg-grid-column>
77         <eg-grid-column path="summary.xact_type" i18n-label label="Type"></eg-grid-column>
78         <eg-grid-column name="last_payment_ts" path="summary.last_payment_ts" 
79           datatype="timestamp" [required]="true" [hidden]="true"></eg-grid-column>
80
81         <eg-grid-column i18n-label label="Title" name="title" 
82           [cellTemplate]="titleTemplate"
83           path="circulation.target_copy.call_number.record.simple_record.title">
84         </eg-grid-column>
85
86         <eg-grid-column name="record_id" 
87           path="circulation.target_copy.call_number.record.id" 
88           [required]="true" [hidden]="true"></eg-grid-column>
89
90         <eg-grid-column i18n-label label="Barcode" name="copy_barcode" 
91           [cellTemplate]="barcodeTemplate" path="circulation.target_copy.barcode">
92         </eg-grid-column>
93
94         <eg-grid-column name="copy_id" path="circulation.target_copy.id" 
95           [required]="true" [hidden]="true"></eg-grid-column>
96
97         <eg-grid-column path="circulation.target_copy.circ_lib.shortname" 
98           i18n-label label="Item Owning Library"></eg-grid-column>
99
100         <eg-grid-column path="circulation.circ_lib.shortname" 
101           i18n-label label="Checkout or Renewal Library" [hidden]="true"></eg-grid-column>
102         <eg-grid-column path="circulation.due_date" 
103           i18n-label label="Due Date" datefilter="egDueDate" [hidden]="true"></eg-grid-column>
104         <eg-grid-column path="circulation.stop_fines" 
105           i18n-label label="Fine Stop Reason" [hidden]="true"></eg-grid-column>
106         <eg-grid-column path="circulation.target_copy.call_number.prefix.label" 
107           i18n-label label="CN Prefix" [hidden]="true"></eg-grid-column>
108         <eg-grid-column path="circulation.target_copy.call_number.suffix.label" 
109           i18n-label label="CN Suffix" [hidden]="true"></eg-grid-column>
110
111         <!--
112         <eg-grid-column path="circulation.target_copy.call_number.*" [hidden]="true"></eg-grid-column>
113         <eg-grid-column path="summary.*" hidden></eg-grid-column>
114         <eg-grid-column path="circulation.target_copy.*" hidden></eg-grid-column>
115         -->
116
117       </eg-grid>
118     </ng-template>
119   </li>
120   <li ngbNavItem="payments">
121     <a ngbNavLink i18n>Payments</a>
122     <ng-template ngbNavContent>
123       <div class="row mt-3 mb-3 pt-2 pb-2 border rounded">
124         <div class="col-lg-4">
125           <div class="row">
126             <div class="col-lg-5" i18n>Selected Paid:</div>
127             <div class="col-lg-4" i18n>{{selectedPaymentsInfo().paid | currency}}</div>
128           </div>
129         </div>
130         <div class="col-lg-4 form-inline">
131           <span class="mr-2" i18n>Start Date:</span>
132           <eg-date-select [initialIso]="paymentsStart"
133             (onChangeAsDate)="dateChange('paymentsStart', $event)"></eg-date-select>
134         </div>
135         <div class="col-lg-4 form-inline">
136           <span class="mr-2" i18n>End Date:</span>
137           <eg-date-select [initialIso]="paymentsEnd"
138             (onChangeAsDate)="dateChange('paymentsEnd', $event)"></eg-date-select>
139         </div>
140       </div>
141
142       <eg-grid idlClass="mp" #paymentsGrid
143         persistKey="circ.patron.billhistory_payments"
144         (onRowActivate)="showStatement($event, true)"
145         [showDeclaredFieldsOnly]="true"
146         [reloadOnColumnChange]="true"
147         [dataSource]="paymentsDataSource" [sortable]="true">
148
149         <eg-grid-toolbar-action
150           i18n-label label="Full Details" (onClick)="showStatement($event, true)">
151         </eg-grid-toolbar-action>
152
153         <eg-grid-column path="amount" i18n-label label="Amount"></eg-grid-column>
154         <eg-grid-column path="id" [index]="true" i18n-label label="Payment ID" [required]="true"></eg-grid-column>
155         <eg-grid-column path="payment_ts" i18n-label label="Payment Time" [datePlusTime]="true"></eg-grid-column>
156         <eg-grid-column path="note" i18n-label label="Note"></eg-grid-column>
157         <eg-grid-column path="voided" i18n-label label="Voided"></eg-grid-column>
158         <eg-grid-column path="xact.summary.xact_type" i18n-label label="Transaction Type"></eg-grid-column>
159         <eg-grid-column path="xact.summary.last_billing_type" i18n-label label="Last Billing Type"></eg-grid-column>
160         <eg-grid-column path="payment_type" i18n-label label="Payment Type"></eg-grid-column>
161
162         <eg-grid-column i18n-label label="Title" name="title" 
163           [cellTemplate]="titleTemplate"
164           path="xact.circulation.target_copy.call_number.record.simple_record.title">
165         </eg-grid-column>
166
167         <eg-grid-column name="record_id" 
168           path="xact.circulation.target_copy.call_number.record.id" 
169           [required]="true" [hidden]="true"></eg-grid-column>
170
171         <eg-grid-column i18n-label label="Barcode" name="copy_barcode" 
172           [cellTemplate]="barcodeTemplate" path="xact.circulation.target_copy.barcode">
173         </eg-grid-column>
174
175         <eg-grid-column name="copy_id" path="xact.circulation.target_copy.id" 
176           [required]="true" [hidden]="true"></eg-grid-column>
177
178         <eg-grid-column path="xact.circulation.target_copy.circ_lib.shortname" 
179           name="owning_lib" i18n-label label="Item Owning Library"></eg-grid-column>
180         <eg-grid-column path="xact.circulation.circ_lib.shortname" name="circ_lib" 
181           i18n-label label="Checkout or Renewal Library" [hidden]="true"></eg-grid-column>
182         <eg-grid-column path="xact.circulation.due_date" i18n-label 
183           label="Due Date" datefilter="egDueDate" [hidden]="true"></eg-grid-column>
184         <eg-grid-column path="xact.circulation.stop_fines" i18n-label 
185           label="Fine Stop Reason" [hidden]="true"></eg-grid-column>
186
187         <eg-grid-column path="xact.id" [required]="true" [hidden]="true"></eg-grid-column>
188         <eg-grid-column path="xact.usr" [required]="true" [hidden]="true"></eg-grid-column>
189         <eg-grid-column path="check_payment.check_number" i18n-label 
190           label="Check Number" [hidden]="true"></eg-grid-column>
191
192         <!--
193         <eg-grid-column path="xact.*" [hidden]="true"></eg-grid-column>
194         <eg-grid-column path="xact.summary.*" [hidden]="true"></eg-grid-column>
195         -->
196
197       </eg-grid>
198     </ng-template>
199   </li>
200 </ul>
201
202 <ng-container><div [ngbNavOutlet]="nav"></div></ng-container>
203