Lines 25-31
use List::MoreUtils qw( any 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 849-856
sub add_enrolment_fee_if_needed {
Link Here
|
849 |
my ($self) = @_; |
848 |
my ($self) = @_; |
850 |
my $enrolment_fee = $self->category->enrolmentfee; |
849 |
my $enrolment_fee = $self->category->enrolmentfee; |
851 |
if ( $enrolment_fee && $enrolment_fee > 0 ) { |
850 |
if ( $enrolment_fee && $enrolment_fee > 0 ) { |
852 |
# insert fee in patron debts |
851 |
$self->account->add_debit( |
853 |
C4::Accounts::manualinvoice( $self->borrowernumber, '', '', 'A', $enrolment_fee ); |
852 |
{ |
|
|
853 |
amount => $enrolment_fee, |
854 |
user_id => C4::Context->userenv ? C4::Context->userenv->{'number'} : 0, |
855 |
library_id => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef, |
856 |
type => 'account' |
857 |
} |
858 |
); |
854 |
} |
859 |
} |
855 |
return $enrolment_fee || 0; |
860 |
return $enrolment_fee || 0; |
856 |
} |
861 |
} |
Lines 1297-1306
sub _type {
Link Here
|
1297 |
return 'Borrower'; |
1302 |
return 'Borrower'; |
1298 |
} |
1303 |
} |
1299 |
|
1304 |
|
1300 |
=head1 AUTHOR |
1305 |
=head1 AUTHORS |
1301 |
|
1306 |
|
1302 |
Kyle M Hall <kyle@bywatersolutions.com> |
1307 |
Kyle M Hall <kyle@bywatersolutions.com> |
1303 |
Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com> |
1308 |
Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com> |
|
|
1309 |
Martin Renvoize <martin.renvoize@ptfs-europe.com> |
1304 |
|
1310 |
|
1305 |
=cut |
1311 |
=cut |
1306 |
|
1312 |
|
1307 |
- |
|
|