<li>
<label for="paid">Collect from patron: </label>
<!-- default to paying all -->
- <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" />
+ <input name="paid" id="paid" value="[% amountoutstanding %]" />
</li>
</ol>
</fieldset>
<input type="hidden" name="description" id="description" value="[% description %]" />
<input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
<input type="hidden" name="amount" id="amount" value="[% amount %]" />
- <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" />
<input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" />
<input type="hidden" name="title" id="title" value="[% title %]" />
<input type="hidden" name="payment_note" id="payment_note" value="[% payment_note %]" />
<th>Amount</th>
<th>Amount outstanding</th>
</tr></thead>
- <tfoot><td colspan="3">Total amount to be written off:</td><td>[% amountoutstanding | format('%.2f') %]</td></tfoot>
+ <tfoot><td colspan="3">Total amount outstanding:</td><td>[% amountoutstanding | format('%.2f') %]</td></tfoot>
<tbody><tr>
<td>[% description %] [% title %]</td>
<td>[% accounttype %]</td>
<td class="debit">[% amountoutstanding | format('%.2f') %]</td>
</tr></tbody>
</table>
- </fieldset>
- <div class="action"><input type="submit" name="confirm_writeoff" id="confirm_writeoff" value="Write off this charge" />
+
+ <ol>
+ <li>
+ <label for="paid">Writeoff amount: </label>
+ <!-- default to writing off all -->
+ <input name="amountwrittenoff" id="amountwrittenoff" value="[% amountoutstanding %]" />
+ </li>
+ </ol>
+ </fieldset>
+ <div class="action"><input type="submit" name="confirm_writeoff" id="confirm_writeoff" value="Write off this charge" />
<a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a></div>
</form>
[% ELSE %]
writeoff_all(@names);
} elsif ($writeoff_item) {
my $accountlines_id = $input->param('accountlines_id');
- my $amount = $input->param('amountoutstanding');
+ my $amount = $input->param('amountwrittenoff');
my $payment_note = $input->param("payment_note");
Koha::Account->new( { patron_id => $borrowernumber } )->pay(