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

(-)a/installer/data/mysql/atomicupdate/bug_12224-add_CHECKINSLIP_notice.perl (+22 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
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',
5
"<h3><<branches.branchname>></h3>
6
Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
7
(<<borrowers.cardnumber>>) <br />
8
9
<<today>><br />
10
11
<h4>Checked in today</h4>
12
<checkedin>
13
<p>
14
<<biblio.title>> <br />
15
Barcode: <<items.barcode>><br />
16
</p>
17
</checkedin>",
18
        'print')
19
    });
20
21
    NewVersion( $DBversion, 12224, "Add CHECKINSLIP notice" );
22
}
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (+23 lines)
Lines 1454-1456 tables: Link Here
1454
            - "[% ELSE %]"
1454
            - "[% ELSE %]"
1455
            - "The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due | $KohaDates as_due_date => 1 %]"
1455
            - "The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due | $KohaDates as_due_date => 1 %]"
1456
            - "[% END %]"
1456
            - "[% END %]"
1457
1458
        - module: circulation
1459
          code: CHECKINSLIP
1460
          branchcode: ""
1461
          name: "Checkin slip"
1462
          is_html: 1
1463
          title: "Checkin slip"
1464
          message_transport_type: print
1465
          lang: default
1466
          content:
1467
            - "<h3><<branches.branchname>></h3>"
1468
            - "Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />"
1469
            - "(<<borrowers.cardnumber>>) <br />"
1470
            - ""
1471
            - "<<today>><br />"
1472
            - ""
1473
            - "<h4>Checked in today</h4>"
1474
            - "<checkedin>"
1475
            - "<p>"
1476
            - "<<biblio.title>> <br />"
1477
            - "Barcode: <<items.barcode>><br />"
1478
            - "</p>"
1479
            - "</checkedin>"
