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

(-)a/installer/data/mysql/atomicupdate/bug_12224-add_CHECKINSLIP_notice.perl (-8 / +9 lines)
Lines 2-20 $DBversion = 'XXX'; Link Here
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{ INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type) VALUES
3
    $dbh->do(q{ INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type) VALUES
4
        ('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip',
4
        ('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip',
5
"<h3><<branches.branchname>></h3>
5
"<h3>[% branch.branchname %]</h3>
6
Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
6
Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />
7
(<<borrowers.cardnumber>>) <br />
7
([% borrower.cardnumber %]) <br />
8
8
9
<<today>><br />
9
[% today %]<br />
10
10
11
<h4>Checked in today</h4>
11
<h4>Checked in today</h4>
12
<checkedin>
12
[% FOREACH checkin IN old_checkouts %]
13
[% SET item = checkin.item %]
13
<p>
14
<p>
14
<<biblio.title>> <br />
15
[% item.biblio.title %] <br />
15
Barcode: <<items.barcode>><br />
16
Barcode: [% item.barcode %] <br />
16
</p>
17
</p>
17
</checkedin>",
18
[% END %]",
18
        'print')
19
        'print')
19
    });
20
    });
20
21
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-8 / +9 lines)
Lines 1464-1479 tables: Link Here
1464
          message_transport_type: print
1464
          message_transport_type: print
1465
          lang: default
1465
          lang: default
1466
          content:
1466
          content:
1467
            - "<h3><<branches.branchname>></h3>"
1467
            - "<h3>[% branch.branchname %]</h3>"
1468
            - "Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />"
1468
            - "Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />"
1469
            - "(<<borrowers.cardnumber>>) <br />"
1469
            - "([% borrower.cardnumber %]) <br />"
1470
            - ""
1470
            - ""
1471
            - "<<today>><br />"
1471
            - "[% today %]<br />"
1472
            - ""
1472
            - ""
1473
            - "<h4>Checked in today</h4>"
1473
            - "<h4>Checked in today</h4>"
1474
            - "<checkedin>"
1474
            - "[% FOREACH checkin IN old_checkouts %]"
1475
            - "[% SET item = checkin.item %]"
1475
            - "<p>"
1476
            - "<p>"
1476
            - "<<biblio.title>> <br />"
1477
            - "[% item.biblio.title %] <br />"
1477
            - "Barcode: <<items.barcode>><br />"
1478
            - "Barcode: [% item.barcode %] <br />"
1478
            - "</p>"
1479
            - "</p>"
1479
            - "</checkedin>"
1480
            - "[% END %]"
