4 use C4::Circulation::Circ2;
13 print startmenu('catalogue');
17 <a href=circulation.pl?module=issues>Issues</a> |
18 <a href=circulation.pl?module=returns>Returns</a>
23 if ($query->param('module') eq 'issues') { issues(); last SWITCH; }
24 if ($query->param('module') eq 'returns') { returns(); last SWITCH; }
33 <a href=circulation.pl?module=issues>Issues</a>
34 <a href=circulation.pl?module=returns>Returns</a>
39 if (my $borrnumber=$query->param('borrnumber')) {
40 my ($borrower, $flags) = getpatroninformation(\%env,$borrnumber,0);
41 if (my $barcode=$query->param('barcode')) {
43 foreach (sort $query->param) {
44 if ($_ =~ /response-(\d*)/) {
45 $responses{$1}=$query->param($_);
48 if (my $qnumber=$query->param('questionnumber')) {
49 $responses{$qnumber}=$query->param('answer');
51 my ($iteminformation, $duedate, $rejected, $question, $questionnumber, $defaultanswer) = issuebook(\%env, $borrower, $barcode, \%responses);
53 if ($rejected == -1) {
55 print "Error issuing book: $rejected<br>\n";
60 <table border=1 bgcolor=#dddddd>
61 <tr><th bgcolor=black><font color=white><b>Issuing Question</b></font></td></tr>
63 Attempting to issue $iteminformation->{'title'} by $iteminformation->{'author'} to $borrower->{'firstname'} $borrower->{'surname'}.
72 <input type=hidden name=module value=issues>
73 <input type=hidden name=borrnumber value=$borrnumber>
74 <input type=hidden name=barcode value=$barcode>
75 <input type=hidden name=questionnumber value=$questionnumber>
76 <input type=hidden name=answer value=Y>
77 <input type=submit value=Yes>
82 <input type=hidden name=module value=issues>
83 <input type=hidden name=borrnumber value=$borrnumber>
84 <input type=hidden name=barcode value=$barcode>
85 <input type=hidden name=questionnumber value=$questionnumber>
86 <input type=hidden name=answer value=N>
87 <input type=submit value=No>
98 my $issueid=$query->param('issueid');
99 ($issueid) || ($issueid=int(rand()*1000000000));
102 foreach $flag (sort keys %$flags) {
105 $env{'nottodaysissues'}=1;
106 my ($borrowerissues) = currentissues(\%env, $borrower);
107 $env{'nottodaysissues'}=0;
108 $env{'todaysissues'}=1;
109 my ($today) = currentissues(\%env, $borrower);
110 $env{'todaysissues'}=0;
112 my @datearr = localtime(time());
113 my $todaysdate = (1900+$datearr[5]).sprintf ("%0.2d", ($datearr[4]+1)).sprintf ("%0.2d", $datearr[3]);
114 foreach (sort keys %$borrowerissues) {
115 my $bookissue=$borrowerissues->{$_};
117 my $datedue=$bookissue->{'date_due'};
119 if ($datedue < $todaysdate) {
120 $bgcolor="bgcolor=red";
122 $previssues.="<tr $bgcolor><td>$bookissue->{'date_due'}</td><td>$bookissue->{'barcode'}</td><td>$bookissue->{'title'}</td><td>$bookissue->{'author'}</td><td>$bookissue->{'dewey'} $bookissue->{'subclass'}</td></tr>\n";
125 foreach (sort keys %$today) {
126 my $bookissue=$today->{$_};
127 $todaysissues.="<tr><td>$bookissue->{'date_due'}</td><td>$bookissue->{'barcode'}</td><td>$bookissue->{'title'}</td><td>$bookissue->{'author'}</td><td>$bookissue->{'dewey'} $bookissue->{'subclass'}</td></tr>\n";
131 <input type=hidden name=module value=issues>
132 <input type=hidden name=borrnumber value=$borrnumber>
133 <table border=0 cellpadding=5>
136 <table border=3 bgcolor=#dddddd>
137 <tr><td colspan=2 bgcolor=black><font color=white><b>Enter Book Barcode</b></font></td></tr>
138 <tr><td>Item Barcode:</td><td><input name=barcode size=10></td></tr>
142 <table border=1 bgcolor=#dddddd>
143 <tr><th bgcolor=black><font color=white><b>Patron Information</b></font></td></tr>
145 $borrower->{'cardnumber'} $borrower->{'surname'}, $borrower->{'title'} $borrower->{'firstname'}<br>
146 $borrower->{'streetaddress'} $borrower->{'city'}<br>
147 $borrower->{'categorycode'} $flagtext
153 <td colspan=2 align=center>
154 <table border=1 width=100% bgcolor=#dddddd>
155 <tr><th colspan=5 bgcolor=black><font color=white><b>Today's Issues</b></font></th></tr>
156 <tr><th>Due Date</th><th>Bar Code</th><th>Title</th><th>Author</th><th>Class</th></tr>
162 <td colspan=2 align=center>
163 <table border=1 width=100% bgcolor=#dddddd>
164 <tr><th colspan=5 bgcolor=black><font color=white><b>Previous Issues</b></font></th></tr>
165 <tr><th>Due Date</th><th>Bar Code</th><th>Title</th><th>Author</th><th>Class</th></tr>
173 if (my $findborrower=$query->param('findborrower')) {
174 my ($borrowers, $flags) = findborrower(\%env, $findborrower);
175 print "<form method=get>\n";
176 print "<input type=hidden name=module value=issues>\n";
177 my @borrowers=@$borrowers;
178 if ($#borrowers == 0) {
179 $query->param('borrnumber', $borrowers[0]->{'borrowernumber'});
183 print "<table border=1 cellpadding=5 bgcolor=#dddddd>";
184 print "<tr><th bgcolor=black><font color=white><b>Select a borrower</b></font></th></tr>\n";
185 print "<tr><td align=center>\n";
186 print "<select name=borrnumber size=7>\n";
187 foreach (sort {$a->{'surname'}.$a->{'firstname'} cmp $b->{'surname'}.$b->{'firstname'}} @$borrowers) {
188 print "<option value=$_->{'borrowernumber'}>$_->{'surname'}, $_->{'firstname'} ($_->{'cardnumber'})\n";
190 print "</select><br>";
191 print "<input type=submit>\n";
192 print "</td></tr></table>\n";
196 <h1>Issues Module</h1>
198 <input type=hidden name=module value=issues>
199 <table border=1 bgcolor=#dddddd>
200 <tr><th bgcolor=black><font color=white><b>Enter borrower card number<br> or partial last name</b></font></td></tr>
201 <tr><td><input name=findborrower></td></tr>