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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-15 / +14 lines)
Lines 94-118 function enableCheckboxActions(){ Link Here
94
<tr>
94
<tr>
95
    <td>
95
    <td>
96
    [% IF ( line.amountoutstanding > 0 ) %]
96
    [% IF ( line.amountoutstanding > 0 ) %]
97
        <input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountno %]" />
97
        <input class="cb" type="checkbox" checked="checked" name="incl_par_[% line.accountlines_id %]" />
98
    [% END %]
98
    [% END %]
99
    </td>
99
    </td>
100
    <td>
100
    <td>
101
    [% IF ( line.amountoutstanding > 0 ) %]
101
    [% IF ( line.amountoutstanding > 0 ) %]
102
        <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
102
        <input type="submit" name="pay_indiv_[% line.accountlines_id %]" value="Pay" />
103
        [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="wo_indiv_[% line.accountno %]" value="Write off" />[% END %]
103
        [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="wo_indiv_[% line.accountlines_id %]" value="Write off" />[% END %]
104
    [% END %]
104
    [% END %]
105
    <input type="hidden" name="itemnumber[% line.accountno %]" value="[% line.itemnumber %]" />
105
    <input type="hidden" name="itemnumber[% line.accountlines_id %]" value="[% line.itemnumber %]" />
106
    <input type="hidden" name="description[% line.accountno %]" value="[% line.description %]" />
106
    <input type="hidden" name="description[% line.accountlines_id %]" value="[% line.description %]" />
107
    <input type="hidden" name="accounttype[% line.accountno %]" value="[% line.accounttype %]" />
107
    <input type="hidden" name="accounttype[% line.accountlines_id %]" value="[% line.accounttype %]" />
108
    <input type="hidden" name="amount[% line.accountno %]" value="[% line.amount %]" />
108
    <input type="hidden" name="amount[% line.accountlines_id %]" value="[% line.amount %]" />
109
    <input type="hidden" name="accountlines_id[% line.accountno %]" value="[% line.accountlines_id %]" />
109
    <input type="hidden" name="accountlines_id[% line.accountlines_id %]" value="[% line.accountlines_id %]" />
110
    <input type="hidden" name="amountoutstanding[% line.accountno %]" value="[% line.amountoutstanding %]" />
110
    <input type="hidden" name="amountoutstanding[% line.accountlines_id %]" value="[% line.amountoutstanding %]" />
111
    <input type="hidden" name="borrowernumber[% line.accountno %]" value="[% line.borrowernumber %]" />
111
    <input type="hidden" name="borrowernumber[% line.accountlines_id %]" value="[% line.borrowernumber %]" />
112
    <input type="hidden" name="accountno[% line.accountno %]" value="[% line.accountno %]" />
112
    <input type="hidden" name="notify_id[% line.accountlines_id %]" value="[% line.notify_id %]" />
113
    <input type="hidden" name="notify_id[% line.accountno %]" value="[% line.notify_id %]" />
113
    <input type="hidden" name="notify_level[% line.accountlines_id %]" value="[% line.notify_level %]" />
114
    <input type="hidden" name="notify_level[% line.accountno %]" value="[% line.notify_level %]" />
114
    <input type="hidden" name="totals[% line.accountlines_id %]" value="[% line.totals %]" />
115
    <input type="hidden" name="totals[% line.accountno %]" value="[% line.totals %]" />
116
    </td>
115
    </td>
117
    <td>
116
    <td>
118
        [% SWITCH line.accounttype %]
117
        [% SWITCH line.accounttype %]
Lines 139-145 function enableCheckboxActions(){ Link Here
139
        [%- IF line.description %], [% line.description %][% END %]
138
        [%- IF line.description %], [% line.description %][% END %]
140
        [% IF line.title %]([% line.title %])[% END %]
139
        [% IF line.title %]([% line.title %])[% END %]
141
    </td>
140
    </td>
142
    <td><input type="text" name="payment_note_[% line.accountno %]" /></td>
141
    <td><input type="text" name="payment_note_[% line.accountlines_id %]" /></td>
143
    <td>[% line.accounttype %]</td>
142
    <td>[% line.accounttype %]</td>
144
    <td>[% line.notify_id %]</td>
143
    <td>[% line.notify_id %]</td>
145
    <td>[% line.notify_level %]</td>
144
    <td>[% line.notify_level %]</td>
(-)a/members/pay.pl (-5 / +2 lines)
Lines 170-176 sub redirect_to_paycollect { Link Here
170
    $redirect .= get_for_redirect( 'amount', "amount$line_no", 1 );
170
    $redirect .= get_for_redirect( 'amount', "amount$line_no", 1 );
171
    $redirect .=
171
    $redirect .=
172
      get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 );
172
      get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 );
173
    $redirect .= get_for_redirect( 'accountno',    "accountno$line_no",    0 );
174
    $redirect .= get_for_redirect( 'title',        "title$line_no",        0 );
173
    $redirect .= get_for_redirect( 'title',        "title$line_no",        0 );
175
    $redirect .= get_for_redirect( 'itemnumber',   "itemnumber$line_no",   0 );
174
    $redirect .= get_for_redirect( 'itemnumber',   "itemnumber$line_no",   0 );
176
    $redirect .= get_for_redirect( 'notify_id',    "notify_id$line_no",    0 );
175
    $redirect .= get_for_redirect( 'notify_id',    "notify_id$line_no",    0 );
Lines 184-190 sub redirect_to_paycollect { Link Here
184
183
185
sub writeoff_all {
184
sub writeoff_all {
186
    my @params = @_;
185
    my @params = @_;
187
    my @wo_lines = grep { /^accountno\d+$/ } @params;
186
    my @wo_lines = grep { /^accountlines_id\d+$/ } @params;
188
    for (@wo_lines) {
187
    for (@wo_lines) {
189
        if (/(\d+)/) {
188
        if (/(\d+)/) {
190
            my $value       = $1;
189
            my $value       = $1;
Lines 193-199 sub writeoff_all { Link Here
193
            #    my $borrowernum    = $input->param("borrowernumber$value");
192
            #    my $borrowernum    = $input->param("borrowernumber$value");
194
            my $itemno    = $input->param("itemnumber$value");
193
            my $itemno    = $input->param("itemnumber$value");
195
            my $amount    = $input->param("amountoutstanding$value");
194
            my $amount    = $input->param("amountoutstanding$value");
196
            my $accountno = $input->param("accountno$value");
197
            my $accountlines_id = $input->param("accountlines_id$value");
195
            my $accountlines_id = $input->param("accountlines_id$value");
198
            my $payment_note = $input->param("payment_note_$value");
196
            my $payment_note = $input->param("payment_note_$value");
199
            WriteOffFee( $borrowernumber, $accountlines_id, $itemno, $accounttype, $amount, $branch, $payment_note );
197
            WriteOffFee( $borrowernumber, $accountlines_id, $itemno, $accounttype, $amount, $branch, $payment_note );
Lines 250-256 sub payselected { Link Here
250
    foreach (@params) {
248
    foreach (@params) {
251
        if (/^incl_par_(\d+)$/) {
249
        if (/^incl_par_(\d+)$/) {
252
            my $index = $1;
250
            my $index = $1;
253
            push @lines_to_pay, $input->param("accountno$index");
251
            push @lines_to_pay, $input->param("accountlines_id$index");
254
            $amt += $input->param("amountoutstanding$index");
252
            $amt += $input->param("amountoutstanding$index");
255
        }
253
        }
256
    }
254
    }
257
- 

Return to bug 14498