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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (-5 / +12 lines)
Lines 145-151 function moneyFormat(textObj) { Link Here
145
    <li>
145
    <li>
146
        <label for="paid">Collect from patron: </label>
146
        <label for="paid">Collect from patron: </label>
147
            <!-- default to paying all -->
147
            <!-- default to paying all -->
148
        <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" />
148
        <input name="paid" id="paid" value="[% amountoutstanding %]" />
149
    </li>
149
    </li>
150
</ol>
150
</ol>
151
</fieldset>
151
</fieldset>
Lines 165-171 function moneyFormat(textObj) { Link Here
165
    <input type="hidden" name="notify_id" id="notify_id" value="[% notify_id %]" />
165
    <input type="hidden" name="notify_id" id="notify_id" value="[% notify_id %]" />
166
    <input type="hidden" name="notify_level" id="notify_level" value="[% notify_level %]" />
166
    <input type="hidden" name="notify_level" id="notify_level" value="[% notify_level %]" />
167
    <input type="hidden" name="amount" id="amount" value="[% amount %]" />
167
    <input type="hidden" name="amount" id="amount" value="[% amount %]" />
168
    <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" />
169
    <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" />
168
    <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" />
170
    <input type="hidden" name="title" id="title" value="[% title %]" />
169
    <input type="hidden" name="title" id="title" value="[% title %]" />
171
    <input type="hidden" name="payment_note" id="payment_note" value="[% payment_note %]" />
170
    <input type="hidden" name="payment_note" id="payment_note" value="[% payment_note %]" />
Lines 178-184 function moneyFormat(textObj) { Link Here
178
            <th>Amount</th>
177
            <th>Amount</th>
179
            <th>Amount outstanding</th>
178
            <th>Amount outstanding</th>
180
        </tr></thead>
179
        </tr></thead>
181
    <tfoot><td colspan="5">Total amount to be written off:</td><td>[% amountoutstanding | format('%.2f') %]</td></tfoot>
180
    <tfoot><td colspan="5">Total amount outstanding:</td><td>[% amountoutstanding | format('%.2f') %]</td></tfoot>
182
    <tbody><tr>
181
    <tbody><tr>
183
            <td>[% description %] [% title %]</td>
182
            <td>[% description %] [% title %]</td>
184
            <td>[% accounttype %]</td>
183
            <td>[% accounttype %]</td>
Lines 188-195 function moneyFormat(textObj) { Link Here
188
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
187
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
189
        </tr></tbody>
188
        </tr></tbody>
190
    </table>
189
    </table>
191
    </fieldset>
190
192
    <div class="action"><input type="submit" name="confirm_writeoff" id="confirm_writeoff" value="Write off this charge" />
191
            <ol>
192
                <li>
193
                    <label for="paid">Writeoff amount: </label>
194
                    <!-- default to writing off all -->
195
                    <input name="amountwrittenoff" id="amountwrittenoff" value="[% amountoutstanding %]" />
196
                </li>
197
            </ol>
198
        </fieldset>
199
        <div class="action"><input type="submit" name="confirm_writeoff" id="confirm_writeoff" value="Write off this charge" />
193
        <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a></div>
200
        <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a></div>
194
    </form>
201
    </form>
195
[% ELSE %]
202
[% ELSE %]
(-)a/members/pay.pl (-2 / +1 lines)
Lines 97-103 if ($writeoff_all) { Link Here
97
    writeoff_all(@names);
97
    writeoff_all(@names);
98
} elsif ($writeoff_item) {
98
} elsif ($writeoff_item) {
99
    my $accountlines_id = $input->param('accountlines_id');
99
    my $accountlines_id = $input->param('accountlines_id');
100
    my $amount       = $input->param('amountoutstanding');
100
    my $amount       = $input->param('amountwrittenoff');
101
    my $payment_note = $input->param("payment_note");
101
    my $payment_note = $input->param("payment_note");
102
102
103
    Koha::Account->new( { patron_id => $borrowernumber } )->pay(
103
    Koha::Account->new( { patron_id => $borrowernumber } )->pay(
104
- 

Return to bug 11210