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

(-)a/installer/data/mysql/atomicupdate/bug_8352.sql (-3 / +3 lines)
Lines 1-11 Link Here
1
ALTER TABLE reserves ADD printed DATETIME NULL AFTER suspend_until;
1
ALTER TABLE reserves ADD printed DATETIME NULL AFTER suspend_until;
2
2
3
INSERT INTO  letter ( module, code,  branchcode, name, is_html, title, content ) VALUES (
3
INSERT INTO  letter ( module, code,  branchcode, name, is_html, title, content, message_transport_type ) VALUES (
4
    'reserves',  'HOLD_PLACED_PRINT',  '',  'Hold Placed ( Auto-Print )',  '0',  'Hold Placed ( Auto-Print )',  'Hold to pull at <<branches.branchname>>
4
    'reserves',  'HOLDPLACED',  '',  'Hold Placed ( Auto-Print )',  '0',  'Hold Placed ( Auto-Print )',  'Hold to pull at <<branches.branchname>>
5
5
6
For <<borrowers.firstname>> <<borrowers.surname>> ( <<borrowers.cardnumber>> )
6
For <<borrowers.firstname>> <<borrowers.surname>> ( <<borrowers.cardnumber>> )
7
7
8
<<biblio.title>> by <<biblio.author>>');
8
<<biblio.title>> by <<biblio.author>>', 'print');
9
9
10
ALTER TABLE printers
10
ALTER TABLE printers
11
    DROP PRIMARY KEY,
11
    DROP PRIMARY KEY,
(-)a/installer/data/mysql/en/mandatory/sample_notices.sql (-2 / +3 lines)
Lines 162-166 VALUES ( 'circulation', 'OVERDUES_SLIP', '', 'Overdues Slip', '0', 'OVERDUES_SLI Link Here
162
162
163
<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <<items.fine>></item>
163
<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <<items.fine>></item>
164
', 'print' );
164
', 'print' );
165
INSERT INTO `letter` (`module`,`code`,`branchcode`,`name`,`is_html`,`title`,`content`)
165
166
VALUES ('reserves', 'HOLD_PLACED_PRINT', 'Hold Placed ( Auto-Print )', 'Hold Placed ( Auto-Print )', 'Hold to pull at <<branches.branchname>>\r\nFor <<borrowers.firstname>> <<borrowers.surname>> ( <<borrowers.cardnumber>> )\r\n<<biblio.title>> by <<biblio.author>>');
166
INSERT INTO letter ( module, code, branchcode, name, is_html, title, content, message_transport_type )
167
VALUES ('reserves', 'HOLDPLACED', 'Hold Placed ( Auto-Print )', 'Hold Placed ( Auto-Print )', 'Hold to pull at <<branches.branchname>>\r\nFor <<borrowers.firstname>> <<borrowers.surname>> ( <<borrowers.cardnumber>> )\r\n<<biblio.title>> by <<biblio.author>>', 'print');
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/printers-toolbar.inc (-2 / +2 lines)
Lines 1-4 Link Here
1
<div id="toolbar" class="btn-toolbar">
1
<div id="toolbar" class="btn-toolbar">
2
        <div class="btn-group"><a class="btn btn-small" id="add_printer" href="#"><i class="icon-plus"></i> Add printer</a></div>
2
        <div class="btn-group"><a class="btn btn-small" id="add_printer" href="#"><i class="fa fa-plus"></i> Add printer</a></div>
3
        <div class="btn-group"><a class="btn btn-small" id="delete_printer" href="#"><i class="icon-remove"></i> Delete printer(s)</a></div>
3
        <div class="btn-group"><a class="btn btn-small" id="delete_printer" href="#"><i class="fa fa-trash"></i> Delete printer(s)</a></div>
4
</div>
4
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt (-2 / +2 lines)
Lines 1-5 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Administration &rsaquo; Printer editor</title>
2
<title>Koha &rsaquo; Administration &rsaquo; Printers</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
[% INCLUDE 'datatables.inc' %]
5
[% INCLUDE 'datatables.inc' %]
Lines 147-153 $(document).ready(function() { Link Here
147
        if (!idsToDelete) {
147
        if (!idsToDelete) {
148
            alert(_("No printers selected!"));
148
            alert(_("No printers selected!"));
149
        }
149
        }
150
        else if (confirm(_("Are you sure you wish to delete printer(s) ") + idsToDelete + "?")) {
150
        else if (confirm(_("Are you sure you wish to delete printer(s) %s?").format(idsToDelete))) {
151
            oTable.$('.selected').each(function(){
151
            oTable.$('.selected').each(function(){
152
                    var printerID = $(this).attr('id');
152
                    var printerID = $(this).attr('id');
153
                        $.ajax({
153
                        $.ajax({
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/printers.tt (-3 / +3 lines)
Lines 8-14 Link Here
8
<p>Click on any field to edit the contents; Press the &lt;Enter&gt; key to save edit.</p>
8
<p>Click on any field to edit the contents; Press the &lt;Enter&gt; key to save edit.</p>
9
<p>Click on one or more printer IDs to select entire printers for deletion; Click the 'Delete printer(s)' button to delete selected printers.</p>
9
<p>Click on one or more printer IDs to select entire printers for deletion; Click the 'Delete printer(s)' button to delete selected printers.</p>
10
10
11
<p>Printers defined in this area can be used to print automatic reserve notices</p>
11
<p>Printers defined in this area can be used to print automatic hold notices</p>
12
12
13
<h2>How printers are defined</h2>
13
<h2>How printers are defined</h2>
14
<p>Printers can be utilized in two ways, either by sending the data directly to a networked printer via lpr, or by printing to a printer set up on the Koha server via CUPS.</p>
14
<p>Printers can be utilized in two ways, either by sending the data directly to a networked printer via lpr, or by printing to a printer set up on the Koha server via CUPS.</p>
Lines 25-34 Link Here
25
25
26
<h2>Caveats</h2>
26
<h2>Caveats</h2>
27
<p>
27
<p>
28
    Printing plain text is supported by both methods. When printing HTML, the output will be sent to the printer as PostScript. If you are printing via LPR, and you want to print HTML, you will need to ensure that your printer can recieve and print PostScript data.
28
    Printing plain text is supported by both methods. When printing HTML, the output will be sent to the printer as PostScript. If you are printing via LPR, and you want to print HTML, you will need to ensure that your printer can receive and print PostScript data.
29
</p>
29
</p>
30
<p>
30
<p>
31
    For printing slips and notices, this behavior can be controlled via the "HTML message" flag of the HOLD_PLACED_PRINT notice. Leaving this checkbox unchecked will result in plain text being printed, whereas checking this checkbox will result in HTML converted to PostScript being printed.
31
    For printing slips and notices, this behavior can be controlled via the "HTML message" flag of the HOLDPLACED print notice. Leaving this checkbox unchecked will result in plain text being printed, whereas checking this checkbox will result in HTML converted to PostScript being printed.
32
32
33
</p>
33
</p>
34
[% INCLUDE 'help-bottom.inc' %]
34
[% INCLUDE 'help-bottom.inc' %]
(-)a/misc/cronjobs/holds/print_holds.pl (-5 / +16 lines)
Lines 72-81 while ( my $hold = $holds->next() ) { Link Here
72
    my $borrower = Koha::Borrowers->find( $hold->borrowernumber );
72
    my $borrower = Koha::Borrowers->find( $hold->borrowernumber );
73
73
74
    my $letter = GetPreparedLetter(
74
    my $letter = GetPreparedLetter(
75
        module      => 'reserves',
75
        module                 => 'reserves',
76
        letter_code => 'HOLD_PLACED_PRINT',
76
        letter_code            => 'HOLDPLACED',
77
        branchcode  => $hold->branchcode,
77
        branchcode             => $hold->branchcode,
78
        tables      => {
78
        message_transport_type => 'print',
79
        tables                 => {
79
            branches    => $hold->branchcode,
80
            branches    => $hold->branchcode,
80
            biblio      => $hold->biblionumber,
81
            biblio      => $hold->biblionumber,
81
            biblioitems => $hold->biblionumber,
82
            biblioitems => $hold->biblionumber,
Lines 83-89 while ( my $hold = $holds->next() ) { Link Here
83
            borrowers   => $borrower->unblessed,
84
            borrowers   => $borrower->unblessed,
84
            reserves    => $hold->unblessed,
85
            reserves    => $hold->unblessed,
85
86
86
        }
87
        },
87
    );
88
    );
88
89
89
    if ( defined( $printers{ $hold->branchcode } ) ) {
90
    if ( defined( $printers{ $hold->branchcode } ) ) {
Lines 143-148 e.g. print_holds.pl --printer MPL:1 --printer CPL:2 Link Here
143
would add printers for branchcodes MPL and CPL. If a printer is not defined for a given branch, notices for
144
would add printers for branchcodes MPL and CPL. If a printer is not defined for a given branch, notices for
144
that branch will not be printed.
145
that branch will not be printed.
145
146
147
=item B<--test>
148
149
Run in test mode. Holds will not actually be printed.
150
151
=item B<--confirm>
152
153
Run in production mode. Holds will be printed to printers.
154
155
=back
156
146
=head1 DESCRIPTION
157
=head1 DESCRIPTION
147
158
148
B<This program> will print on-demand notices for items in the holds queue as they appear.
159
B<This program> will print on-demand notices for items in the holds queue as they appear.
(-)a/svc/printer (-2 lines)
Lines 1-7 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
# Copyright 2014 ByWater Solutions
3
# Copyright 2014 ByWater Solutions
4
# Copyright 2012 Foundations Bible College Inc.
5
#
4
#
6
# This file is part of Koha.
5
# This file is part of Koha.
7
#
6
#
8
- 

Return to bug 8352