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

(-)a/C4/Accounts.pm (-4 / +4 lines)
Lines 685-691 will be credited to the next one. Link Here
685
=cut
685
=cut
686
686
687
sub recordpayment_selectaccts {
687
sub recordpayment_selectaccts {
688
    my ( $borrowernumber, $amount, $accts ) = @_;
688
    my ( $borrowernumber, $amount, $accts, $note ) = @_;
689
689
690
    my $dbh        = C4::Context->dbh;
690
    my $dbh        = C4::Context->dbh;
691
    my $newamtos   = 0;
691
    my $newamtos   = 0;
Lines 728-736 sub recordpayment_selectaccts { Link Here
728
728
729
    # create new line
729
    # create new line
730
    $sql = 'INSERT INTO accountlines ' .
730
    $sql = 'INSERT INTO accountlines ' .
731
    '(borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id) ' .
731
    '(borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id,note) ' .
732
    q|VALUES (?,?,now(),?,'Payment,thanks','Pay',?,?)|;
732
    q|VALUES (?,?,now(),?,'Payment,thanks','Pay',?,?,?)|;
733
    $dbh->do($sql,{},$borrowernumber, $nextaccntno, 0 - $amount, 0 - $amountleft, $manager_id );
733
    $dbh->do($sql,{},$borrowernumber, $nextaccntno, 0 - $amount, 0 - $amountleft, $manager_id, $note );
734
    UpdateStats( $branch, 'payment', $amount, '', '', '', $borrowernumber, $nextaccntno );
734
    UpdateStats( $branch, 'payment', $amount, '', '', '', $borrowernumber, $nextaccntno );
735
    return;
735
    return;
736
}
736
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-1 / +1 lines)
Lines 45-51 Link Here
45
   [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
45
   [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
46
      <td>[% account.date %]</td>
46
      <td>[% account.date %]</td>
47
      <td>[% account.description %]&nbsp;[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&amp;itemnumber=[% account.itemnumber %]">View item</a>&nbsp;[% END %][% account.title |html %]</td>
47
      <td>[% account.description %]&nbsp;[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&amp;itemnumber=[% account.itemnumber %]">View item</a>&nbsp;[% END %][% account.title |html %]</td>
48
      <td>[% account.note %]</td>
48
      <td>[% account.note | html_line_break %]</td>
49
      [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td>
49
      [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td>
50
      [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</td>
50
      [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</td>
51
    [% IF ( reverse_col ) %]
51
    [% IF ( reverse_col ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-1 / +1 lines)
Lines 88-94 Link Here
88
    [% END %]
88
    [% END %]
89
    </td>
89
    </td>
90
    <td>[% line.description %] ([% line.title |html_entity %])</td>
90
    <td>[% line.description %] ([% line.title |html_entity %])</td>
91
    <td><input type="text" name="payment_note_[% line.accountno %]"></input></td>
91
    <td><input type="text" name="payment_note_[% line.accountno %]" /></td>
92
    <td>[% line.accounttype %]</td>
92
    <td>[% line.accounttype %]</td>
93
    <td>[% line.notify_id %]</td>
93
    <td>[% line.notify_id %]</td>
94
    <td>[% line.notify_level %]</td>
94
    <td>[% line.notify_level %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (+4 lines)
Lines 204-209 function moneyFormat(textObj) { Link Here
204
        <!-- default to paying all -->
204
        <!-- default to paying all -->
205
        <input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payfine.paid)"/>
205
        <input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payfine.paid)"/>
206
    </li>
206
    </li>
207
    <li>
208
        <label for="selected_accts_notes">Note: </label>
209
        <textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea>
210
    </li>
207
    </ol>
211
    </ol>
208
    </fieldset>
212
    </fieldset>
209
    <div class="action"><input type="submit" name="submitbutton" value="Confirm" />
213
    <div class="action"><input type="submit" name="submitbutton" value="Confirm" />
(-)a/members/pay.pl (-1 / +3 lines)
Lines 266-275 sub payselected { Link Here
266
    }
266
    }
267
    $amt = '&amt=' . $amt;
267
    $amt = '&amt=' . $amt;
268
    my $sel = '&selected=' . join ',', @lines_to_pay;
268
    my $sel = '&selected=' . join ',', @lines_to_pay;
269
    my $notes = '&notes=' . join("%0A", map { $input->param("payment_note_$_") } @lines_to_pay );
269
    my $redirect =
270
    my $redirect =
270
        "/cgi-bin/koha/members/paycollect.pl?borrowernumber=$borrowernumber"
271
        "/cgi-bin/koha/members/paycollect.pl?borrowernumber=$borrowernumber"
271
      . $amt
272
      . $amt
272
      . $sel;
273
      . $sel
274
      . $notes;
273
275
274
    print $input->redirect($redirect);
276
    print $input->redirect($redirect);
275
    return;
277
    return;
(-)a/members/paycollect.pl (-4 / +4 lines)
Lines 93-99 if ( $individual || $writeoff ) { Link Here
93
    $total_due = $input->param('amt');
93
    $total_due = $input->param('amt');
94
    $template->param(
94
    $template->param(
95
        selected_accts => $select_lines,
95
        selected_accts => $select_lines,
96
        amt            => $total_due
96
        amt            => $total_due,
97
        selected_accts_notes => $input->param('notes'),
97
    );
98
    );
98
}
99
}
99
100
Lines 120-127 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
120
                    $select = $1;    # ensure passing no junk
121
                    $select = $1;    # ensure passing no junk
121
                }
122
                }
122
                my @acc = split /,/, $select;
123
                my @acc = split /,/, $select;
123
                recordpayment_selectaccts( $borrowernumber, $total_paid,
124
                my $note = $input->param('selected_accts_notes');
124
                    \@acc );
125
                recordpayment_selectaccts( $borrowernumber, $total_paid, \@acc, $note );
125
            } else {
126
            } else {
126
                recordpayment( $borrowernumber, $total_paid );
127
                recordpayment( $borrowernumber, $total_paid );
127
            }
128
            }
128
- 

Return to bug 6413