(-)a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql (-8 / +9 lines)
Lines 23-41 INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, m Link Here
23
('suggestions','AVAILABLE','','Suggestion d\'achat disponible',0,'Suggestion d\'achat disponible','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons le plaisir de vous informer que le document fait aujourd\'hui partie de nos collection et qu\'il est disponible à la bibliothèque.\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'),
23
('suggestions','AVAILABLE','','Suggestion d\'achat disponible',0,'Suggestion d\'achat disponible','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons le plaisir de vous informer que le document fait aujourd\'hui partie de nos collection et qu\'il est disponible à la bibliothèque.\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'),
24
('suggestions','ORDERED','','Suggestion d\'achat commandée',0,'Suggestion d\'achat commandée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons le plaisir de vous informer que le document a été commandé.\r\n\r\nVous recevrez une nouvelle notification quand le document sera disponible à bibliothèque.\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'),
24
('suggestions','ORDERED','','Suggestion d\'achat commandée',0,'Suggestion d\'achat commandée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons le plaisir de vous informer que le document a été commandé.\r\n\r\nVous recevrez une nouvelle notification quand le document sera disponible à bibliothèque.\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'),
25
('suggestions','REJECTED','','Suggestion d\'achat rejetée',0,'Suggestion d\'achat rejetée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons évalué votre suggestion aujourd\'hui et décidé de ne pas l\'acheter cette fois.\r\n\r\nLa raison de notre refus est : <<suggestions.reason>>\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'),
25
('suggestions','REJECTED','','Suggestion d\'achat rejetée',0,'Suggestion d\'achat rejetée','Bonjour <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nVous nous avez suggéré l\'achat du document <<suggestions.title>> par <<suggestions.author>>.\r\n\r\nNous avons évalué votre suggestion aujourd\'hui et décidé de ne pas l\'acheter cette fois.\r\n\r\nLa raison de notre refus est : <<suggestions.reason>>\r\n\r\nPour toute question, veuillez nous contacter à l\'adresse suivante : <<branches.branchemail>>.\r\n\r\nMerci.\r\n\r\n<<branches.branchname>>','email'),
26
('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip',"<h3><<branches.branchname>></h3>
26
('circulation','CHECKINSLIP','','Checkin slip',1,'Checkin slip',"<h3>[% branch.branchname %]</h3>
27
Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
27
Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />
28
(<<borrowers.cardnumber>>) <br />
28
([% borrower.cardnumber %]) <br />
29
29
30
<<today>><br />
30
[% today %]<br />
31
31
32
<h4>Checked in today</h4>
32
<h4>Checked in today</h4>
33
<checkedin>
33
[% FOREACH checkin IN old_checkouts %]
34
[% SET item = checkin.item %]
34
<p>
35
<p>
35
<<biblio.title>> <br />
36
[% item.biblio.title %] <br />
36
Barcode: <<items.barcode>><br />
37
Barcode: [% item.barcode %] <br />
37
</p>
38
</p>
38
</checkedin>", 'print');
39
[% END %]", 'print');
39
40
40
INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type)
41
INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type)
41
VALUES ('suggestions','NEW_SUGGESTION','Nouvelle suggestion','Nouvelle suggestion','<h3>Suggestion en attente</h3>
42
VALUES ('suggestions','NEW_SUGGESTION','Nouvelle suggestion','Nouvelle suggestion','<h3>Suggestion en attente</h3>
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql (-11 / +12 lines)
Lines 52-70 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
52
    </ul>
52
    </ul>
53
    </p>',1, 'email'),
53
    </p>',1, 'email'),
54
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
54
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
55
    "<h3><<branches.branchname>></h3>
55
"<h3>[% branch.branchname %]</h3>
56
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
56
Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />
57
    (<<borrowers.cardnumber>>) <br />
57
([% borrower.cardnumber %]) <br />
58
58
59
    <<today>><br />
59
[% today %]<br />
60
60
61
    <h4>Checked in today</h4>
61
<h4>Checked in today</h4>
62
    <checkedin>
62
[% FOREACH checkin IN old_checkouts %]
63
    <p>
63
[% SET item = checkin.item %]
64
    <<biblio.title>> <br />
64
<p>
65
    Barcode: <<items.barcode>><br />
65
[% item.biblio.title %] <br />
66
    </p>
66
Barcode: [% item.barcode %] <br />
67
    </checkedin>",1, 'print');
67
</p>
68
[% END %]", 1, 'print');
68
69
69
INSERT INTO `letter` (module, code, name, title, content, is_html)
70
INSERT INTO `letter` (module, code, name, title, content, is_html)
70
VALUES ('circulation','ISSUESLIP','Ticket de de prêt','Ticket de prêt', '<h3><<branches.branchname>></h3>
71
VALUES ('circulation','ISSUESLIP','Ticket de de prêt','Ticket de prêt', '<h3><<branches.branchname>></h3>
(-)a/installer/data/mysql/it-IT/necessari/notices.sql (-11 / +12 lines)
Lines 57-75 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
57
    </ul>
57
    </ul>
58
    </p>',1, 'email'),
58
    </p>',1, 'email'),
59
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
59
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
60
    "<h3><<branches.branchname>></h3>
60
"<h3>[% branch.branchname %]</h3>
61
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
61
Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />
62
    (<<borrowers.cardnumber>>) <br />
62
([% borrower.cardnumber %]) <br />
63
63
64
    <<today>><br />
64
[% today %]<br />
65
65
66
    <h4>Checked in today</h4>
66
<h4>Checked in today</h4>
67
    <checkedin>
67
[% FOREACH checkin IN old_checkouts %]
68
    <p>
68
[% SET item = checkin.item %]
69
    <<biblio.title>> <br />
69
<p>
70
    Barcode: <<items.barcode>><br />
70
[% item.biblio.title %] <br />
71
    </p>
71
Barcode: [% item.barcode %] <br />
72
    </checkedin>",1, 'print');
72
</p>
73
[% END %]", 1, 'print');
73
74
74
INSERT INTO letter (module, code, name, title, content, is_html)
75
INSERT INTO letter (module, code, name, title, content, is_html)
75
VALUES ('circulation','ISSUESLIP','Ricevuta di prestito','Ricevuta di prestito', '<h3><<branches.branchname>></h3>
76
VALUES ('circulation','ISSUESLIP','Ricevuta di prestito','Ricevuta di prestito', '<h3><<branches.branchname>></h3>
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql (-11 / +12 lines)
Lines 72-90 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
72
    </ul>
72
    </ul>
73
    </p>',1, 'email'),
73
    </p>',1, 'email'),
74
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
74
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
75
    "<h3><<branches.branchname>></h3>
75
"<h3>[% branch.branchname %]</h3>
76
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
76
Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />
77
    (<<borrowers.cardnumber>>) <br />
77
([% borrower.cardnumber %]) <br />
78
78
79
    <<today>><br />
79
[% today %]<br />
80
80
81
    <h4>Checked in today</h4>
81
<h4>Checked in today</h4>
82
    <checkedin>
82
[% FOREACH checkin IN old_checkouts %]
83
    <p>
83
[% SET item = checkin.item %]
84
    <<biblio.title>> <br />
84
<p>
85
    Barcode: <<items.barcode>><br />
85
[% item.biblio.title %] <br />
86
    </p>
86
Barcode: [% item.barcode %] <br />
87
    </checkedin>",1, 'print');
87
</p>
88
[% END %]", 1, 'print');
88
89
89
INSERT INTO `letter` (module, code, name, title, content, is_html)
90
INSERT INTO `letter` (module, code, name, title, content, is_html)
90
VALUES ('circulation','ISSUESLIP','Utlån','Utlån', '<h3><<branches.branchname>></h3>
91
VALUES ('circulation','ISSUESLIP','Utlån','Utlån', '<h3><<branches.branchname>></h3>
(-)a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql (-11 / +12 lines)
Lines 51-69 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
51
    </ul>
51
    </ul>
52
    </p>',1, 'email'),
52
    </p>',1, 'email'),
53
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
53
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
54
    "<h3><<branches.branchname>></h3>
54
"<h3>[% branch.branchname %]</h3>
55
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
55
Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />
56
    (<<borrowers.cardnumber>>) <br />
56
([% borrower.cardnumber %]) <br />
57
57
58
    <<today>><br />
58
[% today %]<br />
59
59
60
    <h4>Checked in today</h4>
60
<h4>Checked in today</h4>
61
    <checkedin>
61
[% FOREACH checkin IN old_checkouts %]
62
    <p>
62
[% SET item = checkin.item %]
63
    <<biblio.title>> <br />
63
<p>
64
    Barcode: <<items.barcode>><br />
64
[% item.biblio.title %] <br />
65
    </p>
65
Barcode: [% item.barcode %] <br />
66
    </checkedin>",1, 'print');
66
</p>
67
[% END %]", 1, 'print');
67
68
68
INSERT INTO `letter` (module, code, name, title, content, is_html)
69
INSERT INTO `letter` (module, code, name, title, content, is_html)
69
VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3>
70
VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3>
(-)a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql (-11 / +12 lines)
Lines 50-68 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
50
    </ul>
50
    </ul>
51
    </p>',1, 'email'),
51
    </p>',1, 'email'),
52
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
52
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
53
    "<h3><<branches.branchname>></h3>
53
"<h3>[% branch.branchname %]</h3>
54
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
54
Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />
55
    (<<borrowers.cardnumber>>) <br />
55
([% borrower.cardnumber %]) <br />
56
56
57
    <<today>><br />
57
[% today %]<br />
58
58
59
    <h4>Checked in today</h4>
59
<h4>Checked in today</h4>
60
    <checkedin>
60
[% FOREACH checkin IN old_checkouts %]
61
    <p>
61
[% SET item = checkin.item %]
62
    <<biblio.title>> <br />
62
<p>
63
    Barcode: <<items.barcode>><br />
63
[% item.biblio.title %] <br />
64
    </p>
64
Barcode: [% item.barcode %] <br />
65
    </checkedin>",1, 'print');
65
</p>
66
[% END %]", 1, 'print');
66
67
67
INSERT INTO `letter` (module, code, name, title, content, is_html)
68
INSERT INTO `letter` (module, code, name, title, content, is_html)
68
VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3>
69
VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3>
(-)a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql (-11 / +12 lines)
Lines 115-133 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
115
    </ul>
115
    </ul>
116
    </p>',1, 'email'),
116
    </p>',1, 'email'),
117
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
117
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
118
    "<h3><<branches.branchname>></h3>
118
"<h3>[% branch.branchname %]</h3>
119
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
119
Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />
120
    (<<borrowers.cardnumber>>) <br />
120
([% borrower.cardnumber %]) <br />
121
121
122
    <<today>><br />
122
[% today %]<br />
123
123
124
    <h4>Checked in today</h4>
124
<h4>Checked in today</h4>
125
    <checkedin>
125
[% FOREACH checkin IN old_checkouts %]
126
    <p>
126
[% SET item = checkin.item %]
127
    <<biblio.title>> <br />
127
<p>
128
    Barcode: <<items.barcode>><br />
128
[% item.biblio.title %] <br />
129
    </p>
129
Barcode: [% item.barcode %] <br />
130
    </checkedin>",1, 'print');
130
</p>
131
[% END %]", 1, 'print');
131
132
132
INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES
133
INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES
133
('members', 'DISCHARGE', 'підтвердження на розрахування',
134
('members', 'DISCHARGE', 'підтвердження на розрахування',
(-)a/members/printslip.pl (-12 / +4 lines)
Lines 88-94 if ( $print eq 'checkinslip' ) { Link Here
88
    my $today_end = dt_from_string->set( hour => 23, minute => 59, second => 0 );
88
    my $today_end = dt_from_string->set( hour => 23, minute => 59, second => 0 );
89
    $today_start = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_start );
89
    $today_start = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_start );
90
    $today_end = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_end );
90
    $today_end = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_end );
91
    my $todays_checkins = Koha::Old::Checkouts->search({
91
    my @todays_checkins = Koha::Old::Checkouts->search({
92
        returndate => {
92
        returndate => {
93
            '>=' => $today_start,
93
            '>=' => $today_start,
94
            '<=' => $today_end,
94
            '<=' => $today_end,
Lines 97-111 if ( $print eq 'checkinslip' ) { Link Here
97
        branchcode => $checkinslip_branch,
97
        branchcode => $checkinslip_branch,
98
    });
98
    });
99
99
100
    my @checkins;
100
    my %loops = (
101
    while ( my $c = $todays_checkins->next ) {
101
        old_issues => [ map { $_->issue_id } @todays_checkins ],
102
        push @checkins, {
103
            biblio => $c->item->biblio->unblessed,
104
            items => $c->item->unblessed,
105
        };
106
    }
107
    my %repeat = (
108
        checkedin => \@checkins,
109
    );
102
    );
110
103
111
    my $letter = C4::Letters::GetPreparedLetter(
104
    my $letter = C4::Letters::GetPreparedLetter(
Lines 116-122 if ( $print eq 'checkinslip' ) { Link Here
116
            branches => $checkinslip_branch,
109
            branches => $checkinslip_branch,
117
            borrowers => $borrowernumber,
110
            borrowers => $borrowernumber,
118
        },
111
        },
119
        repeat => \%repeat,
112
        loops => \%loops,
120
        message_transport_type => 'print'
113
        message_transport_type => 'print'
121
    );
114
    );
122
115
123
- 

Return to bug 12224