CVS: koha/circ branchtransfers.pl,1.1,1.2
Update of /cvsroot/koha/koha/circ In directory usw-pr-cvs1:/tmp/cvs-serv17154/circ Modified Files: branchtransfers.pl Log Message: Fixed a small problem in the <form>, not hidden inputs are getting passed correctly. Index: branchtransfers.pl =================================================================== RCS file: /cvsroot/koha/koha/circ/branchtransfers.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** branchtransfers.pl 12 Mar 2002 21:04:32 -0000 1.1 --- branchtransfers.pl 13 Mar 2002 21:07:41 -0000 1.2 *************** *** 38,41 **** --- 38,42 ---- # collect the stack of books already transfered so they can printed... + my @messages; my %transfereditems; my $ritext = ''; *************** *** 45,49 **** (next) unless (/bc-(\d*)/); my $counter=$1; - (next) if ($counter>20); my $barcode=$query->param("bc-$counter"); my $frbcd=$query->param("fb-$counter"); --- 46,49 ---- *************** *** 60,64 **** #if the barcode has been entered action that and write a message and onto the top of the stack... my $iteminformation; ! my @messages; my $todaysdate; if (my $barcode=$query->param('barcode')) { --- 60,64 ---- #if the barcode has been entered action that and write a message and onto the top of the stack... my $iteminformation; ! my $todaysdate; if (my $barcode=$query->param('barcode')) { *************** *** 93,111 **** my $entrytext= << "EOF"; <form method=post action=/cgi-bin/koha/circ/branchtransfers.pl> ! <table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd > <tr><td colspan=2 bgcolor=$headerbackgroundcolor align=center background=$backgroundimage> <font color=black><b>Select Branch</b></font></td></tr> ! <tr><td>Destination Branch:</td><td> ! <select name=tobranchcd> $tobranchoptions </select> ! </td></tr> ! ! </table><table border=0 cellpadding=5 cellspacing=0 bgcolor=#dddddd > ! <tr><td colspan=2 bgcolor=$headerbackgroundcolor align=center background=$backgroundimage> <font color=black><b>Enter Book Barcode</b></font></td></tr> <tr><td>Item Barcode:</td><td><input name=barcode size=10></td></tr> </table> - <input type=hidden name=tobranchcd value=$tobranchcd> $ritext EOF --- 93,109 ---- my $entrytext= << "EOF"; <form method=post action=/cgi-bin/koha/circ/branchtransfers.pl> ! <table border=0 cellpadding=5 cellspacing=0 bgcolor='#dddddd' > <tr><td colspan=2 bgcolor=$headerbackgroundcolor align=center background=$backgroundimage> <font color=black><b>Select Branch</b></font></td></tr> ! <tr><td>Destination Branch:</td> ! <td><select name=tobranchcd> $tobranchoptions </select></td></tr></table> ! <table border=0 cellpadding=5 cellspacing=0 bgcolor='#dddddd' ><tr> ! <td colspan=2 bgcolor=$headerbackgroundcolor align=center background=$backgroundimage> <font color=black><b>Enter Book Barcode</b></font></td></tr> <tr><td>Item Barcode:</td><td><input name=barcode size=10></td></tr> </table> <input type=hidden name=tobranchcd value=$tobranchcd> $ritext + </form> EOF *************** *** 167,196 **** print endmenu('circulation'); print endpage; - - - ############################################################################ - # - # this is the database query that will go into C4::Circuation::Circ2 - # - - use DBI; - use C4::Database; - - sub transferbook { - my ($env, $iteminformation, $barcode) = @_; - my $messages; - my $dbh=&C4Connect; - #new entry in branchtransfers.... - my $sth = $dbh->prepare("insert into branchtransfers (itemnumber, frombranch, datearrived, tobranch) values($iteminformation->{'itemnumber'}, '$env->{'frbranchcd'}', now(), '$env->{'tobranchcd'}')"); - $sth->execute || return (0,"database error: $sth->errstr"); - $sth->finish; - #update holdingbranch in items ..... - $sth = $dbh->prepare("update items set holdingbranch='$env->{'tobranchcd'}' where items.itemnumber=$iteminformation->{'itemnumber'}"); - $sth->execute || return (0,"database error: $sth->errstr"); - $sth->execute; - $sth->finish; - $dbh->disconnect; - return (1, $messages); - } - --- 165,167 ----
participants (1)
-
Finlay Thompson