Lines 4-13
Link Here
|
4 |
[% USE AuthorisedValues %] |
4 |
[% USE AuthorisedValues %] |
5 |
[% USE Branches %] |
5 |
[% USE Branches %] |
6 |
[% USE Price %] |
6 |
[% USE Price %] |
|
|
7 |
[% USE ColumnsSettings %] |
8 |
[% USE KohaDates %] |
7 |
[% SET footerjs = 1 %] |
9 |
[% SET footerjs = 1 %] |
8 |
[% INCLUDE 'doc-head-open.inc' %] |
10 |
[% INCLUDE 'doc-head-open.inc' %] |
9 |
<title>Koha › Patrons › Pay Fines for [% patron.firstname | html %] [% patron.surname | html %]</title> |
11 |
<title>Koha › Patrons › Pay Fines for [% patron.firstname | html %] [% patron.surname | html %]</title> |
10 |
[% INCLUDE 'doc-head-close.inc' %] |
12 |
[% INCLUDE 'doc-head-close.inc' %] |
|
|
13 |
[% Asset.css("css/datatables.css") | $raw %] |
11 |
</head> |
14 |
</head> |
12 |
|
15 |
|
13 |
<body id="pat_pay" class="pat"> |
16 |
<body id="pat_pay" class="pat"> |
Lines 40-64
Link Here
|
40 |
<table id="finest"> |
43 |
<table id="finest"> |
41 |
<thead> |
44 |
<thead> |
42 |
<tr> |
45 |
<tr> |
43 |
<th> </th> |
46 |
<th class="NoSort"> </th> |
44 |
<th>Fines & charges</th> |
47 |
<th class="NoSort">Actions</th> |
45 |
<th>Description</th> |
48 |
<th>Description</th> |
46 |
<th>Payment note</th> |
49 |
<th class="title-string">Date</th> |
|
|
50 |
<th class="NoSort">Payment note</th> |
47 |
<th>Account type</th> |
51 |
<th>Account type</th> |
48 |
<th>Amount</th> |
52 |
<th>Amount</th> |
49 |
<th>Amount outstanding</th> |
53 |
<th>Amount outstanding</th> |
50 |
</tr> |
54 |
</tr> |
51 |
</thead> |
55 |
</thead> |
52 |
<tfoot> |
56 |
|
53 |
<tr> |
|
|
54 |
<td class="total" colspan="6">Total due:</td> |
55 |
[% IF outstanding_credits.total_outstanding < 0 %] |
56 |
<td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td> |
57 |
[% ELSE %] |
58 |
<td style="text-align: right;">[% total | $Price %]</td> |
59 |
[% END %] |
60 |
</tr> |
61 |
</tfoot> |
62 |
<tbody> |
57 |
<tbody> |
63 |
[% FOREACH line IN accounts %] |
58 |
[% FOREACH line IN accounts %] |
64 |
<tr> |
59 |
<tr> |
Lines 67-76
Link Here
|
67 |
<input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountlines_id | html %]" /> |
62 |
<input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountlines_id | html %]" /> |
68 |
[% END %] |
63 |
[% END %] |
69 |
</td> |
64 |
</td> |
70 |
<td> |
65 |
<td class="actions"> |
71 |
[% IF ( line.amountoutstanding > 0 ) %] |
66 |
[% IF ( line.amountoutstanding > 0 ) %] |
72 |
<input type="submit" name="pay_indiv_[% line.accountlines_id | html %]" value="Pay" /> |
67 |
<button type="submit" class="btn btn-default btn-xs" name="pay_indiv_[% line.accountlines_id | html %]" value="Pay">Pay</button> |
73 |
[% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="wo_indiv_[% line.accountlines_id | html %]" value="Write off" />[% END %] |
68 |
[% IF CAN_user_updatecharges_writeoff %] |
|
|
69 |
<button type="submit" class="btn btn-default btn-xs" name="wo_indiv_[% line.accountlines_id | html %]" value="Write off">Write off</button> |
70 |
[% END %] |
74 |
[% END %] |
71 |
[% END %] |
75 |
<input type="hidden" name="itemnumber[% line.accountlines_id | html %]" value="[% line.itemnumber | html %]" /> |
72 |
<input type="hidden" name="itemnumber[% line.accountlines_id | html %]" value="[% line.itemnumber | html %]" /> |
76 |
<input type="hidden" name="description[% line.accountlines_id | html %]" value="[% line.description | html %]" /> |
73 |
<input type="hidden" name="description[% line.accountlines_id | html %]" value="[% line.description | html %]" /> |
Lines 107-132
Link Here
|
107 |
[%- IF line.description %], [% line.description | html %][% END %] |
104 |
[%- IF line.description %], [% line.description | html %][% END %] |
108 |
[% IF line.title %]([% line.title | html %])[% END %] |
105 |
[% IF line.title %]([% line.title | html %])[% END %] |
109 |
</td> |
106 |
</td> |
110 |
<td><input type="text" name="payment_note_[% line.accountlines_id | html %]" /></td> |
107 |
<td> |
|
|
108 |
<span title="[% line.date | html %]">[% line.date | $KohaDates %]</span> |
109 |
</td> |
110 |
<td class="actions"> |
111 |
<a href="#" class="add-note" data-accountlines_id="[% line.accountlines_id | html %]"><i class="fa fa-plus"></i> Add note</a> |
112 |
<span class="payment_note" id="payment_note_[% line.accountlines_id | html %]" style="display:none"><input type="text" size="10" name="payment_note_[% line.accountlines_id | html %]" value="" /> <a href="#" class="cancel-note"><i class="fa fa-remove"></i></a></span> |
113 |
</td> |
111 |
<td>[% line.accounttype | html %]</td> |
114 |
<td>[% line.accounttype | html %]</td> |
112 |
<td class="debit" style="text-align: right;">[% line.amount | $Price %]</td> |
115 |
<td class="debit" style="text-align: right;">[% line.amount | $Price %]</td> |
113 |
<td class="debit" style="text-align: right;">[% line.amountoutstanding | $Price %]</td> |
116 |
<td class="debit" style="text-align: right;">[% line.amountoutstanding | $Price %]</td> |
114 |
</tr> |
117 |
</tr> |
115 |
[% END %] |
118 |
[% END %] |
116 |
[% IF outstanding_credits.total_outstanding < 0 %] |
|
|
117 |
<tr> |
118 |
<td class="total" colspan="6">Outstanding credits could be applied <input type="submit" id="apply_credits" name="apply_credits" value="Apply credits" class="submit" /></td> |
119 |
<td class="credit" style="text-align: right;">[% outstanding_credits.total_outstanding | $Price %]</td> |
120 |
</tr> |
121 |
[% END %] |
122 |
[% IF ( account_grp.total ) %] |
123 |
<tr> |
124 |
|
125 |
<td class="total" colspan="8" style="text-align: right;">Sub total:</td> |
126 |
<td style="text-align: right;">[% account_grp.total | $Price %]</td> |
127 |
</tr> |
128 |
[% END %] |
129 |
</tbody> |
119 |
</tbody> |
|
|
120 |
|
121 |
<tfoot> |
122 |
[% IF outstanding_credits.total_outstanding < 0 %] |
123 |
<tr> |
124 |
<td class="total" colspan="7">Outstanding credits could be applied: </td> |
125 |
<td class="credit" style="text-align: right;"><button type="submit" id="apply_credits" name="apply_credits" value="apply_credits" class="btn btn-default btn-sm">Apply <strong class="credit">[% outstanding_credits.total_outstanding | $Price %]</strong></button></td> |
126 |
</tr> |
127 |
[% END %] |
128 |
[% IF ( account_grp.total ) %] |
129 |
<tr> |
130 |
<td class="total" colspan="7" style="text-align: right;">Sub total:</td> |
131 |
<td style="text-align: right;">[% account_grp.total | $Price %]</td> |
132 |
</tr> |
133 |
[% END %] |
134 |
<tr> |
135 |
<td class="total" colspan="7">Total due:</td> |
136 |
[% IF outstanding_credits.total_outstanding < 0 %] |
137 |
<td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td> |
138 |
[% ELSE %] |
139 |
<td style="text-align: right;">[% total | $Price %]</td> |
140 |
[% END %] |
141 |
</tr> |
142 |
</tfoot> |
143 |
|
130 |
</table> |
144 |
</table> |
131 |
<fieldset class="action"> |
145 |
<fieldset class="action"> |
132 |
<input type="submit" id="paycollect" name="paycollect" value="Pay amount" class="submit" /> |
146 |
<input type="submit" id="paycollect" name="paycollect" value="Pay amount" class="submit" /> |
Lines 152-165
Link Here
|
152 |
[% INCLUDE 'str/members-menu.inc' %] |
166 |
[% INCLUDE 'str/members-menu.inc' %] |
153 |
[% Asset.js("js/members-menu.js") | $raw %] |
167 |
[% Asset.js("js/members-menu.js") | $raw %] |
154 |
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] |
168 |
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] |
155 |
<script type= "text/javascript"> |
169 |
[% INCLUDE 'datatables.inc' %] |
|
|
170 |
[% INCLUDE 'columns_settings.inc' %] |
171 |
<script> |
156 |
function enableCheckboxActions(){ |
172 |
function enableCheckboxActions(){ |
157 |
// Enable/disable controls if checkboxes are checked |
173 |
// Enable/disable controls if checkboxes are checked |
158 |
var checkedBoxes = $("input.cb:checked"); |
174 |
var checkedBoxes = $("input.cb:checked"); |
159 |
if ($(checkedBoxes).size()) { |
175 |
if ($(checkedBoxes).size()) { |
160 |
$("#payselected").prop("disabled",false); |
176 |
$("#payselected, #writeoff-selected").prop("disabled",false); |
161 |
} else { |
177 |
} else { |
162 |
$("#payselected").prop("disabled",true); |
178 |
$("#payselected, #writeoff-selected").prop("disabled",true); |
163 |
} |
179 |
} |
164 |
} |
180 |
} |
165 |
$(document).ready(function(){ |
181 |
$(document).ready(function(){ |
Lines 171-182
Link Here
|
171 |
event.preventDefault(); |
187 |
event.preventDefault(); |
172 |
} |
188 |
} |
173 |
}); |
189 |
}); |
174 |
$('#CheckAll').click(function(){ |
190 |
$('#CheckAll').click(function(e){ |
|
|
191 |
e.preventDefault(); |
175 |
$("#finest").checkCheckboxes(); |
192 |
$("#finest").checkCheckboxes(); |
176 |
enableCheckboxActions(); |
193 |
enableCheckboxActions(); |
177 |
return false; |
194 |
return false; |
178 |
}); |
195 |
}); |
179 |
$('#CheckNone').click(function(){ |
196 |
$('#CheckNone').click(function(e){ |
|
|
197 |
e.preventDefault(); |
180 |
$("#finest").unCheckCheckboxes(); |
198 |
$("#finest").unCheckCheckboxes(); |
181 |
enableCheckboxActions(); |
199 |
enableCheckboxActions(); |
182 |
return false; |
200 |
return false; |
Lines 185-192
Link Here
|
185 |
enableCheckboxActions(); |
203 |
enableCheckboxActions(); |
186 |
}); |
204 |
}); |
187 |
enableCheckboxActions(); |
205 |
enableCheckboxActions(); |
188 |
}); |
206 |
$(".add-note").on("click", function(e){ |
|
|
207 |
e.preventDefault(); |
208 |
$(this).hide(); |
209 |
var accountlines_id = $(this).data("accountlines_id"); |
210 |
$("#payment_note_" + accountlines_id ).show().find("input").focus(); |
211 |
}); |
212 |
$(".cancel-note").on("click", function(e){ |
213 |
e.preventDefault(); |
214 |
$(".payment_note").hide().find("input").val(""); |
215 |
$(".add-note").show(); |
216 |
}); |
189 |
|
217 |
|
|
|
218 |
var columns_settings = []; |
219 |
KohaTable("finest", { |
220 |
"columnDefs": [ |
221 |
{ "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, |
222 |
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] }, |
223 |
{ "sType": "title-string", "aTargets" : [ "title-string" ] } |
224 |
], |
225 |
"paging": false, |
226 |
'sorting': [[ 3, "asc" ]], |
227 |
"autoWidth": false |
228 |
}, columns_settings ); |
229 |
}); |
190 |
</script> |
230 |
</script> |
191 |
[% END %] |
231 |
[% END %] |
192 |
|
232 |
|
193 |
- |
|
|