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

(-)a/C4/Overdues.pm (-8 / +15 lines)
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(
(-)a/installer/data/mysql/atomicupdate/bug_24865.pl (+15 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "24865",
5
    description => "Customize the Accountlines Description",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{
10
            INSERT IGNORE INTO letter
11
            (module,code,branchcode,name,is_html,title,content,message_transport_type,lang)
12
            VALUES ('circulation','OVERDUE_FINE_DESC','','Overdue Item Fine Description',0,'Overdue Item Fine Description','[% item.biblio.title %] [% checkout.date_due | $KohaDates %]','print','default')
13
        });
14
    },
15
};
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (+11 lines)
Lines 1541-1546 tables: Link Here
1541
            - "</p>"
1541
            - "</p>"
1542
            - "[% END %]"
1542
            - "[% END %]"
1543
1543
1544
        - module: circulation
1545
          code: OVERDUE_FINE_DESC
1546
          branchcode: ""
1547
          name: "Overdue Item Fine Description"
1548
          is_html: 0
1549
          title: "Overdue Item Fine Description"
1550
          message_transport_type: print
1551
          lang: default
1552
          content:
1553
            - "[% item.biblio.title %] [% checkout.date_due | $KohaDates %]"
1554
1544
        - module: circulation
1555
        - module: circulation
1545
          code: AUTO_RENEWALS_DGST
1556
          code: AUTO_RENEWALS_DGST
1546
          branchcode: ""
1557
          branchcode: ""
(-)a/tools/letter.pl (-2 / +4 lines)
Lines 56-62 use Koha::Patron::Attribute::Types; Link Here
56
sub protected_letters {
56
sub protected_letters {
57
    my $dbh = C4::Context->dbh;
57
    my $dbh = C4::Context->dbh;
58
    my $codes = $dbh->selectall_arrayref(q{SELECT DISTINCT letter_code FROM message_transports});
58
    my $codes = $dbh->selectall_arrayref(q{SELECT DISTINCT letter_code FROM message_transports});
59
    return { map { $_->[0] => 1 } @{$codes} };
59
    return {
60
        OVERDUE_FINE_DESC => 1,
61
        map { $_->[0] => 1 } @{$codes}
62
    };
60
}
63
}
61
64
62
our $input       = CGI->new;
65
our $input       = CGI->new;
63
- 

Return to bug 24865