From fd65fcc36534113676a79ffad90ab596d3a70687 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Thu, 10 Jan 2008 15:18:19 -0600 Subject: [PATCH] fix record->field call on autobarcode Signed-off-by: Joshua Ferraro --- serials/serials-edit.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index e0d66666ab..93cf630463 100755 --- a/serials/serials-edit.pl +++ b/serials/serials-edit.pl @@ -227,12 +227,12 @@ if ($op eq 'serialchangestatus') { my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode"); if (C4::Context->preference("autoBarcode") ne 'OFF' ) { eval { $record->field($tagfield)->subfield($tagsubfield) }; - if ($@) { + if ($@) { my $sth_barcode = $dbh->prepare("select max(abs(barcode)) from items"); $sth_barcode->execute; my ($newbarcode) = $sth_barcode->fetchrow; # OK, we have the new barcode, add the entry in MARC record # FIXME -> should be using barcode plugin here. - $field->update( $tagsubfield => ++$newbarcode ); + $record->field($tagfield)->update( $tagsubfield => ++$newbarcode ); } } # check for item barcode # being unique -- 2.39.5