[Koha-cvs] koha/C4 Labels.pm [dev_week]
Mason James
szrj1m at yahoo.com
Fri Jul 6 06:08:18 CEST 2007
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Mason James <sushi> 07/07/06 04:08:18
Modified files:
C4 : Labels.pm
Log message:
add_batch increments now
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Labels.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.3.4.13&r2=1.3.4.14
Patches:
Index: Labels.pm
===================================================================
RCS file: /sources/koha/koha/C4/Labels.pm,v
retrieving revision 1.3.4.13
retrieving revision 1.3.4.14
diff -u -b -r1.3.4.13 -r1.3.4.14
--- Labels.pm 6 Jul 2007 01:23:13 -0000 1.3.4.13
+++ Labels.pm 6 Jul 2007 04:08:18 -0000 1.3.4.14
@@ -51,6 +51,7 @@
&CreateTemplate &SetActiveTemplate
&SaveConf &DrawSpineText &GetTextWrapCols
&GetUnitsValue &DrawBarcode
+
&get_layouts &get_barcode_types
&get_batches &delete_batch
&add_batch &SetFontSize &printText
@@ -101,6 +102,7 @@
}
sub add_batch {
+ my $new_batch;
my $dbh = C4::Context->dbh;
my $q =
"select distinct batch_id from labels order by batch_id asc limit 1";
@@ -108,11 +110,14 @@
$sth->execute();
my $data = $sth->fetchrow_hashref;
$sth->finish;
- my $new_batch = ++$data->{'batch_id'};
-### $new_batch;
- warn "hhhh";
- warn Dumper $data;
- return $data;
+
+ if( !$data->{'batch_id'}) {
+ $new_batch = 1;
+ } else {
+ $new_batch = ($data->{'batch_id'} + 1);
+ }
+
+ return $new_batch;
}
sub get_batches {
More information about the Koha-cvs
mailing list