Lines 27-39
use POSIX qw( ceil floor );
Link Here
|
27 |
use Locale::Currency::Format 1.28 qw( currency_format FMT_SYMBOL ); |
27 |
use Locale::Currency::Format 1.28 qw( currency_format FMT_SYMBOL ); |
28 |
use Carp qw( carp ); |
28 |
use Carp qw( carp ); |
29 |
|
29 |
|
30 |
use C4::Context; |
|
|
31 |
use C4::Accounts; |
30 |
use C4::Accounts; |
32 |
use Koha::Logger; |
31 |
use C4::Context; |
33 |
use Koha::Account::Lines; |
32 |
use Koha::Account::Lines; |
34 |
use Koha::Account::Offsets; |
33 |
use Koha::Account::Offsets; |
35 |
use Koha::Libraries; |
34 |
use Koha::Libraries; |
36 |
use Koha::Recalls; |
35 |
use Koha::Recalls; |
|
|
36 |
use Koha::Logger; |
37 |
use Koha::Patrons; |
37 |
|
38 |
|
38 |
our (@ISA, @EXPORT_OK); |
39 |
our (@ISA, @EXPORT_OK); |
39 |
BEGIN { |
40 |
BEGIN { |
Lines 597-608
sub UpdateFine {
Link Here
|
597 |
} |
598 |
} |
598 |
} else { |
599 |
} else { |
599 |
if ( $amount ) { # Don't add new fines with an amount of 0 |
600 |
if ( $amount ) { # Don't add new fines with an amount of 0 |
600 |
my $sth4 = $dbh->prepare( |
601 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
601 |
"SELECT title FROM biblio LEFT JOIN items ON biblio.biblionumber=items.biblionumber WHERE items.itemnumber=?" |
602 |
my $desc = C4::Letters::GetPreparedLetter( |
602 |
); |
603 |
module => 'circulation', |
603 |
$sth4->execute($itemnum); |
604 |
letter_code => 'OVERDUE_FINE_DESC', |
604 |
my $title = $sth4->fetchrow; |
605 |
message_transport_type => 'print', |
605 |
my $desc = "$title $due"; |
606 |
lang => $patron->lang, |
|
|
607 |
tables => { |
608 |
issues => $itemnum, |
609 |
borrowers => $borrowernumber, |
610 |
items => $itemnum, |
611 |
}, |
612 |
)->{content}; |
606 |
|
613 |
|
607 |
my $account = Koha::Account->new({ patron_id => $borrowernumber }); |
614 |
my $account = Koha::Account->new({ patron_id => $borrowernumber }); |
608 |
$accountline = $account->add_debit( |
615 |
$accountline = $account->add_debit( |