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

(-)a/Koha/Patron.pm (-5 / +10 lines)
Lines 25-31 use List::MoreUtils qw( uniq ); Link Here
25
use JSON qw( to_json );
25
use JSON qw( to_json );
26
use Text::Unaccent qw( unac_string );
26
use Text::Unaccent qw( unac_string );
27
27
28
use C4::Accounts;
29
use C4::Context;
28
use C4::Context;
30
use C4::Log;
29
use C4::Log;
31
use Koha::AuthUtils;
30
use Koha::AuthUtils;
Lines 832-839 sub add_enrolment_fee_if_needed { Link Here
832
    my ($self) = @_;
831
    my ($self) = @_;
833
    my $enrolment_fee = $self->category->enrolmentfee;
832
    my $enrolment_fee = $self->category->enrolmentfee;
834
    if ( $enrolment_fee && $enrolment_fee > 0 ) {
833
    if ( $enrolment_fee && $enrolment_fee > 0 ) {
835
        # insert fee in patron debts
834
        $self->account->add_debit(
836
        C4::Accounts::manualinvoice( $self->borrowernumber, '', '', 'A', $enrolment_fee );
835
            {
836
                amount  => $enrolment_fee,
837
                user_id => C4::Context->userenv ? C4::Context->userenv->{'number'} : 0,
838
                library_id => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef,
839
                type => 'account'
840
            }
841
        );
837
    }
842
    }
838
    return $enrolment_fee || 0;
843
    return $enrolment_fee || 0;
839
}
844
}
Lines 1279-1288 sub _type { Link Here
1279
    return 'Borrower';
1284
    return 'Borrower';
1280
}
1285
}
1281
1286
1282
=head1 AUTHOR
1287
=head1 AUTHORS
1283
1288
1284
Kyle M Hall <kyle@bywatersolutions.com>
1289
Kyle M Hall <kyle@bywatersolutions.com>
1285
Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
1290
Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
1291
Martin Renvoize <martin.renvoize@ptfs-europe.com>
1286
1292
1287
=cut
1293
=cut
1288
1294
1289
- 

Return to bug 21756