[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/circ branchtransfers.pl,1.5,1.6
From: |
Finlay Thompson |
Subject: |
[Koha-cvs] CVS: koha/circ branchtransfers.pl,1.5,1.6 |
Date: |
Fri, 17 May 2002 22:04:46 -0700 |
Update of /cvsroot/koha/koha/circ
In directory usw-pr-cvs1:/tmp/cvs-serv14618
Modified Files:
branchtransfers.pl
Log Message:
fixed the branch and printer setting mechanism
changed layout slightly
Index: branchtransfers.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/branchtransfers.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** branchtransfers.pl 7 May 2002 04:36:00 -0000 1.5
--- branchtransfers.pl 18 May 2002 05:04:43 -0000 1.6
***************
*** 20,24 ****
my $backgroundimage="/images/background-mem.gif";
! my $branches=getbranches();
###############################################
--- 20,26 ----
my $backgroundimage="/images/background-mem.gif";
! my $branches = getbranches();
! my $printers = getprinters(\%env);
!
###############################################
***************
*** 27,30 ****
--- 29,41 ----
my $query=new CGI;
+
+ my $branch = $query->param("branch");
+ my $printer = $query->param("printer");
+
+
+ ($branch) || ($branch=$query->cookie('branch')) ;
+ ($printer) || ($printer=$query->cookie('printer')) ;
+
+
my $tobranchcd=$query->param('tobranchcd');
my $frbranchcd='';
***************
*** 61,75 ****
# Warnings etc that get displayed at top of next page....
! my @messages;
!
#if the barcode has been entered action that and write a message and onto the
top of the stack...
my $iteminformation;
if (my $barcode=$query->param('barcode')) {
! my $iteminformation = getiteminformation(\%env,0 ,$barcode);
! my ($transfered, $message, $iteminformation) = transferbook($tobranchcd,
$barcode);
! if (not $transfered) {
! push(@messages, $message);
! }
! else {
my $frbranchcd = $iteminformation->{'holdingbranch'};
$ritext.="<input type=hidden name=bc-0 value=$barcode>\n";
--- 72,83 ----
# Warnings etc that get displayed at top of next page....
! my $messages;
#if the barcode has been entered action that and write a message and onto the
top of the stack...
my $iteminformation;
if (my $barcode=$query->param('barcode')) {
! my $transfered;
! my $iteminformation;
! ($transfered, $messages, $iteminformation) = transferbook($tobranchcd,
$barcode);
! if ($transfered) {
my $frbranchcd = $iteminformation->{'holdingbranch'};
$ritext.="<input type=hidden name=bc-0 value=$barcode>\n";
***************
*** 79,86 ****
$frbranchcds{0}=$frbranchcd;
$tobranchcds{0}=$tobranchcd;
- push(@messages, "Book: $barcode has been transfered");
}
}
#################################################################################
# Html code....
--- 87,94 ----
$frbranchcds{0}=$frbranchcd;
$tobranchcds{0}=$tobranchcd;
}
}
+
#################################################################################
# Html code....
***************
*** 106,116 ****
EOF
! my $messagetable;
! if (@messages) {
! my $messagetext='';
! foreach (@messages) {
! $messagetext.="$_<br>";
}
! $messagetext = substr($messagetext, 0, -4);
$messagetable = << "EOF";
<table border=1 cellpadding=5 cellspacing=0 bgcolor='#dddddd'>
--- 114,167 ----
EOF
!
!
! #####################
!
! my $reservefoundtext;
! if ($messages->{'ResFound'}) {
! my $resrec = $messages->{'ResFound'};
! my ($borr) = getpatroninformation(\%env, $resrec->{'borrowernumber'}, 0);
! my $name = $borr->{'surname'}." ".$borr->{'title'}."
".$borr->{'firstname'};
! my $number = "<a
href=/cgi-bin/koha/moremember.pl?bornum=$borr->{'borrowernumber'}
onClick='openWindow(this,'Member', 480, 640)'>$borr->{'cardnumber'}</a>";
! my $branch = $branches->{$resrec->{'branchcode'}}->{'branchname'};
! my $reservetext = "<font size='+2' color='red'>RESERVED</font><font
size='+2'> for collection by $name ($number) at $branch </font>";
! $reservefoundtext = <<"EOF";
! <table border=1 cellpadding=5 cellspacing=0 bgcolor='#dddddd'>
! <tr><th bgcolor=$headerbackgroundcolor
background=$backgroundimage><font>Reserve Found</font></th></tr>
! <tr><td> $reservetext </td></tr></table>
! EOF
! }
!
! #####################
!
! my $messagetext='';
! foreach my $code (keys %$messages) {
! if ($code eq 'BadBarcode'){
! $messagetext .= "<font color='red' size='+2'> No Item with barcode:
$messages->{'BadBarcode'} </font> <br>";
! }
! if ($code eq 'IsPermanent'){
! my $braname = $branches->{$messages->{'IsPermanent'}}->{'branchname'};
! $messagetext .= "<font color='red' size='+2'> Please return item to
home branch: $braname </font> <br>";
! }
! if ($code eq 'DestinationEqualsHolding'){
! $messagetext .= "<font color='red' size='+2'> Item cannot be transfered
to branch it is already at. </font> <br>";
! }
! if ($code eq 'WasReturned') {
! my ($borrowerinfo) = getpatroninformation(\%env,
$messages->{'WasReturned'}, 0);
!
! my $binfo = <<"EOF";
! <a href=/cgi-bin/koha/moremember.pl?bornum=$borrowerinfo->{'borrowernumber'}
! onClick="openWindow(this,'Member', 480,
640)">$borrowerinfo->{'cardnumber'}</a>
! $borrowerinfo->{'surname'}, $borrowerinfo->{'title'}
$borrowerinfo->{'firstname'}
! EOF
! $messagetext .= "Item was on loan to $binfo and has been returned.
<br>";
}
! if ($code eq 'WasTransfered'){
! }
! }
! $messagetext = substr($messagetext, 0, -4);
!
! my $messagetable;
! if ($messagetext) {
$messagetable = << "EOF";
<table border=1 cellpadding=5 cellspacing=0 bgcolor='#dddddd'>
***************
*** 127,137 ****
print startmenu('circulation');
print <<"EOF";
! <p align=right>
<FONT SIZE=2 face="arial, helvetica">
! <a href=circulationold.pl?module=issues>Next Borrower</a> ||
! <a href=returns.pl>Returns</a> ||
! <a href=branchtransfers.pl>Transfers</a></font></p><FONT
SIZE=6><em>Circulation: Transfers</em></FONT><br>
EOF
print $messagetable;
--- 178,201 ----
print startmenu('circulation');
print <<"EOF";
! <p>
! <table border=0 cellpadding=5 width=90%><tr>
! <td align="left"><FONT SIZE=6><em>Circulation: Transfers</em></FONT><br>
! <b>Branch:</b> $branches->{$branch}->{'branchname'}  
! <b>Printer:</b> $printers->{$printer}->{'printername'}<br>
! <a href=selectbranchprinter.pl>Change Settings</a>
! </td>
! <td align="right">
<FONT SIZE=2 face="arial, helvetica">
! <a href=circulation.pl>Next Borrower</a> ||
! <a href=returns.pl>Returns</a> ||
! <a href=branchtransfers.pl>Transfers</a></font><p>
! </td></tr></table>
! <input type=hidden name=branch value=$branch>
! <input type=hidden name=printer value=$printer>
! </p>
EOF
+ print $reservefoundtext;
+
print $messagetable;
***************
*** 169,171 ****
--- 233,236 ----
print endmenu('circulation');
print endpage;
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/circ branchtransfers.pl,1.5,1.6,
Finlay Thompson <=