View | Details | Raw Unified | Return to bug 7080
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-9 / +26 lines)
Lines 1-6 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Patrons &rsaquo; Pay Fines for  [% borrower.firstname %] [% borrower.surname %]</title>
2
<title>Koha &rsaquo; Patrons &rsaquo; Pay Fines for  [% borrower.firstname %] [% borrower.surname %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type= "text/javascript">
5
//<![CDATA[
6
    $(document).ready(function(){
7
        $("#woall").click(function(event){
8
            var answer = confirm(_("Are you sure you want to write off [% total | format('%.2f') %] in outstanding fines? This cannot be undone!"));
9
                if (!answer){
10
                    event.preventDefault();
11
                }
12
        });
13
    });
14
//]]>
15
</script>
4
</head>
16
</head>
5
<body>
17
<body>
6
[% INCLUDE 'header.inc' %]
18
[% INCLUDE 'header.inc' %]
Lines 30-35 Link Here
30
	<input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
42
	<input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
31
43
32
<table>
44
<table>
45
<thead>
33
<tr>
46
<tr>
34
	<th>Fines &amp; Charges</th>
47
	<th>Fines &amp; Charges</th>
35
    <th>Sel</th>
48
    <th>Sel</th>
Lines 40-53 Link Here
40
	<th>Amount</th>
53
	<th>Amount</th>
41
	<th>Amount Outstanding</th>
54
	<th>Amount Outstanding</th>
42
</tr>
55
</tr>
43
56
</thead>
57
<tfoot>
58
<tr>
59
    <td class="total" colspan="7">Total Due:</td>
60
    <td>[% total | format('%.2f') %]</td>
61
</tr>
62
</tfoot>
63
<tbody>
44
[% FOREACH account_grp IN accounts %]
64
[% FOREACH account_grp IN accounts %]
45
    [% FOREACH line IN account_grp.accountlines %]
65
    [% FOREACH line IN account_grp.accountlines %]
46
<tr>
66
<tr>
47
    <td>
67
    <td>
48
    [% IF ( line.amountoutstanding > 0 ) %]
68
    [% IF ( line.amountoutstanding > 0 ) %]
49
        <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
69
        <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
50
        <input type="submit" name="wo_indiv_[% line.accountno %]" value="Writeoff" />
70
        <input type="submit" name="wo_indiv_[% line.accountno %]" value="Write off" />
51
    [% END %]
71
    [% END %]
52
    <input type="hidden" name="itemnumber[% line.accountno %]" value="[% line.itemnumber %]" />
72
    <input type="hidden" name="itemnumber[% line.accountno %]" value="[% line.itemnumber %]" />
53
    <input type="hidden" name="description[% line.accountno %]" value="[% line.description %]" />
73
    <input type="hidden" name="description[% line.accountno %]" value="[% line.description %]" />
Lines 81-95 Link Here
81
</tr>
101
</tr>
82
[% END %]
102
[% END %]
83
[% END %]
103
[% END %]
84
<tr>
104
</tbody>
85
    <td class="total" colspan="7">Total Due:</td>
86
    <td>[% total | format('%.2f') %]</td>
87
</tr>
88
</table>
105
</table>
89
<fieldset class="action">
106
<fieldset class="action">
90
<input type="submit" name="paycollect"  value="Pay Amount" class="submit" />
107
<input type="submit" name="paycollect"  value="Pay amount" class="submit" />
91
<input type="submit" name="woall"  value="Writeoff All" class="submit" />
108
<input type="submit" name="woall"  id="woall" value="Write off all" class="submit" />
92
<input type="submit" name="payselected"  value="Pay Selected" class="submit" />
109
<input type="submit" name="payselected"  value="Pay selected" class="submit" />
93
<a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
110
<a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
94
</fieldset>
111
</fieldset>
95
</form>
112
</form>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (-84 / +72 lines)
Lines 57-63 function moneyFormat(textObj) { Link Here
57
<body>
57
<body>
58
[% INCLUDE 'header.inc' %]
58
[% INCLUDE 'header.inc' %]
59
[% INCLUDE 'patron-search.inc' %]
59
[% INCLUDE 'patron-search.inc' %]
60
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Pay Fines for [% borrower.firstname %] [% borrower.surname %]</div>
60
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Pay Fines for [% borrower.firstname %] [% borrower.surname %]</a> &rsaquo; [% IF ( pay_individual ) %]Pay an individual fine[% ELSIF ( writeoff_individual ) %]Write off an individual fine[% ELSE %][% IF ( selected_accts ) %]Pay an amount toward selected fines[% ELSE %]Pay an amount toward all fines[% END %][% END %]</div>
61
61
62
<div id="doc3" class="yui-t2">
62
<div id="doc3" class="yui-t2">
63
63
Lines 102-151 function moneyFormat(textObj) { Link Here
102
    <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" />
102
    <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" />
103
    <input type="hidden" name="accountno" id="accountno" value="[% accountno %]" />
103
    <input type="hidden" name="accountno" id="accountno" value="[% accountno %]" />
104
    <input type="hidden" name="title" id="title" value="[% title %]" />
104
    <input type="hidden" name="title" id="title" value="[% title %]" />
105
106
<fieldset class="rows">
107
    <legend>Pay an individual fine</legend>
105
    <table>
108
    <table>
106
    <tr>
109
    <thead><tr>
107
        <th>Description</th>
110
            <th>Description</th>
108
        <th>Account Type</th>
111
            <th>Account Type</th>
109
        <th>Notify id</th>
112
            <th>Notify id</th>
110
        <th>Level</th>
113
            <th>Level</th>
111
        <th>Amount</th>
114
            <th>Amount</th>
112
        <th>Amount Outstanding</th>
115
            <th>Amount Outstanding</th>
113
    </tr>
116
        </tr></thead>
114
    <tr>
117
    <tfoot>
115
        <td>
118
        <td colspan="5">Total amount payable:</td><td>[% amountoutstanding | format('%.2f') %]</td>
116
            [% description %] [% title  %]
119
    </tfoot>
117
        </td>
120
    <tbody><tr>
118
        <td>[% accounttype %]</td>
121
            <td>
119
        <td>[% notify_id %]</td>
122
                [% description %] [% title  %]
120
        <td>[% notify_level %]</td>
123
            </td>
121
        <td class="debit">[% amount | format('%.2f') %]</td>
124
            <td>[% accounttype %]</td>
122
        <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
125
            <td>[% notify_id %]</td>
123
    </tr>
126
            <td>[% notify_level %]</td>
124
    <tr>
127
            <td class="debit">[% amount | format('%.2f') %]</td>
125
        <td>Total Amount Payable : </td>
128
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
126
        <td>[% amountoutstanding | format('%.2f') %]</td>
129
        </tr></tbody>
127
        <td colspan="4"></td>
130
</table>
128
    </tr>
131
129
    <tr><td colspan="6"> </td></tr>
132
<ol>
130
    <tr>
133
131
        <td>Collect From Patron: </td>
134
    <li>
132
        <td>
135
        <label for="paid">Collect from patron: </label>
133
            <!-- default to paying all -->
136
            <!-- default to paying all -->
134
        <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payindivfine.paid)"/>
137
        <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" onchange="moneyFormat(document.payindivfine.paid)"/>
135
        </td>
138
    </li>
136
    </tr>
139
</ol>
137
    <tr><td colspan="6"></td></tr>
140
</fieldset>
138
    <tr>
139
        <td colspan="6">
140
        <input type="submit" name="submitbutton" value="Confirm" />
141
        <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
142
        </td>
143
    </tr>
144
141
145
    </table>
142
    <div class="action"><input type="submit" name="submitbutton" value="Confirm" />
143
        <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a></div>
146
    </form>
144
    </form>
147
[% ELSIF ( writeoff_individual ) %]
145
[% ELSIF ( writeoff_individual ) %]
148
    <form name="woindivfine" action="/cgi-bin/koha/members/pay.pl" method="post" >
146
    <form name="woindivfine" action="/cgi-bin/koha/members/pay.pl" method="post" >
147
    <fieldset class="rows">
148
    <legend>Write off an individual fine</legend>
149
    <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
149
    <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
150
    <input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual %]" />
150
    <input type="hidden" name="pay_individual" id="pay_individual" value="[% pay_individual %]" />
151
    <input type="hidden" name="description" id="description" value="[% description %]" />
151
    <input type="hidden" name="description" id="description" value="[% description %]" />
Lines 157-189 function moneyFormat(textObj) { Link Here
157
    <input type="hidden" name="accountno" id="accountno" value="[% accountno %]" />
157
    <input type="hidden" name="accountno" id="accountno" value="[% accountno %]" />
158
    <input type="hidden" name="title" id="title" value="[% title %]" />
158
    <input type="hidden" name="title" id="title" value="[% title %]" />
159
    <table>
159
    <table>
160
    <tr>
160
    <thead><tr>
161
        <th>Description</th>
161
            <th>Description</th>
162
        <th>Account Type</th>
162
            <th>Account Type</th>
163
        <th>Notify id</th>
163
            <th>Notify id</th>
164
        <th>Level</th>
164
            <th>Level</th>
165
        <th>Amount</th>
165
            <th>Amount</th>
166
        <th>Amount Outstanding</th>
166
            <th>Amount Outstanding</th>
167
    </tr>
167
        </tr></thead>
168
    <tr>
168
    <tfoot><td colspan="5">Total amount to be written off:</td><td>[% amountoutstanding | format('%.2f') %]</td></tfoot>
169
        <td>[% description %] [% title %]</td>
169
    <tbody><tr>
170
        <td>[% accounttype %]</td>
170
            <td>[% description %] [% title %]</td>
171
        <td>[% notify_id %]</td>
171
            <td>[% accounttype %]</td>
172
        <td>[% notify_level %]</td>
172
            <td>[% notify_id %]</td>
173
        <td class="debit">[% amount | format('%.2f') %]</td>
173
            <td>[% notify_level %]</td>
174
        <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
174
            <td class="debit">[% amount | format('%.2f') %]</td>
175
    </tr>
175
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
176
    <tr><td colspan="6"> </td></tr>
176
        </tr></tbody>
177
    <tr><td colspan="6"><strong>Writeoff This Charge?</strong></td></tr>
178
    <tr><td> </td></tr>
179
    <tr>
180
        <td colspan="6">
181
        <input type="submit" name="confirm_writeoff" id="confirm_writeoff" value="Confirm" />
182
        <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
183
        </td>
184
    </tr>
185
186
    </table>
177
    </table>
178
    </fieldset>
179
    <div class="action"><input type="submit" name="confirm_writeoff" id="confirm_writeoff" value="Write off this charge" />
180
        <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a></div>
187
    </form>
181
    </form>
188
[% ELSE %]
182
[% ELSE %]
189
183
Lines 192-218 function moneyFormat(textObj) { Link Here
192
    <input type="hidden" name="selected_accts" id="selected_accts" value="[% selected_accts %]" />
186
    <input type="hidden" name="selected_accts" id="selected_accts" value="[% selected_accts %]" />
193
    <input type="hidden" name="total" id="total" value="[% total %]" />
187
    <input type="hidden" name="total" id="total" value="[% total %]" />
194
188
195
    <table>
189
    <fieldset class="rows">
196
    <tr>
190
    [% IF ( selected_accts ) %]<legend>Pay an amount toward selected fines</legend>[% ELSE %]<legend>Pay an amount toward all fines</legend>[% END %]
197
        <td>Total Amount Outstanding : </td>
191
    <ol>
198
        <td class="debit">[% total | format('%.2f') %]</td>
192
        <li>
199
    </tr>
193
            <span class="label">Total amount outstanding: </span>
200
    <tr><td colspan="2"> </td></tr>
194
            <span class="debit">[% total | format('%.2f') %]</span>
201
    <tr>
195
        </li>
202
        <td>Collect From Patron: </td>
196
    <li>
203
        <td>
197
        <label for="paid">Collect from patron: </label>
204
        <!-- default to paying all -->
198
        <!-- default to paying all -->
205
        <input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payfine.paid)"/>
199
        <input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payfine.paid)"/>
206
        </td>
200
    </li>
207
    </tr>
201
    </ol>
208
    <tr><td></td></tr>
202
    </fieldset>
209
    <tr>
203
    <div class="action"><input type="submit" name="submitbutton" value="Confirm" />
210
        <td colspan="2">
204
        <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a></div>
211
        <input type="submit" name="submitbutton" value="Confirm" />
212
        <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
213
        </td>
214
    </tr>
215
    </table>
216
    </form>
205
    </form>
217
[% END %]
206
[% END %]
218
</div></div>
207
</div></div>
219
- 

Return to bug 7080