(-)a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql (-1 / +14 lines)
Lines 22-28 INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, m Link Here
22
('suggestions','ACCEPTED','','Suggestion d\'achat acceptée',0,'Suggestion d\'achat accepté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 aujourdhui. Le document sera commandé dès que possible. Vous serez tenu au courant par courriel quand le document aura été commandé et quand il sera 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'),
22
('suggestions','ACCEPTED','','Suggestion d\'achat acceptée',0,'Suggestion d\'achat accepté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 aujourdhui. Le document sera commandé dès que possible. Vous serez tenu au courant par courriel quand le document aura été commandé et quand il sera 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'),
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>
27
Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
28
(<<borrowers.cardnumber>>) <br />
29
30
<<today>><br />
31
32
<h4>Checked in today</h4>
33
<checkedin>
34
<p>
35
<<biblio.title>> <br />
36
Barcode: <<items.barcode>><br />
37
</p>
38
</checkedin>", 'print');
26
39
27
INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type)
40
INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type)
28
VALUES ('suggestions','NEW_SUGGESTION','Nouvelle suggestion','Nouvelle suggestion','<h3>Suggestion en attente</h3>
41
VALUES ('suggestions','NEW_SUGGESTION','Nouvelle suggestion','Nouvelle suggestion','<h3>Suggestion en attente</h3>
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql (-1 / +16 lines)
Lines 50-56 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
50
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
50
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
51
    <li><b>Notes:</b> <<suggestions.note>></li>
51
    <li><b>Notes:</b> <<suggestions.note>></li>
52
    </ul>
52
    </ul>
53
    </p>',1, 'email');
53
    </p>',1, 'email'),
54
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
55
    "<h3><<branches.branchname>></h3>
56
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
57
    (<<borrowers.cardnumber>>) <br />
58
59
    <<today>><br />
60
61
    <h4>Checked in today</h4>
62
    <checkedin>
63
    <p>
64
    <<biblio.title>> <br />
65
    Barcode: <<items.barcode>><br />
66
    </p>
67
    </checkedin>",1, 'print');
68
54
INSERT INTO `letter` (module, code, name, title, content, is_html)
69
INSERT INTO `letter` (module, code, name, title, content, is_html)
55
VALUES ('circulation','ISSUESLIP','Ticket de de prêt','Ticket de prêt', '<h3><<branches.branchname>></h3>
70
VALUES ('circulation','ISSUESLIP','Ticket de de prêt','Ticket de prêt', '<h3><<branches.branchname>></h3>
56
Prêts à <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
71
Prêts à <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
(-)a/installer/data/mysql/it-IT/necessari/notices.sql (-1 / +16 lines)
Lines 55-61 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
55
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
55
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
56
    <li><b>Notes:</b> <<suggestions.note>></li>
56
    <li><b>Notes:</b> <<suggestions.note>></li>
57
    </ul>
57
    </ul>
58
    </p>',1, 'email');
58
    </p>',1, 'email'),
59
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
60
    "<h3><<branches.branchname>></h3>
61
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
62
    (<<borrowers.cardnumber>>) <br />
63
64
    <<today>><br />
65
66
    <h4>Checked in today</h4>
67
    <checkedin>
68
    <p>
69
    <<biblio.title>> <br />
70
    Barcode: <<items.barcode>><br />
71
    </p>
72
    </checkedin>",1, 'print');
73
59
INSERT INTO letter (module, code, name, title, content, is_html)
74
INSERT INTO letter (module, code, name, title, content, is_html)
60
VALUES ('circulation','ISSUESLIP','Ricevuta di prestito','Ricevuta di prestito', '<h3><<branches.branchname>></h3>
75
VALUES ('circulation','ISSUESLIP','Ricevuta di prestito','Ricevuta di prestito', '<h3><<branches.branchname>></h3>
61
Prestito a <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
76
Prestito a <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql (-1 / +16 lines)
Lines 70-76 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
70
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
70
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
71
    <li><b>Notes:</b> <<suggestions.note>></li>
71
    <li><b>Notes:</b> <<suggestions.note>></li>
72
    </ul>
72
    </ul>
73
    </p>',1, 'email');
73
    </p>',1, 'email'),
74
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
75
    "<h3><<branches.branchname>></h3>
76
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
77
    (<<borrowers.cardnumber>>) <br />
78
79
    <<today>><br />
80
81
    <h4>Checked in today</h4>
82
    <checkedin>
83
    <p>
84
    <<biblio.title>> <br />
85
    Barcode: <<items.barcode>><br />
86
    </p>
87
    </checkedin>",1, 'print');
88
74
INSERT INTO `letter` (module, code, name, title, content, is_html)
89
INSERT INTO `letter` (module, code, name, title, content, is_html)
75
VALUES ('circulation','ISSUESLIP','Utlån','Utlån', '<h3><<branches.branchname>></h3>
90
VALUES ('circulation','ISSUESLIP','Utlån','Utlån', '<h3><<branches.branchname>></h3>
76
Utlånt til <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
91
Utlånt til <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
(-)a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql (-1 / +16 lines)
Lines 49-55 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
49
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
49
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
50
    <li><b>Notes:</b> <<suggestions.note>></li>
50
    <li><b>Notes:</b> <<suggestions.note>></li>
51
    </ul>
51
    </ul>
52
    </p>',1, 'email');
52
    </p>',1, 'email'),
53
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
54
    "<h3><<branches.branchname>></h3>
55
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
56
    (<<borrowers.cardnumber>>) <br />
57
58
    <<today>><br />
59
60
    <h4>Checked in today</h4>
61
    <checkedin>
62
    <p>
63
    <<biblio.title>> <br />
64
    Barcode: <<items.barcode>><br />
65
    </p>
66
    </checkedin>",1, 'print');
67
53
INSERT INTO `letter` (module, code, name, title, content, is_html)
68
INSERT INTO `letter` (module, code, name, title, content, is_html)
54
VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3>
69
VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3>
55
Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
70
Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
(-)a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql (-1 / +16 lines)
Lines 48-54 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
48
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
48
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
49
    <li><b>Notes:</b> <<suggestions.note>></li>
49
    <li><b>Notes:</b> <<suggestions.note>></li>
50
    </ul>
50
    </ul>
51
    </p>',1, 'email');
51
    </p>',1, 'email'),
52
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
53
    "<h3><<branches.branchname>></h3>
54
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
55
    (<<borrowers.cardnumber>>) <br />
56
57
    <<today>><br />
58
59
    <h4>Checked in today</h4>
60
    <checkedin>
61
    <p>
62
    <<biblio.title>> <br />
63
    Barcode: <<items.barcode>><br />
64
    </p>
65
    </checkedin>",1, 'print');
66
52
INSERT INTO `letter` (module, code, name, title, content, is_html)
67
INSERT INTO `letter` (module, code, name, title, content, is_html)
53
VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3>
68
VALUES ('circulation','ISSUESLIP','Issue slip','Issue slip', '<h3><<branches.branchname>></h3>
54
Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
69
Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
(-)a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql (-1 / +16 lines)
Lines 113-119 VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New suggestion','<h3>Su Link Here
113
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
113
    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>
114
    <li><b>Notes:</b> <<suggestions.note>></li>
114
    <li><b>Notes:</b> <<suggestions.note>></li>
115
    </ul>
115
    </ul>
116
    </p>',1, 'email');
116
    </p>',1, 'email'),
117
    ('circulation','CHECKINSLIP','Checkin slip','Checkin slip',
118
    "<h3><<branches.branchname>></h3>
119
    Checked in items for <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
120
    (<<borrowers.cardnumber>>) <br />
121
122
    <<today>><br />
123
124
    <h4>Checked in today</h4>
125
    <checkedin>
126
    <p>
127
    <<biblio.title>> <br />
128
    Barcode: <<items.barcode>><br />
129
    </p>
130
    </checkedin>",1, 'print');
131
117
INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES
132
INSERT INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES
118
('members', 'DISCHARGE', 'підтвердження на розрахування',
133
('members', 'DISCHARGE', 'підтвердження на розрахування',
119
'Розрахування для відвідувача — <<borrowers.firstname>> <<borrowers.surname>>', '
134
'Розрахування для відвідувача — <<borrowers.firstname>> <<borrowers.surname>>', '
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (+1 lines)
Lines 27-32 Link Here
27
                [% IF patron.has_overdues %]
27
                [% IF patron.has_overdues %]
28
                    <li><a id="print_overdues" href="#">Print overdues</a></li>
28
                    <li><a id="print_overdues" href="#">Print overdues</a></li>
29
                [% END %]
29
                [% END %]
30
                <li><a id="printcheckinslip" href="#">Print checkin slip</a></li>
30
            </ul>
31
            </ul>
31
    </div>
32
    </div>
32
    [% END %]
33
    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (+11 lines)
Lines 857-862 Link Here
857
                                        <th class="ci-collection">Collection</th>
857
                                        <th class="ci-collection">Collection</th>
858
                                        <th class="ci-patron">Patron</th>
858
                                        <th class="ci-patron">Patron</th>
859
                                        <th class="ci-note">Note</th>
859
                                        <th class="ci-note">Note</th>
860
                                        <th class="ci-printslip">&nbsp;</th>
860
                                    </tr>
861
                                    </tr>
861
                                </thead>
862
                                </thead>
862
863
Lines 942-947 Link Here
942
                                                <p><span class="circ-hlt item-note-nonpublic">[% riloo.itemnotes_nonpublic | html %]</span></p>
943
                                                <p><span class="circ-hlt item-note-nonpublic">[% riloo.itemnotes_nonpublic | html %]</span></p>
943
                                            [% END %]
944
                                            [% END %]
944
                                        </td>
945
                                        </td>
946
                                        <td class="ci-printslip actions">
947
                                            <a id="printcheckinslip" href="#" class="btn btn-default" data-borrowernumber="[% riloo.patron.borrowernumber | html %]"><i class="fa fa-print"></i> Print checkin slip</a>
948
                                        </td>
945
                                    </tr>
949
                                    </tr>
946
                                [% END # /FOREACH riloo %]
950
                                [% END # /FOREACH riloo %]
947
                            </table> <!-- /#checkedintable -->
951
                            </table> <!-- /#checkedintable -->
Lines 1139-1144 Link Here
1139
                }
1143
                }
1140
            });
1144
            });
1141
            $('[data-toggle="tooltip"]').tooltip();
1145
            $('[data-toggle="tooltip"]').tooltip();
1146
1147
            $("#printcheckinslip").click(function(){
1148
                var borrowernumber = $(this).data('borrowernumber');
1149
                window.open("/cgi-bin/koha/members/printslip.pl?borrowernumber=" + borrowernumber + "&amp;print=checkinslip", "printwindow");
1150
                return false;
1151
            });
1152
1142
        });
1153
        });
1143
    </script>
1154
    </script>
1144
[% END %]
1155
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js (+5 lines)
Lines 71-76 $(document).ready(function(){ Link Here
71
        $(".btn-group").removeClass("open");
71
        $(".btn-group").removeClass("open");
72
        return false;
72
        return false;
73
    });
73
    });
74
    $("#printcheckinslip").click(function(){
75
        printx_window("checkinslip");
76
        $(".btn-group").removeClass("open");
77
        return false;
78
    });
74
    $("#printclearscreen").click(function(){
79
    $("#printclearscreen").click(function(){
75
        printx_window("slip");
80
        printx_window("slip");
76
        window.location.replace("/cgi-bin/koha/circ/circulation.pl");
81
        window.location.replace("/cgi-bin/koha/circ/circulation.pl");
(-)a/members/printslip.pl (-2 / +45 lines)
Lines 39-44 use C4::Auth qw/:DEFAULT get_session/; Link Here
39
use C4::Output;
39
use C4::Output;
40
use C4::Members;
40
use C4::Members;
41
use C4::Koha;
41
use C4::Koha;
42
use Koha::DateUtils;
42
43
43
#use Smart::Comments;
44
#use Smart::Comments;
44
#use Data::Dumper;
45
#use Data::Dumper;
Lines 79-85 output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log Link Here
79
80
80
my $branch=C4::Context->userenv->{'branch'};
81
my $branch=C4::Context->userenv->{'branch'};
81
my ($slip, $is_html);
82
my ($slip, $is_html);
82
if (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, $print eq "qslip")) {
83
if ( $print eq 'checkinslip' ) {
84
    my $checkinslip_branch = $session->param('branch') ? $session->param('branch') : $branch;
85
86
    # get today's checkins
87
    my $today_start = dt_from_string->set( hour => 0, minute => 0, 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 );
90
    $today_end = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_end );
91
    my $todays_checkins = Koha::Old::Checkouts->search({
92
        returndate => {
93
            '>=' => $today_start,
94
            '<=' => $today_end,
95
        },
96
        borrowernumber => $borrowernumber,
97
        branchcode => $checkinslip_branch,
98
    });
99
100
    my @checkins;
101
    while ( my $c = $todays_checkins->next ) {
102
        push @checkins, {
103
            biblio => $c->item->biblio->unblessed,
104
            items => $c->item->unblessed,
105
        };
106
    }
107
    my %repeat = (
108
        checkedin => \@checkins,
109
    );
110
111
    my $letter = C4::Letters::GetPreparedLetter(
112
        module => 'circulation',
113
        letter_code => 'CHECKINSLIP',
114
        branchcode => $checkinslip_branch,
115
        tables => {
116
            branches => $checkinslip_branch,
117
            borrowers => $borrowernumber,
118
        },
119
        repeat => \%repeat,
120
        message_transport_type => 'print'
121
    );
122
123
    $slip = $letter->{content};
124
    $is_html = $letter->{is_html};
125
126
} elsif (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, $print eq "qslip")) {
83
    $slip = $letter->{content};
127
    $slip = $letter->{content};
84
    $is_html = $letter->{is_html};
128
    $is_html = $letter->{is_html};
85
}
129
}
86
- 

Return to bug 12224