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

(-)a/C4/Accounts.pm (-4 / +5 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, $notes ) = @_;
689
689
690
    my $dbh        = C4::Context->dbh;
690
    my $dbh        = C4::Context->dbh;
691
    my $newamtos   = 0;
691
    my $newamtos   = 0;
Lines 726-736 sub recordpayment_selectaccts { Link Here
726
        $sth->execute( $newamtos, $thisacct );
726
        $sth->execute( $newamtos, $thisacct );
727
    }
727
    }
728
728
729
    my $note = join( "\n", @$notes );
729
    # create new line
730
    # create new line
730
    $sql = 'INSERT INTO accountlines ' .
731
    $sql = 'INSERT INTO accountlines ' .
731
    '(borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id) ' .
732
    '(borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id,note) ' .
732
    q|VALUES (?,?,now(),?,'Payment,thanks','Pay',?,?)|;
733
    q|VALUES (?,?,now(),?,'Payment,thanks','Pay',?,?,?)|;
733
    $dbh->do($sql,{},$borrowernumber, $nextaccntno, 0 - $amount, 0 - $amountleft, $manager_id );
734
    $dbh->do($sql,{},$borrowernumber, $nextaccntno, 0 - $amount, 0 - $amountleft, $manager_id, $note );
734
    UpdateStats( $branch, 'payment', $amount, '', '', '', $borrowernumber, $nextaccntno );
735
    UpdateStats( $branch, 'payment', $amount, '', '', '', $borrowernumber, $nextaccntno );
735
    return;
736
    return;
736
}
737
}
(-)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/paycollect.tt (+1 lines)
Lines 190-195 function moneyFormat(textObj) { Link Here
190
    <form name="payfine" onsubmit="return validatePayment(this);" method="post" action="/cgi-bin/koha/members/paycollect.pl">
190
    <form name="payfine" onsubmit="return validatePayment(this);" method="post" action="/cgi-bin/koha/members/paycollect.pl">
191
    <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
191
    <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrower.borrowernumber %]" />
192
    <input type="hidden" name="selected_accts" id="selected_accts" value="[% selected_accts %]" />
192
    <input type="hidden" name="selected_accts" id="selected_accts" value="[% selected_accts %]" />
193
    <input type="hidden" name="selected_accts_notes" id="selected_accts_notes" value="[% selected_accts_notes %]" />
193
    <input type="hidden" name="total" id="total" value="[% total %]" />
194
    <input type="hidden" name="total" id="total" value="[% total %]" />
194
195
195
    <fieldset class="rows">
196
    <fieldset class="rows">
(-)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('__DLMTR__', 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 @notes = split( '__DLMTR__', $input->param('selected_accts_notes') );
124
                    \@acc );
125
                recordpayment_selectaccts( $borrowernumber, $total_paid, \@acc, \@notes );
125
            } else {
126
            } else {
126
                recordpayment( $borrowernumber, $total_paid );
127
                recordpayment( $borrowernumber, $total_paid );
127
            }
128
            }
128
- 

Return to bug 6413