Lines 27-38
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; |
|
|
35 |
use Koha::Logger; |
36 |
use Koha::Patrons; |
36 |
|
37 |
|
37 |
our (@ISA, @EXPORT_OK); |
38 |
our (@ISA, @EXPORT_OK); |
38 |
BEGIN { |
39 |
BEGIN { |
Lines 575-586
sub UpdateFine {
Link Here
|
575 |
} |
576 |
} |
576 |
} else { |
577 |
} else { |
577 |
if ( $amount ) { # Don't add new fines with an amount of 0 |
578 |
if ( $amount ) { # Don't add new fines with an amount of 0 |
578 |
my $sth4 = $dbh->prepare( |
579 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
579 |
"SELECT title FROM biblio LEFT JOIN items ON biblio.biblionumber=items.biblionumber WHERE items.itemnumber=?" |
580 |
my $desc = C4::Letters::GetPreparedLetter( |
580 |
); |
581 |
module => 'circulation', |
581 |
$sth4->execute($itemnum); |
582 |
letter_code => 'OVERDUE_FINE_DESC', |
582 |
my $title = $sth4->fetchrow; |
583 |
message_transport_type => 'print', |
583 |
my $desc = "$title $due"; |
584 |
lang => $patron->lang, |
|
|
585 |
tables => { |
586 |
issues => $itemnum, |
587 |
borrowers => $borrowernumber, |
588 |
items => $itemnum, |
589 |
}, |
590 |
)->{content}; |
584 |
|
591 |
|
585 |
my $account = Koha::Account->new({ patron_id => $borrowernumber }); |
592 |
my $account = Koha::Account->new({ patron_id => $borrowernumber }); |
586 |
$accountline = $account->add_debit( |
593 |
$accountline = $account->add_debit( |