Adding PATCRD print type
authorChris Nighswonger <cnighswonger@foundations.edu>
Tue, 1 Apr 2008 12:51:15 +0000 (08:51 -0400)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 3 Apr 2008 19:41:52 +0000 (14:41 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Labels.pm

index ae3e169..320fdcf 100644 (file)
@@ -150,12 +150,13 @@ sub delete_layout {
 sub get_printingtypes {
     my ($layout_id) = @_;
     my @printtypes;
-
+# FIXME: hard coded print types
     push( @printtypes, { code => 'BAR',    desc => "barcode" } );
     push( @printtypes, { code => 'BIB',    desc => "biblio" } );
     push( @printtypes, { code => 'BARBIB', desc => "barcode / biblio" } );
     push( @printtypes, { code => 'BIBBAR', desc => "biblio / barcode" } );
     push( @printtypes, { code => 'ALT',    desc => "alternating labels" } );
+    push( @printtypes, { code => 'PATCRD', desc => "patron cards" } );
 
     my $conf             = get_layout($layout_id);
     my $active_printtype = $conf->{'printingtype'};
@@ -821,7 +822,8 @@ sub GetPatronCardItems {
     my @resultsloop;
     
     my $dbh = C4::Context->dbh;
-    my $query = "SELECT * FROM patroncards WHERE batch_id = ? ORDER BY borrowernumber";
+#    my $query = "SELECT * FROM patroncards WHERE batch_id = ? ORDER BY borrowernumber";
+    my $query = "SELECT * FROM patroncards WHERE batch_id = ? ORDER BY cardid";
     my $sth = $dbh->prepare($query);
     $sth->execute($batch_id);
     my $cardno = 1;