[Koha-cvs] CVS: koha/circ circulation.pl,1.76,1.77
Owen Leonard
oleonard at users.sourceforge.net
Wed Nov 3 23:40:17 CET 2004
Update of /cvsroot/koha/koha/circ
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28494/circ
Modified Files:
circulation.pl
Log Message:
Re-adding patrontable subroutine so that borrower flags and waiting item information can be displayed
Index: circulation.pl
===================================================================
RCS file: /cvsroot/koha/koha/circ/circulation.pl,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -r1.76 -r1.77
*** circulation.pl 4 Oct 2004 20:29:07 -0000 1.76
--- circulation.pl 3 Nov 2004 22:40:14 -0000 1.77
***************
*** 75,78 ****
--- 75,79 ----
my %env; # FIXME env is used as an "environment" variable. Could be dropped probably...
+
$env{'branchcode'}=$branch;
$env{'printer'}=$printer;
***************
*** 261,264 ****
--- 262,266 ----
#title
+ my ($patrontable, $flaginfotable) = patrontable($borrower);
my $amountold=$borrower->{flags}->{'CHARGES'}->{'message'};
my @temp=split(/\$/,$amountold);
***************
*** 309,312 ****
--- 311,401 ----
# Extra subroutines,,,
+ sub patrontable {
+ my ($borrower) = @_;
+ my $flags = $borrower->{'flags'};
+ my $flaginfotable='';
+ my $flaginfotext;
+ #my $flaginfotext='';
+ my $flag;
+ my $color='';
+ foreach $flag (sort keys %$flags) {
+ warn $flag;
+ # my @itemswaiting='';
+ $flags->{$flag}->{'message'}=~s/\n/<br>/g;
+ if ($flags->{$flag}->{'noissues'}) {
+ $template->param(
+ noissues => 'true',
+ );
+ if ($flag eq 'GNA'){
+ $template->param(
+ gna => 'true'
+ );
+ }
+ if ($flag eq 'LOST'){
+ $template->param(
+ lost => 'true'
+ );
+ }
+ if ($flag eq 'DBARRED'){
+ $template->param(
+ dbarred => 'true'
+ );
+ }
+ if ($flag eq 'CHARGES') {
+ $template->param(
+ charges => 'true',
+ chargesmsg => $flags->{'CHARGES'}->{'message'}
+ );
+ }
+ } else {
+ if ($flag eq 'CHARGES') {
+ $template->param(
+ charges => 'true',
+ chargesmsg => $flags->{'CHARGES'}->{'message'}
+ );
+ }
+ if ($flag eq 'WAITING') {
+ my $items=$flags->{$flag}->{'itemlist'};
+ my @itemswaiting;
+ foreach my $item (@$items) {
+ my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0);
+ $iteminformation->{'branchname'} = $branches->{$iteminformation->{'holdingbranch'}}->{'branchname'};
+ push @itemswaiting, $iteminformation;
+ }
+ $template->param(
+ waiting => 'true',
+ waitingmsg => $flags->{'WAITING'}->{'message'},
+ itemswaiting => \@itemswaiting,
+ );
+ }
+ if ($flag eq 'ODUES') {
+ $template->param(
+ odues => 'true',
+ oduesmsg => $flags->{'ODUES'}->{'message'}
+ );
+
+ my $items=$flags->{$flag}->{'itemlist'};
+ {
+ my @itemswaiting;
+ foreach my $item (@$items) {
+ my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0);
+ push @itemswaiting, $iteminformation;
+ }
+ }
+ if ($query->param('module') ne 'returns'){
+ $template->param( nonreturns => 'true' );
+ }
+ }
+ if ($flag eq 'NOTES') {
+ $template->param(
+ notes => 'true',
+ notesmsg => $flags->{'NOTES'}->{'message'}
+ );
+ }
+ }
+ }
+ return($patrontable, $flaginfotext);
+ }
+
sub cuecatbarcodedecode {
my ($barcode) = @_;
More information about the Koha-cvs
mailing list