[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/circ branchtransfers.pl,1.20,1.21 circulation.pl,1.
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/circ branchtransfers.pl,1.20,1.21 circulation.pl,1.88,1.89 returns.pl,1.37,1.38 |
Date: |
Wed, 26 Oct 2005 02:13:13 -0700 |
Update of /cvsroot/koha/koha/circ
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29225/circ
Modified Files:
branchtransfers.pl circulation.pl returns.pl
Log Message:
big commit, still breaking things...
* synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not
be modified deeply.
* code cleaning (cleaning warnings from perl -w) continued
Index: branchtransfers.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/branchtransfers.pl,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** branchtransfers.pl 11 Mar 2003 15:13:18 -0000 1.20
--- branchtransfers.pl 26 Oct 2005 09:13:11 -0000 1.21
***************
*** 37,42 ****
my %env;
! my $linecolor1='#ffffcc';
! my $linecolor2='white';
my $branches = getbranches();
--- 37,42 ----
my %env;
! my $linecolor1= 0;
! my $linecolor2= 1;
my $branches = getbranches();
***************
*** 64,67 ****
--- 64,68 ----
my $setwaiting;
my $reqbrchname;
+ my $allmessages;
my $request=$query->param('request');
***************
*** 78,81 ****
--- 79,83 ----
$cancelled = 1;
$reqmessage =1;
+ $allmessages = 1;
}
***************
*** 88,91 ****
--- 90,94 ----
$setwaiting = 1;
$reqmessage =1;
+ $allmessages = 1;
}
if ($request eq 'KillReserved'){
***************
*** 94,97 ****
--- 97,101 ----
$cancelled = 1;
$reqmessage =1;
+ $allmessages = 1;
}
***************
*** 181,186 ****
}
!
! my $name;
my $bornum;
my $borcnum;
--- 185,197 ----
}
! my $title;
! my $surname;
! my $firstname;
! my $bornum;
! my $borphone;
! my $borstraddress;
! my $borcity;
! my $borzip;
! my $boremail;
my $bornum;
my $borcnum;
***************
*** 188,191 ****
--- 199,203 ----
my $biblionum;
my $branchname;
+ my $wastransferred;
***************
*** 196,201 ****
$branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
my ($borr) = getpatroninformation(\%env, $res->{'borrowernumber'}, 0);
! $name = name($borr);
! $bornum = $borr->{'borrowernumber'}; #Hopefully,
borr->{borrowernumber}=res->{borrowernumber}
$borcnum = $borr->{'cardnumber'};
$itemnumber = $res->{'itemnumber'};
--- 208,222 ----
$branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
my ($borr) = getpatroninformation(\%env, $res->{'borrowernumber'}, 0);
! $title = $borr->{'title'};
! $surname = $borr->{'surname'};
! $firstname = $borr->{'firstname'};
! $bornum = $borr->{'borrowernumber'};
! $borphone = $borr->{'phone'};
! $borstraddress = $borr->{'streetaddress'};
! $borcity = $borr->{'city'};
! $borzip = $borr->{'zipcode'};
! $boremail = $borr->{'emailadress'};
!
! #Hopefully, borr->{borrowernumber}=res->{borrowernumber}
$borcnum = $borr->{'cardnumber'};
$itemnumber = $res->{'itemnumber'};
***************
*** 215,245 ****
foreach my $code (keys %$messages) {
my %err;
! $err{errbadcode} = ($code eq 'BadBarcode');
if ($code eq 'BadBarcode') {
$err{msg}=$messages->{'BadBarcode'};
}
- $err{errispermanent} = ($code eq 'IsPermanent');
if ($code eq 'IsPermanent'){
$err{msg} =
$branches->{$messages->{'IsPermanent'}}->{'branchname'};
# Here, msg contains the branchname
# Not so satisfied with this... But should work
}
$err{errdesteqholding} = ($code eq 'DestinationEqualsHolding');
- $err{errwasreturned} = ($code eq 'WasReturned');
if ($code eq 'WasReturned') {
my ($borrowerinfo) = getpatroninformation(\%env,
$messages->{'WasReturned'}, 0);
! $name =name($borrowerinfo);
$bornum =$borrowerinfo->{'borrowernumber'};
$borcnum =$borrowerinfo->{'cardnumber'};
}
! if ($code eq 'WasTransfered'){
# Put code here if you want to notify the user that item was transfered...
! }
push (@errmsgloop, \%err);
}
-
#######################################################################################
# Make the page .....
--- 236,272 ----
foreach my $code (keys %$messages) {
my %err;
!
if ($code eq 'BadBarcode') {
$err{msg}=$messages->{'BadBarcode'};
+ $err{errbadcode} = 1;
+ $allmessages = 1;
}
if ($code eq 'IsPermanent'){
+ $err{errispermanent} = 1;
$err{msg} =
$branches->{$messages->{'IsPermanent'}}->{'branchname'};
# Here, msg contains the branchname
# Not so satisfied with this... But should work
+ $allmessages = 1;
}
$err{errdesteqholding} = ($code eq 'DestinationEqualsHolding');
if ($code eq 'WasReturned') {
+ $err{errwasreturned} = 1;
+ $allmessages = 1;
my ($borrowerinfo) = getpatroninformation(\%env,
$messages->{'WasReturned'}, 0);
! $title = $borrowerinfo->{'title'};
! $surname = $borrowerinfo->{'surname'};
! $firstname = $borrowerinfo->{'firstname'};
$bornum =$borrowerinfo->{'borrowernumber'};
$borcnum =$borrowerinfo->{'cardnumber'};
}
! # if ($code eq 'WasTransfered'){
# Put code here if you want to notify the user that item was transfered...
! # $wastransferred = 1;
! # }
push (@errmsgloop, \%err);
}
#######################################################################################
# Make the page .....
***************
*** 251,254 ****
--- 278,285 ----
flagsrequired => {circulate => 1},
});
+ if($allmessages){
+ $template->param(allmessages => 1);
+ }
+
$template->param( genbrname => $genbrname,
genprname =>
$genprname,
***************
*** 258,262 ****
reserved =>
$reserved,
waiting =>
$waiting,
! name => $name,
bornum =>
$bornum,
borcnum =>
$borcnum,
--- 289,300 ----
reserved =>
$reserved,
waiting =>
$waiting,
! title => $title,
! surname =>
$surname,
! firstname =>
$firstname,
! borphone =>
$borphone,
! borstraddress
=> $borstraddress,
! borcity =>
$borcity,
! borzip =>
$borzip,
! boremail =>
$boremail,
bornum =>
$bornum,
borcnum =>
$borcnum,
***************
*** 269,272 ****
--- 307,311 ----
cancelled =>
$cancelled,
setwaiting =>
$setwaiting,
+ wastransferred
=> $wastransferred,
trsfitemloop =>
address@hidden,
branchoptionloop => address@hidden,
Index: circulation.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/circulation.pl,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -r1.88 -r1.89
*** circulation.pl 22 Sep 2005 10:01:46 -0000 1.88
--- circulation.pl 26 Oct 2005 09:13:11 -0000 1.89
***************
*** 59,64 ****
$findborrower =~ s|'| |g;
my $borrowernumber = $query->param('borrnumber');
! my $print=$query->param('print');
! my $barcode = $query->param('barcode');
my $year=$query->param('year');
my $month=$query->param('month');
--- 59,64 ----
$findborrower =~ s|'| |g;
my $borrowernumber = $query->param('borrnumber');
! my $print=$query->param('print') || '';
! my $barcode = $query->param('barcode') || '';
my $year=$query->param('year');
my $month=$query->param('month');
***************
*** 281,285 ****
my ($patrontable, $flaginfotable) = patrontable($borrower);
! my $amountold=$borrower->{flags}->{'CHARGES'}->{'message'};
my @temp=split(/\$/,$amountold);
$amountold=$temp[1];
--- 281,285 ----
my ($patrontable, $flaginfotable) = patrontable($borrower);
! my $amountold=$borrower->{flags}->{'CHARGES'}->{'message'} || 0;
my @temp=split(/\$/,$amountold);
$amountold=$temp[1];
Index: returns.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/returns.pl,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** returns.pl 3 May 2004 09:02:14 -0000 1.37
--- returns.pl 26 Oct 2005 09:13:11 -0000 1.38
***************
*** 27,30 ****
--- 27,31 ----
use CGI;
use C4::Circulation::Circ2;
+ use C4::Date;
use C4::Search;
use C4::Output;
***************
*** 202,205 ****
--- 203,212 ----
if ( $res->{'ResFound'} eq "Waiting" ) {
+ if($branch eq $res->{'branchcode'}){
+ $template->param(intransit => 0);
+ } else {
+ $template->param(intransit => 1);
+ }
+
$template->param(
found => 1,
***************
*** 209,212 ****
--- 216,220 ----
bortitle => $borr->{'title'},
borphone => $borr->{'phone'},
+ boremail => $borr->{'emailaddress'},
borstraddress => $borr->{'streetaddress'},
borcity => $borr->{'city'},
***************
*** 214,217 ****
--- 222,228 ----
bornum => $res->{'borrowernumber'},
borcnum => $borr->{'cardnumber'},
+ debarred => $borr->{'debarred'},
+ gonenoaddress => $borr->{'gonenoaddress'},
+ currentbranch => $branches->{ $branch }->{'branchname'},
branchname => $branches->{ $res->{'branchcode'}
}->{'branchname'},
waiting => 1,
***************
*** 231,236 ****
--- 242,255 ----
. sprintf( "%0.2d", ( $da[4] + 1 ) ) . "/"
. ( $da[5] + 1900 );
+
+ if($branch eq $res->{'branchcode'}){
+ $template->param(intransit => 0);
+ } else {
+ $template->param(intransit => 1);
+ }
+
$template->param(
found => 1,
+ currentbranch => $branches->{ $branch }->{'branchname'},
branchname => $branches->{ $res->{'branchcode'}
}->{'branchname'},
reserved => 1,
***************
*** 252,256 ****
borcity => $borr->{'city'},
borzip => $borr->{'zipcode'},
! boremail => $borr->{'emailadress'},
barcode => $barcode
);
--- 271,277 ----
borcity => $borr->{'city'},
borzip => $borr->{'zipcode'},
! boremail => $borr->{'emailaddress'},
! debarred => $borr->{'debarred'},
! gonenoaddress => $borr->{'gonenoaddress'},
barcode => $barcode
);
***************
*** 354,358 ****
getiteminformation( \%env, $item->{'itemnumber'}, 0 );
my %overdueitem;
! $overdueitem{duedate} = $item->{'date_due'};
$overdueitem{biblionum} = $iteminformation->{'biblionumber'};
$overdueitem{barcode} = $iteminformation->{'barcode'};
--- 375,379 ----
getiteminformation( \%env, $item->{'itemnumber'}, 0 );
my %overdueitem;
! $overdueitem{duedate} = format_date($item->{'date_due'});
$overdueitem{biblionum} = $iteminformation->{'biblionumber'};
$overdueitem{barcode} = $iteminformation->{'barcode'};
***************
*** 410,414 ****
. sprintf( "%0.2d", ( $datearr[4] + 1 ) ) . '-'
. sprintf( "%0.2d", $datearr[3] );
! $ri{duedate}=$duedate;
my ($borrower) =
getpatroninformation( \%env, $riborrowernumber{$_}, 0 );
--- 431,435 ----
. sprintf( "%0.2d", ( $datearr[4] + 1 ) ) . '-'
. sprintf( "%0.2d", $datearr[3] );
! $ri{duedate}=format_date($duedate);
my ($borrower) =
getpatroninformation( \%env, $riborrowernumber{$_}, 0 );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/circ branchtransfers.pl,1.20,1.21 circulation.pl,1.88,1.89 returns.pl,1.37,1.38,
Paul POULAIN <=
- Prev by Date:
[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.98,1.99 Fines.pm,1.11,1.12 Returns.pm,1.8,1.9
- Next by Date:
[Koha-cvs] CVS: koha/members deletemem.pl,1.5,1.6 imemberentry.pl,1.1,1.2 memberentry.pl,1.16,1.17 moremember.pl,1.17,1.18
- Previous by thread:
[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.98,1.99 Fines.pm,1.11,1.12 Returns.pm,1.8,1.9
- Next by thread:
[Koha-cvs] CVS: koha/members deletemem.pl,1.5,1.6 imemberentry.pl,1.1,1.2 memberentry.pl,1.16,1.17 moremember.pl,1.17,1.18
- Index(es):