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

(-)a/members/paycollect.pl (-13 / +9 lines)
Lines 57-67 my $patron = Koha::Patrons->find( $borrowernumber ); Link Here
57
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
57
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
58
58
59
my $borrower       = $patron->unblessed;
59
my $borrower       = $patron->unblessed;
60
my $account        = $patron->account;
60
my $category       = $patron->category;
61
my $category       = $patron->category;
61
my $user           = $input->remote_user;
62
my $user           = $input->remote_user;
62
63
63
my $branch    = C4::Context->userenv->{'branch'};
64
my $library_id = C4::Context->userenv->{'branch'};
64
my $total_due = $patron->account->outstanding_debits->total_outstanding;
65
my $total_due  = $account->outstanding_debits->total_outstanding;
65
66
66
my $total_paid = $input->param('paid');
67
my $total_paid = $input->param('paid');
67
68
Lines 120-130 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
120
121
121
        if ($pay_individual) {
122
        if ($pay_individual) {
122
            my $line = Koha::Account::Lines->find($accountlines_id);
123
            my $line = Koha::Account::Lines->find($accountlines_id);
123
            Koha::Account->new( { patron_id => $borrowernumber } )->pay(
124
            $account->pay(
124
                {
125
                {
125
                    lines        => [$line],
126
                    lines        => [$line],
126
                    amount       => $total_paid,
127
                    amount       => $total_paid,
127
                    library_id   => $branch,
128
                    library_id   => $library_id,
128
                    note         => $payment_note,
129
                    note         => $payment_note,
129
                    interface    => C4::Context->interface,
130
                    interface    => C4::Context->interface,
130
                    payment_type => $payment_type,
131
                    payment_type => $payment_type,
Lines 149-163 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
149
                    { order_by => 'date' }
150
                    { order_by => 'date' }
150
                );
151
                );
151
152
152
                Koha::Account->new(
153
                $account->pay(
153
                    {
154
                        patron_id => $borrowernumber,
155
                    }
156
                  )->pay(
157
                    {
154
                    {
158
                        type         => $type,
155
                        type         => $type,
159
                        amount       => $total_paid,
156
                        amount       => $total_paid,
160
                        library_id   => $branch,
157
                        library_id   => $library_id,
161
                        lines        => \@lines,
158
                        lines        => \@lines,
162
                        note         => $note,
159
                        note         => $note,
163
                        interface    => C4::Context->interface,
160
                        interface    => C4::Context->interface,
Lines 167-176 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
167
            }
164
            }
168
            else {
165
            else {
169
                my $note = $input->param('selected_accts_notes');
166
                my $note = $input->param('selected_accts_notes');
170
                Koha::Account->new( { patron_id => $borrowernumber } )->pay(
167
                $account->pay(
171
                    {
168
                    {
172
                        amount       => $total_paid,
169
                        amount       => $total_paid,
173
                        library_id   => $branch,
170
                        library_id   => $library_id,
174
                        note         => $note,
171
                        note         => $note,
175
                        payment_type => $payment_type,
172
                        payment_type => $payment_type,
176
                        interface    => C4::Context->interface
173
                        interface    => C4::Context->interface
177
- 

Return to bug 21801