koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/barcodes label-manager.pl [dev_week]


From: Mason James
Subject: [Koha-cvs] koha/barcodes label-manager.pl [dev_week]
Date: Wed, 04 Jul 2007 00:11:48 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Mason James <sushi>     07/07/04 00:11:48

Modified files:
        barcodes       : label-manager.pl 

Log message:
        more

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-manager.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.1.2.3&r2=1.1.2.1.2.4

Patches:
Index: label-manager.pl
===================================================================
RCS file: /sources/koha/koha/barcodes/label-manager.pl,v
retrieving revision 1.1.2.1.2.3
retrieving revision 1.1.2.1.2.4
diff -u -b -r1.1.2.1.2.3 -r1.1.2.1.2.4
--- label-manager.pl    6 Oct 2006 01:58:47 -0000       1.1.2.1.2.3
+++ label-manager.pl    4 Jul 2007 00:11:48 -0000       1.1.2.1.2.4
@@ -8,6 +8,7 @@
 use C4::Interface::CGI::Output;
 use HTML::Template;
 use POSIX;
+use Data::Dumper;
 
 my $dbh            = C4::Context->dbh;
 my $query          = new CGI;
@@ -29,6 +30,12 @@
 my $printingtype   = $query->param('printingtype');
 my $guidebox       = $query->param('guidebox');
 my $fontsize       = $query->param('fontsize');
+my $batch_id   = $query->param('batch_id');
+
+warn "88888888  $batch_id";
+
+
+warn Dumper $query;
 
 warn "ID =$tmpl_id";
 
@@ -72,40 +79,23 @@
     $sth2->finish;
 }
 
-#  first lets do a read of the labels table , to get the a list of the
-# currently entered items to be prinited
 
-my @resultsloop = ();
-my $count;
-my @data;
-my $query3 = "Select * from labels";
-my $sth    = $dbh->prepare($query3);
-$sth->execute();
+elsif ( $op eq 'delete' ) {
+    warn "MASON, deleting label..";
+    my $query2 = "DELETE FROM labels where itemnumber = ?";
+    my $sth2   = $dbh->prepare($query2);
+    $sth2->execute($itemnumber);
+    $sth2->finish;
+}
 
-my $cnt = $sth->rows;
-my $i1  = 1;
-while ( my $data = $sth->fetchrow_hashref ) {
-
-    # lets get some summary info from each item
-    my $query1 = "
-                       select * from biblio,biblioitems,items where 
itemnumber=? and 
-                               
items.biblioitemnumber=biblioitems.biblioitemnumber and 
-                               biblioitems.biblionumber=biblio.biblionumber";
-
-    my $sth1 = $dbh->prepare($query1);
-    $sth1->execute( $data->{'itemnumber'} );
-    my $data1 = $sth1->fetchrow_hashref();
-
-    $data1->{'labelno'} = $i1;
-    $data1->{'summary'} =
-      "$data1->{'barcode'}, $data1->{'title'}, $data1->{'isbn'}";
 
-    push( @resultsloop, $data1 );
-    $sth1->finish;
 
-    $i1++;
-}
-$sth->finish;
+#  first lets do a read of the labels table , to get the a list of the
+# currently entered items to be prinited
+
+my @batches = get_batches();
+
+my @resultsloop = get_label_items($batch_id);
 
 # this script can be run from the side nav, and is not passed a value for 
$startrow
 # so lets get it from the DB
@@ -129,6 +119,8 @@
 
 $template->param(
     resultsloop => address@hidden,
+    batches => address@hidden,
+batch_id => $batch_id,
 
     #  startrow         => $startrow,
     #  sheets           => $sheets_needed,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]