From fe1fab2ab5a256297c66dfd4f396acb2e1d4a812 Mon Sep 17 00:00:00 2001 From: rangi Date: Wed, 28 Mar 2001 02:23:03 +0000 Subject: [PATCH] Reworked layout of issues section. --- C4/Circulation/Circ2.pm | 18 ++++++- circ/circulation.pl | 113 ++++++++++++++++++---------------------- 2 files changed, 66 insertions(+), 65 deletions(-) diff --git a/C4/Circulation/Circ2.pm b/C4/Circulation/Circ2.pm index 1bc03b87ce..45aad816f4 100755 --- a/C4/Circulation/Circ2.pm +++ b/C4/Circulation/Circ2.pm @@ -200,6 +200,10 @@ sub issuebook { $rejected="Patron's card has been reported lost."; last SWITCH; } + if ($patroninformation->{'debarred'}) { + $rejected="Patron is Debarred"; + last SWITCH; + } my $amount = checkaccount($env,$patroninformation->{'borrowernumber'}, $dbh); if ($amount>5) { $rejected=sprintf "Patron owes \$%.02f.", $amount; @@ -451,6 +455,12 @@ sub patronflags { $flaginfo{'noissues'}=1; $flags{'LOST'}=\%flaginfo; } + if ($patroninformation->{'debarred'} == 1) { + my %flaginfo; + $flaginfo{'message'}='Borrower is Debarred.'; + $flaginfo{'noissues'}=1; + $flags{'DBARRED'}=\%flaginfo; + } if ($patroninformation->{'borrowernotes'}) { my %flaginfo; $flaginfo{'message'}="$patroninformation->{'borrowernotes'}"; @@ -459,7 +469,7 @@ sub patronflags { my ($odues, $itemsoverdue) = checkoverdues($env,$patroninformation->{'borrowernumber'},$dbh); if ($odues > 0) { my %flaginfo; - $flaginfo{'message'}="Patron has overdue items"; + $flaginfo{'message'}="Yes"; $flaginfo{'itemlist'}=$itemsoverdue; foreach (sort {$a->{'date_due'} cmp $b->{'date_due'}} @$itemsoverdue) { $flaginfo{'itemlisttext'}.="$_->{'date_due'} $_->{'barcode'} $_->{'title'} \n"; @@ -587,7 +597,11 @@ sub currentissues { my $today = (1900+$datearr[5]).sprintf "0%02d", ($datearr[4]+1).sprintf "%02d", $datearr[3]; $crit=" and !(issues.timestamp like '$today%') "; } - my $select="select * from issues,items,biblioitems,biblio where borrowernumber=$borrowernumber and issues.itemnumber=items.itemnumber and items.biblionumber=biblio.biblionumber and items.biblioitemnumber=biblioitems.biblioitemnumber and returndate is null $crit order by date_due"; + my $select="select * from issues,items,biblioitems,biblio where + borrowernumber=$borrowernumber and issues.itemnumber=items.itemnumber and + items.biblionumber=biblio.biblionumber and + items.biblioitemnumber=biblioitems.biblioitemnumber and returndate is null + $crit order by issues.timestamp desc"; # print $select; my $sth=$dbh->prepare($select); $sth->execute; diff --git a/circ/circulation.pl b/circ/circulation.pl index 45ae183ab1..9382bd1609 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -11,9 +11,9 @@ my %env; my $headerbackgroundcolor='#99cc33'; my $circbackgroundcolor='#ffffcc'; my $circbackgroundcolor='white'; -my $linecolor1='#bbbbbb'; -my $linecolor2='#dddddd'; -my $backgroundimage="/koha/images/background-mem.gif"; +my $linecolor1='#ffffcc'; +my $linecolor2='white'; +my $backgroundimage="/images/background-mem.gif"; my $query=new CGI; my $branches=getbranches(\%env); my $printers=getprinters(\%env); @@ -75,30 +75,6 @@ print startpage(); print startmenu('circulation'); -print << "EOF"; -
-

- - - - - - - - - - -
$branchname - - - Branch/Printer - - -$printername
- - -
-EOF if ($printer && $branch) { @@ -112,6 +88,7 @@ if ($printer && $branch) { my ($printerform, $branchform); if ($printercount>1) { $printerform=<<"EOF"; +
Choose a Printer
@@ -141,6 +118,7 @@ $branchoptions EOF } print << "EOF"; +
Select a branch and a printer
@@ -443,9 +421,14 @@ sub issues { $query->param('borrnumber','') } unless ($noheader) { - print << "EOF"; -
- + + - +
Circulation - Issues -
+ print < + + Next Borrower || + Returns

+ + +

EOF } if (my $borrnumber=$query->param('borrnumber')) { @@ -675,14 +658,19 @@ EOF my ($borrower, $flags) = getpatroninformation(\%env,$borrnumber,0); my ($patrontable, $flaginfotable) = patrontable($borrower); print << "EOF"; + $patrontable + $flaginfotable + Issues    
Branch: $branch, + Printer: $printer

+

- +
- +
-
Enter Book Barcode
- +
-
Item Barcode:
@@ -694,38 +682,36 @@ EOF
-
Sticky Due Date
-
- +
+

- $patrontable -
- Next borrower -
- $flaginfotable -
+
+ +

+ + + \n"; + $flaginfotext.="\n"; } else { - $flaginfotext.="\n"; + $flaginfotext.="\n"; } } else { - $flaginfotext.="\n"; + $flaginfotext.="\n"; } } } - ($flaginfotext) && ($flaginfotext="
- +
$todaysissues
Issues Today
Due DateBar CodeTitleAuthorClass
- +
$previssues @@ -805,13 +791,13 @@ sub patrontable { $flags->{$flag}->{'message'}=~s/\n/
/g; if ($flags->{$flag}->{'noissues'}) { if ($flag eq 'CHARGES') { - $flaginfotext.="\n"; + $flaginfotext.="\n"; } else { - $flaginfotext.="\n"; + $flaginfotext.="\n"; } } else { if ($flag eq 'CHARGES') { - $flaginfotext.="\n"; + $flaginfotext.="\n"; } elsif ($flag eq 'WAITING') { my $itemswaiting=''; my $items=$flags->{$flag}->{'itemlist'}; @@ -819,7 +805,7 @@ sub patrontable { my ($iteminformation) = getiteminformation($env, $item->{'itemnumber'}, 0); $itemswaiting.="{'biblionumber'}&type=intra onClick=\"openWindow(this, 'Item', 480, 640)\">$iteminformation->{'barcode'} $iteminformation->{'title'} ($branches->{$iteminformation->{'holdingbranch'}}->{'branchname'})
\n"; } - $flaginfotext.="\n"; + $flaginfotext.="\n"; } elsif ($flag eq 'ODUES') { my $items=$flags->{$flag}->{'itemlist'}; my $itemswaiting="
Previous Issues
Due DateBar CodeTitleAuthorClass
$flag$flags->{$flag}->{'message'} {'borrowernumber'} onClick=\"openWindow(this, 'Payment', 480,640)\">Payment
$flag$flags->{$flag}->{'message'} {'borrowernumber'} onClick=\"openWindow(this, 'Payment', 480,640)\">Payment
$flag$flags->{$flag}->{'message'}
$flag$flags->{$flag}->{'message'}
$flag$flags->{$flag}->{'message'} {'borrowernumber'} onClick=\"openWindow(this, 'Payment', 480,640)\">Payment
$flag{$flag}->{'message'} {'borrowernumber'} onClick=\"openWindow(this, 'Payment', 480,640)\">Payment
$flag$flags->{$flag}->{'message'}
$itemswaiting
$flag$itemswaiting
\n"; @@ -829,35 +815,36 @@ sub patrontable { foreach $item (@$items) { ($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1); my ($iteminformation) = getiteminformation($env, $item->{'itemnumber'}, 0); - $itemswaiting.="\n"; + $itemswaiting.="\n"; } } $itemswaiting.="
$iteminformation->{'date_due'}{'biblionumber'}&type=intra onClick=\"openWindow(this, 'Item', 480, 640)\">$iteminformation->{'barcode'}$iteminformation->{'title'}
$iteminformation->{'date_due'}{'biblionumber'}&type=intra onClick=\"openWindow(this, 'Item', 480, 640)\">$iteminformation->{'barcode'}$iteminformation->{'title'}
\n"; if ($query->param('module') ne 'returns'){ - $flaginfotext.="
$flag$flags->{$flag}->{'message'}
Overdue items can be seen in the Previous Issues table below
$flag$flags->{$flag}->{'message'}, See below
$flag$flags->{$flag}->{'message'}
$flag$flags->{$flag}->{'message'}
$flag$flags->{$flag}->{'message'}
$flag$flags->{$flag}->{'message'}
$flaginfotext
Patron Flags
\n"); + ($flaginfotext) && ($flaginfotext="Flags$flaginfotext\n"); my $patrontable= << "EOF"; - - -
Patron Information
+ + + -
Patron Information
{'borrowernumber'} onClick="openWindow(this,'Member', 480, 640)">$borrower->{'cardnumber'} $borrower->{'surname'}, $borrower->{'title'} $borrower->{'firstname'}
EOF if ($query->param('module') ne 'returns'){ - $patrontable.="$borrower->{'streetaddress'} $borrower->{'city'}
+ $patrontable.="$borrower->{'streetaddress'} $borrower->{'city'} Cat: $borrower->{'categorycode'} "; } $patrontable.=<< "EOF"; - $flagtext +
+ EOF return($patrontable, $flaginfotext); } -- 2.39.5