kohabug 2150 Correcting (somewhat) the inconsistent use of autoBarcode syspref
authorChris Nighswonger <chris.nighswonger@liblime.com>
Tue, 22 Jul 2008 18:43:33 +0000 (13:43 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 22 Jul 2008 20:50:23 +0000 (15:50 -0500)
This patch corrects somewhat the inconsistent use of the autoBarcode syspref in serials-edit.pl
It does not impliment all the possibilities currently available in the autoBarcode syspref as
there is currently no support for the js plug-in/drop-in feature in serials-edit.pl. So in this
sense, the autoBarcode syspref is still used inconsistantly here. The fix for this is recommended
for rel_3_2

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
serials/serials-edit.pl

index f8e3b4c..1619762 100755 (executable)
@@ -227,7 +227,7 @@ if ($op eq 'serialchangestatus') {
                        
             # if autoBarcode is ON, calculate barcode...
             my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode");
-            if (C4::Context->preference("autoBarcode") ne  'OFF'  ) {
+            if (C4::Context->preference("autoBarcode") eq 'incremental'  ) {
               eval {    $record->field($tagfield)->subfield($tagsubfield) };
               if ($@) {
                 my $sth_barcode = $dbh->prepare("select max(abs(barcode)) from items");