Bugzilla – Attachment 9472 Details for
Bug 8056
CircAutoPrintQuickSlip set to clear doesn't work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] bug_8056: sorted out slip print calls
SIGNED-OFF-bug8056-sorted-out-slip-print-calls.patch (text/plain), 3.05 KB, created by
Nicole C. Engard
on 2012-05-09 14:08:30 UTC
(
hide
)
Description:
[SIGNED-OFF] bug_8056: sorted out slip print calls
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2012-05-09 14:08:30 UTC
Size:
3.05 KB
patch
obsolete
>From 0b9f80d07285f3725d26af114dcd9c4a8500fcff Mon Sep 17 00:00:00 2001 >From: Srdjan <srdjan@catalyst.net.nz> >Date: Wed, 9 May 2012 14:47:48 +1200 >Subject: [PATCH] [SIGNED-OFF] bug_8056: sorted out slip print calls > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > C4/Members.pm | 1 - > C4/Print.pm | 16 +++++++--------- > circ/circulation.pl | 8 ++++++-- > 3 files changed, 13 insertions(+), 12 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 6161ac9..693e0ba 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -997,7 +997,6 @@ sub GetPendingIssues { > # must avoid biblioitems.* to prevent large marc and marcxml fields from killing performance > # FIXME: namespace collision: each table has "timestamp" fields. Which one is "timestamp" ? > # FIXME: circ/ciculation.pl tries to sort by timestamp! >- # FIXME: C4::Print::printslip tries to sort by timestamp! > # FIXME: namespace collision: other collisions possible. > # FIXME: most of this data isn't really being used by callers. > my $query = >diff --git a/C4/Print.pm b/C4/Print.pm >index c0b37c8..d28b00c 100644 >--- a/C4/Print.pm >+++ b/C4/Print.pm >@@ -28,7 +28,7 @@ BEGIN { > $VERSION = 3.01; > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw(&printslip); >+ @EXPORT = qw(&NetworkPrint); > } > > =head1 NAME >@@ -72,18 +72,16 @@ $bordata->{'emailaddress'} > EOF > =cut > >-=head2 printslip >+=head2 NetworkPrint > >- &printslip($slip) >+ &NetworkPrint($text) > >-print a slip for the given $borrowernumber and $branchcode >+Queue some text for printing on the selected branch printer > > =cut > >-sub printslip ($) { >- my ($slip) = @_; >- >- return unless ( C4::Context->boolean_preference('printcirculationslips') ); >+sub NetworkPrint ($) { >+ my ($text) = @_; > > # FIXME - It'd be nifty if this could generate pretty PostScript. > >@@ -112,7 +110,7 @@ sub printslip ($) { > > # print $queue; > #open (FILE,">/tmp/$file"); >- print PRINTER $slip; >+ print PRINTER $text; > print PRINTER "\r\n" x 7 ; > close PRINTER; > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index bcbcb6f..c28fdc8 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -25,6 +25,7 @@ use strict; > use warnings; > use CGI; > use C4::Output; >+use C4::Print; > use C4::Auth qw/:DEFAULT get_session/; > use C4::Dates qw/format_date/; > use C4::Branch; # GetBranches >@@ -156,7 +157,7 @@ if($duedatespec_allow){ > } > } > >-our $todaysdate = C4::Dates->new->output('iso'); >+my $todaysdate = C4::Dates->new->output('iso'); > > # check and see if we should print > if ( $barcode eq '' && $print eq 'maybe' ) { >@@ -172,7 +173,10 @@ if ( $barcode eq '' && $query->param('charges') eq 'yes' ) { > } > > if ( $print eq 'yes' && $borrowernumber ne '' ) { >- PrintIssueSlip($session->param('branch') || $branch, $borrowernumber); >+ if ( C4::Context->boolean_preference('printcirculationslips') ) { >+ my $letter = IssueSlip($branch, $borrowernumber, "QUICK"); >+ NetworkPrint($letter->{content}); >+ } > $query->param( 'borrowernumber', '' ); > $borrowernumber = ''; > } >-- >1.7.2.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8056
:
9468
|
9472
|
9506
|
9549
|
9557