From 4d7916031030bfeab1633543b953fa322ad38336 Mon Sep 17 00:00:00 2001 From: tgarip1957 Date: Mon, 10 Apr 2006 20:42:18 +0000 Subject: [PATCH] Holding branch gets updated in MARC when a branch transfer occurs --- C4/Circulation/Circ2.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/C4/Circulation/Circ2.pm b/C4/Circulation/Circ2.pm index ad48fb0965..d037a30517 100755 --- a/C4/Circulation/Circ2.pm +++ b/C4/Circulation/Circ2.pm @@ -36,6 +36,7 @@ use C4::Reserves2; use C4::Koha; use C4::Accounts2; use Date::Manip; +use C4::Biblio; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @@ -512,9 +513,23 @@ sub dotransfer { #update holdingbranch in items ..... $dbh->do("UPDATE items set holdingbranch = $tbr WHERE items.itemnumber = $itm"); &itemseen($itm); + &domarctransfer($dbh,$itm); return; } +##New sub to dotransfer in marc tables as well. Not exported -TG 10/04/2006 +sub domarctransfer{ + +my ($dbh,$itemnumber) = @_; +$itemnumber=~s /\'//g; ##itemnumber seems to come with quotes-TG +my $sth=$dbh->prepare("select biblionumber,holdingbranch from items where itemnumber=$itemnumber"); + $sth->execute(); +while (my ($biblionumber,$holdingbranch)=$sth->fetchrow ){ +&MARCmoditemonefield($dbh,$biblionumber,$itemnumber,'items.holdingbranch',$holdingbranch,0); +} +return; +} + =head2 canbookbeissued Check if a book can be issued. -- 2.39.5