koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/C4 Labels.pm [dev_week]


From: Mason James
Subject: [Koha-cvs] koha/C4 Labels.pm [dev_week]
Date: Tue, 03 Jul 2007 23:14:17 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Mason James <sushi>     07/07/03 23:14:17

Modified files:
        C4             : Labels.pm 

Log message:
        more

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Labels.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.3.4.8&r2=1.3.4.9

Patches:
Index: Labels.pm
===================================================================
RCS file: /sources/koha/koha/C4/Labels.pm,v
retrieving revision 1.3.4.8
retrieving revision 1.3.4.9
diff -u -b -r1.3.4.8 -r1.3.4.9
--- Labels.pm   22 Mar 2007 03:33:16 -0000      1.3.4.8
+++ Labels.pm   3 Jul 2007 23:14:17 -0000       1.3.4.9
@@ -26,6 +26,7 @@
 use PDF::Reuse;
 use Text::Wrap;
 use Algorithm::CheckDigits;
+use Data::Dumper;
 
 $VERSION = 0.01;
 
@@ -49,6 +50,8 @@
   &CreateTemplate &SetActiveTemplate
   &SaveConf &DrawSpineText &GetTextWrapCols
   &GetUnitsValue &DrawBarcode
+  &get_layouts &get_barcode_types
+  &get_batches
 
 );
 
@@ -72,6 +75,46 @@
     return $conf_data;
 }
 
+sub get_layouts {
+    my ( $a, $b, $c, $d, $e );
+
+    $a = { code => 'BAR',    desc => "barcode" };
+    $b = { code => 'BIB',    desc => "biblio" };
+    $c = { code => 'BARBIB', desc => "barcode / biblio" };
+    $d = { code => 'BIBBAR', desc => "biblio / barcode" };
+    $e = { code => 'ALT',    desc => "alternating labels" };
+
+    my @layouts = ( $a, $b, $c, $d, $e );
+    return @layouts;
+}
+
+sub get_batches {
+    my $dbh = C4::Context->dbh;
+    my $q   = "select distinct batch_id from labels";
+    my $sth = $dbh->prepare($q);
+    $sth->execute();
+    my @resultsloop;
+    while ( my $data = $sth->fetchrow_hashref ) {
+        push( @resultsloop, $data );
+    }
+    $sth->finish;
+
+    warn Dumper @resultsloop;
+
+    return @resultsloop;
+
+}
+
+sub get_barcode_types {
+    my $a = { code => 'CODE39',    desc => 'Code 39' };
+    my $b = { code => 'CODE39MOD', desc => 'Code39 + Modulo43' };
+    my $c = { code => 'ITF',       desc => 'Interleaved 2 of 5' };
+
+    my @array = ( $a, $b, $c );
+
+    return @array;
+}
+
 sub GetUnitsValue {
     my ($units) = @_;
     my $unitvalue;
@@ -154,8 +197,7 @@
         $page_height, $label_width, $label_height, $topmargin,
         $leftmargin,  $cols,        $rows,         $colgap,
         $rowgap,      $active,      $fontsize,     $units
-      )
-      = @_;
+    ) = @_;
 
     warn "FONTSIZE =$fontsize";
 
@@ -188,8 +230,7 @@
         $label_width, $label_height, $topmargin,  $leftmargin,
         $cols,        $rows,         $colgap,     $rowgap,
         $active,      $fontsize,     $units
-      )
-      = @_;
+    ) = @_;
 
     my $dbh = C4::Context->dbh;
 
@@ -250,8 +291,7 @@
         $bcn,            $dcn,    $classif, $subclass,
         $itemcallnumber, $author, $tmpl_id, $printingtype,
         $guidebox,       $startlabel
-      )
-      = @_;
+    ) = @_;
 
     my $dbh    = C4::Context->dbh;
     my $query2 = "DELETE FROM labels_conf";
@@ -787,8 +827,7 @@
     my (
         $x_pos_spine, $x_pos_circ1,  $x_pos_circ2, $y_pos,
         $spine_width, $label_height, $circ_width
-      )
-      = @_;
+    ) = @_;
 
     my $y_pos_initial = ( ( 792 - 36 ) - 90 );
     my $y_pos         = $y_pos_initial;




reply via email to

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