[Koha-cvs] CVS: koha/acqui.simple additem.pl,1.27.2.7,1.27.2.8
Paul POULAIN
tipaul at users.sourceforge.net
Wed Oct 5 14:41:44 CEST 2005
Update of /cvsroot/koha/koha/acqui.simple
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16943/acqui.simple
Modified Files:
Tag: rel_2_2
additem.pl
Log Message:
fixing bug caused by sort{} added by hdl 2 days ago : when items were reordered, itemnum were not. Thus, sometimes, items were not pointing to the right itemnumber & modif/deletion was buggy !
Index: additem.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/additem.pl,v
retrieving revision 1.27.2.7
retrieving revision 1.27.2.8
diff -C2 -r1.27.2.7 -r1.27.2.8
*** additem.pl 4 Oct 2005 10:13:16 -0000 1.27.2.7
--- additem.pl 5 Oct 2005 12:41:41 -0000 1.27.2.8
***************
*** 61,64 ****
--- 61,65 ----
my $tagslib = &MARCgettagslib($dbh,1,$itemtype);
my $record = MARCgetbiblio($dbh,$bibid);
+ warn "==>".$record->as_formatted;
my $oldrecord = MARCmarc2koha($dbh,$record);
my $itemrecord;
***************
*** 153,157 ****
my ($branchtagfield,$branchtagsubfield) = &MARCfind_marc_from_kohafield($dbh,"items.homebranch",$itemtype);
- my @itemnums; # array to store itemnums
foreach my $field (@fields) {
next if ($field->tag()<10);
--- 154,157 ----
***************
*** 170,174 ****
}
}
! push @itemnums,$this_row{$subf[$i][0]} =$subf[$i][1] if ($field->tag() eq $itemtagfield && $subf[$i][0] eq $itemtagsubfield);
}
if (%this_row) {
--- 170,174 ----
}
}
! $this_row{itemnum} = $subf[$i][1] if ($field->tag() eq $itemtagfield && $subf[$i][0] eq $itemtagsubfield);
}
if (%this_row) {
***************
*** 195,199 ****
my %row_data;
$row_data{item_value} = $items_data;
! $row_data{itemnum} = $itemnums[$i];
#reporting this_row values
$row_data{'nomod'} = $big_array[$i]{'nomod'};
--- 195,199 ----
my %row_data;
$row_data{item_value} = $items_data;
! $row_data{itemnum} = $big_array[$i]->{itemnum};
#reporting this_row values
$row_data{'nomod'} = $big_array[$i]{'nomod'};
More information about the Koha-cvs
mailing list