From b71839d85c8cfcaf6c4fa467449cabe5761d987b Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 17 Apr 2007 08:44:49 +0000 Subject: [PATCH] circulation cleaning continued: bufixing --- C4/Biblio.pm | 25 +- C4/Circulation.pm | 14 +- C4/Context.pm | 6 +- C4/Reserves2.pm | 11 +- circ/branchreserves.pl | 4 +- circ/circulation.pl | 2 +- circ/currenttransfers.pl | 2 + circ/returns.pl | 139 ++++---- circ/waitingreservestransfers.pl | 21 +- .../prog/en/circ/branchreserves.tmpl | 2 +- .../prog/en/circ/currenttransfers.tmpl | 13 +- .../intranet-tmpl/prog/en/circ/returns.tmpl | 319 +++++++++--------- .../en/circ/waitingreservestransfers.tmpl | 2 +- members/member-flags.pl | 7 +- members/member-password.pl | 10 +- opac/opac-shelves.pl | 5 +- serials/serials-edit.pl | 2 +- 17 files changed, 286 insertions(+), 298 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 758abdf585..04340535e9 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -66,7 +66,7 @@ push @EXPORT, qw( &GetMarcSeries &GetItemsInfo - &GetItemFromBarcode + &GetItemnumberFromBarcode &get_itemnumbers_of &GetXmlBiblio @@ -1133,17 +1133,17 @@ sub GetBiblioItemData { return ($data); } # sub &GetBiblioItemData -=head2 GetItemFromBarcode +=head2 GetItemnumberFromBarcode =over 4 -$result = GetItemFromBarcode($barcode); +$result = GetItemnumberFromBarcode($barcode); =back =cut -sub GetItemFromBarcode { +sub GetItemnumberFromBarcode { my ($barcode) = @_; my $dbh = C4::Context->dbh; @@ -1497,13 +1497,12 @@ sub GetMarcBiblio { $dbh->prepare("select marcxml from biblioitems where biblionumber=? "); $sth->execute($biblionumber); my ($marcxml) = $sth->fetchrow; -# warn "marcxml : $marcxml"; MARC::File::XML->default_record_format(C4::Context->preference('marcflavour')); - $marcxml =~ s/\x1e//g; - $marcxml =~ s/\x1f//g; - $marcxml =~ s/\x1d//g; - $marcxml =~ s/\x0f//g; - $marcxml =~ s/\x0c//g; +# $marcxml =~ s/\x1e//g; +# $marcxml =~ s/\x1f//g; +# $marcxml =~ s/\x1d//g; +# $marcxml =~ s/\x0f//g; +# $marcxml =~ s/\x0c//g; my $record = MARC::Record->new(); $record = MARC::Record::new_from_xml( $marcxml, "utf8",C4::Context->preference('marcflavour')) if $marcxml; return $record; @@ -1593,9 +1592,7 @@ sub GetMarcItem { my $marcxml = GetXmlBiblio($biblionumber); my $record = MARC::Record->new(); -# warn "marcxml :$marcxml"; $record = MARC::Record::new_from_xml( $marcxml, "utf8", $marcflavour ); -# warn "record :".$record->as_formatted; # now, find where the itemnumber is stored & extract only the item my ( $itemnumberfield, $itemnumbersubfield ) = GetMarcFromKohaField( $dbh, 'items.itemnumber', '' ); @@ -2101,7 +2098,6 @@ sub TransformHtmlToMarc { # the last has not been included inside the loop... do it now ! $record->insert_fields_ordered($field) if $field; - # warn "HTML2MARC=".$record->as_formatted; $record->encoding('UTF-8'); # $record->MARC::File::USMARC::update_leader(); @@ -3654,6 +3650,9 @@ Joshua Ferraro jmf@liblime.com # $Id$ # $Log$ +# Revision 1.196 2007/04/17 08:48:00 tipaul +# circulation cleaning continued: bufixing +# # Revision 1.195 2007/04/04 16:46:22 tipaul # HUGE COMMIT : code cleaning circulation. # diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 56fb3ce702..66c98fc02c 100755 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -221,7 +221,7 @@ sub transferbook { my %env; my $dotransfer = 1; my $branches = GetBranches(); - my $item = GetItemFromBarcode( $barcode ); + my $item = GetItemnumberFromBarcode( $barcode ); my $issue = GetItemIssues($item->{itemnumber}); # bad barcode.. @@ -697,7 +697,7 @@ sub CanBookBeIssued { my ( $env, $borrower, $barcode, $year, $month, $day, $inprocess ) = @_; my %needsconfirmation; # filled with problems that needs confirmations my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE - my $item = GetItem(GetItemFromBarcode( $barcode )); + my $item = GetItem(GetItemnumberFromBarcode( $barcode )); my $issue = GetItemIssue($item->{itemnumber}); my $dbh = C4::Context->dbh; @@ -877,7 +877,7 @@ Issue a book. Does no check, they are done in CanBookBeIssued. If we reach this =item C<$date> contains the max date of return. calculated if empty. AddIssue does the following things : -- step 0°: check that there is a borrowernumber & a barcode provided +- step 0�: check that there is a borrowernumber & a barcode provided - check for RENEWAL (book issued & being issued to the same patron) - renewal YES = Calculate Charge & renew - renewal NO = @@ -1219,7 +1219,7 @@ sub AddReturn { die '$branch not defined' unless defined $branch; # just in case (bug 170) # get information on item - my $iteminformation = GetItemIssue( GetItemFromBarcode($barcode)); + my $iteminformation = GetItemIssue( GetItemnumberFromBarcode($barcode)); if ( not $iteminformation ) { $messages->{'BadBarcode'} = $barcode; $doreturn = 0; @@ -1240,7 +1240,7 @@ sub AddReturn { # check that the book has been cancelled if ( $iteminformation->{'wthdrawn'} ) { - $messages->{'wthdrawn'} = 1;itemnumber + $messages->{'wthdrawn'} = 1; $doreturn = 0; } @@ -1311,8 +1311,6 @@ if ( $iteminformation->{'holdingbranch'} ne C4::Context->userenv->{'branch'} ) my ( $resfound, $resrec ) = CheckReserves( $iteminformation->{'itemnumber'} ); if ($resfound) { - -# my $tobrcd = ReserveWaiting($resrec->{'itemnumber'}, $resrec->{'borrowernumber'}); $resrec->{'ResFound'} = $resfound; $messages->{'ResFound'} = $resrec; $reserveDone = 1; @@ -1409,7 +1407,7 @@ sub GetItemIssue { if ( $datedue < $today ) { $data->{'overdue'} = 1; } - my $itemnumber = $data->{'itemnumber'}; + $data->{'itemnumber'} = $itemnumber; # fill itemnumber, in case item is not on issue $sth->finish; return ($data); } diff --git a/C4/Context.pm b/C4/Context.pm index aac3206eaa..6a25a4ae08 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -544,7 +544,8 @@ sub _new_dbh $db_user, $db_passwd); # Koha 3.0 is utf-8, so force utf8 communication between mySQL and koha, whatever the mysql default config. # this is better than modifying my.cnf (and forcing all communications to be in utf8) - $dbh->do("set NAMES 'utf8'") if ($dbh); + $dbh->do("set NAMES 'utf8'") if ($dbh); + $dbh->{'mysql_enable_utf8'}=1; #enable return $dbh; } @@ -874,6 +875,9 @@ Joshua Ferraro =cut # $Log$ +# Revision 1.55 2007/04/17 08:48:00 tipaul +# circulation cleaning continued: bufixing +# # Revision 1.54 2007/03/29 16:45:53 tipaul # Code cleaning of Biblio.pm (continued) # diff --git a/C4/Reserves2.pm b/C4/Reserves2.pm index eb3bca6db6..8d04d112b2 100755 --- a/C4/Reserves2.pm +++ b/C4/Reserves2.pm @@ -129,7 +129,7 @@ sub OtherReserves { ); #launch the subroutine dotransfer - C4::Circulation::Circ2::dotransfer( + C4::Circulation::dotransfer( $itemnumber, $iteminfo->{'holdingbranch'}, $checkreserves->{'branchcode'} @@ -1387,22 +1387,23 @@ sub FindReservesInQueue { =head2 GetReservesToBranch -@transreserv = GetReservesToBranch( $frombranch, $excludingbranch ); +@transreserv = GetReservesToBranch( $frombranch ); + +Get reserve list for a given branch =cut sub GetReservesToBranch { - my ( $frombranch, $excludingbranch ) = @_; + my ( $frombranch ) = @_; my $dbh = C4::Context->dbh; my $sth = $dbh->prepare( "SELECT borrowernumber,reservedate,itemnumber,timestamp FROM reserves WHERE priority='0' AND cancellationdate is null AND branchcode=? - AND branchcode!=? AND found IS NULL " ); - $sth->execute( $frombranch, $excludingbranch ); + $sth->execute( $frombranch ); my @transreserv; my $i = 0; while ( my $data = $sth->fetchrow_hashref ) { diff --git a/circ/branchreserves.pl b/circ/branchreserves.pl index 42a502a801..8dea6049a0 100755 --- a/circ/branchreserves.pl +++ b/circ/branchreserves.pl @@ -27,6 +27,8 @@ use C4::Branch; # GetBranchName use C4::Auth; use C4::Date; use C4::Circulation; +use C4::Members; +use C4::Biblio; use Date::Calc qw( Today @@ -103,7 +105,7 @@ if ($item) { # if the document is not in his homebranch location and there is not reservation after, we transfer it if ( ( $fbr ne $tbr ) and ( not $nextreservinfo ) ) { - C4::Circulation::Circ2::dotransfer( $item, $fbr, $tbr ); + dotransfer( $item, $fbr, $tbr ); } } diff --git a/circ/circulation.pl b/circ/circulation.pl index 04bc673990..6c90171a10 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -413,7 +413,7 @@ if ($borrower) { if ($restype) { $it->{'can_renew'} = 0; } - push @todaysissues, $issueslist->{$it}; + push @todaysissues, $it; } else { ( diff --git a/circ/currenttransfers.pl b/circ/currenttransfers.pl index 9d0bc1ac41..2c4c4a67ee 100755 --- a/circ/currenttransfers.pl +++ b/circ/currenttransfers.pl @@ -26,7 +26,9 @@ use C4::Output; use C4::Branch; use C4::Auth; use C4::Date; +use C4::Biblio; use C4::Circulation; +use C4::Members; use C4::Interface::CGI::Output; use Date::Calc qw( Today diff --git a/circ/returns.pl b/circ/returns.pl index ce4781e623..3b08ca5ca6 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -33,6 +33,8 @@ use C4::Output; use C4::Print; use C4::Reserves2; use C4::Auth; +use C4::Biblio; +use C4::Members; use C4::Interface::CGI::Output; use C4::Branch; # GetBranchName use C4::Koha; # FIXME : is it still useful ? @@ -155,22 +157,36 @@ if ( $query->param('resbarcode') ) { } } -my $iteminformation; my $borrower; my $returned = 0; my $messages; +my $issueinformation; my $barcode = $query->param('barcode'); # actually return book and prepare item table..... if ($barcode) { # decode cuecat $barcode = cuecatbarcodedecode($barcode); - ( $returned, $messages, $iteminformation, $borrower ) = +# +# save the return +# + ( $returned, $messages, $issueinformation, $borrower ) = AddReturn( $barcode, C4::Context->userenv->{'branch'} ); + # get biblio description + my $biblio = GetBiblioFromItemNumber($issueinformation->{'itemnumber'}); + $template->param( + title => $biblio->{'title'}, + homebranch => $biblio->{'homebranch'}, + author => $biblio->{'author'}, + itembarcode => $biblio->{'barcode'}, + itemtype => $biblio->{'itemtype'}, + ccode => $biblio->{'ccode'}, + itembiblionumber => $biblio->{'biblionumber'}, + ); if ($returned) { $returneditems{0} = $barcode; $riborrowernumber{0} = $borrower->{'borrowernumber'}; - $riduedate{0} = $iteminformation->{'date_due'}; + $riduedate{0} = $issueinformation->{'date_due'}; my %input; $input{counter} = 0; $input{first} = 1; @@ -181,8 +197,8 @@ if ($barcode) { # check if the branch is the same as homebranch # if not, we want to put a message - if ( $iteminformation->{'homebranch'} ne C4::Context->userenv->{'branch'} ) { - $template->param( homebranch => $iteminformation->{'homebranch'} ); + if ( $biblio->{'homebranch'} ne C4::Context->userenv->{'branch'} ) { + $template->param( homebranch => $biblio->{'homebranch'} ); } } elsif ( !$messages->{'BadBarcode'} ) { @@ -205,14 +221,6 @@ if ($barcode) { } push( @inputloop, \%input ); } - $template->param( - returned => $returned, - itemtitle => $iteminformation->{'title'}, - - # itembc => $iteminformation->{'barcode'}, - # itemdatedue => $iteminformation->{'datedue'}, - itemauthor => $iteminformation->{'author'} - ); } $template->param( inputloop => \@inputloop ); @@ -224,14 +232,9 @@ my $reserved = 0; # if the document is transfered, we have warning message . if ( $messages->{'WasTransfered'} ) { - - my $iteminfo = GetBiblioFromItemNumber( 0, $barcode ); - $template->param( found => 1, transfer => 1, - itemhomebranch => - $branches->{ $iteminfo->{'homebranch'} }->{'branchname'} ); } @@ -245,13 +248,11 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { WrongTransferItem => $messages->{'WrongTransferItem'}, ); - my $res = $messages->{'ResFound'}; - my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; - my ($borr) = GetMemberDetails( $res->{'borrowernumber'}, 0 ); + my $reserve = $messages->{'ResFound'}; + my $branchname = $branches->{ $reserve->{'branchcode'} }->{'branchname'}; + my ($borr) = GetMemberDetails( $reserve->{'borrowernumber'}, 0 ); my $name = $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'}; - my $iteminfo = GetBiblioFromItemNumber( 0, $barcode ); - $template->param( wname => $name, wborfirstname => $borr->{'firstname'}, @@ -262,29 +263,22 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { wborstraddress => $borr->{'streetaddress'}, wborcity => $borr->{'city'}, wborzip => $borr->{'zipcode'}, - wborrowernumber => $res->{'borrowernumber'}, + wborrowernumber => $reserve->{'borrowernumber'}, wborcnum => $borr->{'cardnumber'}, - witemtitle => $iteminfo->{'title'}, - witemauthor => $iteminfo->{'author'}, - witembarcode => $iteminfo->{'barcode'}, - witemtype => $iteminfo->{'itemtype'}, - wccode => $iteminfo->{'ccode'}, - witembiblionumber => $iteminfo->{'biblionumber'}, wtransfertFrom => C4::Context->userenv->{'branch'}, ); } +# +# reserve found and item arrived at the expected branch +# if ( $messages->{'ResFound'} and not $messages->{'WrongTransfer'}) { - my $res = $messages->{'ResFound'}; - my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; - my ($borr) = GetMemberDetails( $res->{'borrowernumber'}, 0 ); - my $name = - $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'}; - my $iteminfo = GetBiblioFromItemNumber( 0, $barcode ); - - if ( $res->{'ResFound'} eq "Waiting" ) { - if ( C4::Context->userenv->{'branch'} eq $res->{'branchcode'} ) { + my $reserve = $messages->{'ResFound'}; + my $branchname = $branches->{ $reserve->{'branchcode'} }->{'branchname'}; + my ($borr) = GetMemberDetails( $reserve->{'borrowernumber'}, 0 ); + if ( $reserve->{'ResFound'} eq "Waiting" ) { + if ( C4::Context->userenv->{'branch'} eq $reserve->{'branchcode'} ) { $template->param( waiting => 1 ); } else { @@ -293,7 +287,7 @@ if ( $messages->{'ResFound'} and not $messages->{'WrongTransfer'}) { $template->param( found => 1, - name => $name, + name => $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'}, borfirstname => $borr->{'firstname'}, borsurname => $borr->{'surname'}, bortitle => $borr->{'title'}, @@ -302,29 +296,23 @@ if ( $messages->{'ResFound'} and not $messages->{'WrongTransfer'}) { borstraddress => $borr->{'streetaddress'}, borcity => $borr->{'city'}, borzip => $borr->{'zipcode'}, - borrowernumber => $res->{'borrowernumber'}, + borrowernumber => $reserve->{'borrowernumber'}, borcnum => $borr->{'cardnumber'}, debarred => $borr->{'debarred'}, gonenoaddress => $borr->{'gonenoaddress'}, currentbranch => $branches->{C4::Context->userenv->{'branch'}}->{'branchname'}, - itemnumber => $res->{'itemnumber'}, - itemtitle => $iteminfo->{'title'}, - itemauthor => $iteminfo->{'author'}, - itembarcode => $iteminfo->{'barcode'}, - itemtype => $iteminfo->{'itemtype'}, - ccode => $iteminfo->{'ccode'}, - itembiblionumber => $iteminfo->{'biblionumber'} + itemnumber => $reserve->{'itemnumber'}, ); } - if ( $res->{'ResFound'} eq "Reserved" ) { + if ( $reserve->{'ResFound'} eq "Reserved" ) { my @da = localtime( time() ); my $todaysdate = sprintf( "%0.2d", ( $da[3] + 1 ) ) . "/" . sprintf( "%0.2d", ( $da[4] + 1 ) ) . "/" . ( $da[5] + 1900 ); - if ( C4::Context->userenv->{'branch'} eq $res->{'branchcode'} ) { + if ( C4::Context->userenv->{'branch'} eq $reserve->{'branchcode'} ) { $template->param( intransit => 0 ); } else { @@ -334,24 +322,17 @@ if ( $messages->{'ResFound'} and not $messages->{'WrongTransfer'}) { $template->param( found => 1, currentbranch => $branches->{C4::Context->userenv->{'branch'}}->{'branchname'}, - name => $name, destbranchname => - $branches->{ $res->{'branchcode'} }->{'branchname'}, - destbranch => $res->{'branchcode'}, - transfertodo => ( C4::Context->userenv->{'branch'} eq $res->{'branchcode'} ? 0 : 1 ), + $branches->{ $reserve->{'branchcode'} }->{'branchname'}, + destbranch => $reserve->{'branchcode'}, + transfertodo => ( C4::Context->userenv->{'branch'} eq $reserve->{'branchcode'} ? 0 : 1 ), reserved => 1, today => $todaysdate, - itemnumber => $res->{'itemnumber'}, - itemtitle => $iteminfo->{'title'}, - itemauthor => $iteminfo->{'author'}, - itembarcode => $iteminfo->{'barcode'}, - itemtype => $iteminfo->{'itemtype'}, - ccode => $iteminfo->{'ccode'}, - itembiblionumber => $iteminfo->{'biblionumber'}, + itemnumber => $reserve->{'itemnumber'}, borsurname => $borr->{'surname'}, bortitle => $borr->{'title'}, borfirstname => $borr->{'firstname'}, - borrowernumber => $res->{'borrowernumber'}, + borrowernumber => $reserve->{'borrowernumber'}, borcnum => $borr->{'cardnumber'}, borphone => $borr->{'phone'}, borstraddress => $borr->{'streetaddress'}, @@ -441,14 +422,14 @@ if ($borrower) { my @waitingitemloop; my $items = $flags->{$flag}->{'itemlist'}; foreach my $item (@$items) { - my $iteminformation = + my $biblio = GetBiblioFromItemNumber( $item->{'itemnumber'}); my %waitingitem; - $waitingitem{biblionum} = $iteminformation->{'biblionumber'}; - $waitingitem{barcode} = $iteminformation->{'barcode'}; - $waitingitem{title} = $iteminformation->{'title'}; + $waitingitem{biblionum} = $biblio->{'biblionumber'}; + $waitingitem{barcode} = $biblio->{'barcode'}; + $waitingitem{title} = $biblio->{'title'}; $waitingitem{brname} = - $branches->{ $iteminformation->{'holdingbranch'} } + $branches->{ $biblio->{'holdingbranch'} } ->{'branchname'}; push( @waitingitemloop, \%waitingitem ); } @@ -460,15 +441,15 @@ if ($borrower) { foreach my $item ( sort { $a->{'date_due'} cmp $b->{'date_due'} } @$items ) { - my $iteminformation = - GetBiblioFromItemNumber( $item->{'itemnumber'}, 0 ); + my $biblio = + GetBiblioFromItemNumber( $item->{'itemnumber'}); my %overdueitem; $overdueitem{duedate} = format_date( $item->{'date_due'} ); - $overdueitem{biblionum} = $iteminformation->{'biblionumber'}; - $overdueitem{barcode} = $iteminformation->{'barcode'}; - $overdueitem{title} = $iteminformation->{'title'}; + $overdueitem{biblionum} = $biblio->{'biblionumber'}; + $overdueitem{barcode} = $biblio->{'barcode'}; + $overdueitem{title} = $biblio->{'title'}; $overdueitem{brname} = - $branches->{ $iteminformation->{'holdingbranch'} } + $branches->{ $biblio->{'holdingbranch'} } ->{'branchname'}; push( @itemloop, \%overdueitem ); } @@ -527,12 +508,12 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { } # my %ri; - my $iteminformation = GetBiblioFromItemNumber( 0, $barcode ); - $ri{itembiblionumber} = $iteminformation->{'biblionumber'}; - $ri{itemtitle} = $iteminformation->{'title'}; - $ri{itemauthor} = $iteminformation->{'author'}; - $ri{itemtype} = $iteminformation->{'itemtype'}; - $ri{ccode} = $iteminformation->{'ccode'}; + my $biblio = GetBiblioFromItemNumber(GetItemnumberFromBarcode($barcode)); + $ri{itembiblionumber} = $biblio->{'biblionumber'}; + $ri{itemtitle} = $biblio->{'title'}; + $ri{itemauthor} = $biblio->{'author'}; + $ri{itemtype} = $biblio->{'itemtype'}; + $ri{ccode} = $biblio->{'ccode'}; $ri{barcode} = $barcode; } else { diff --git a/circ/waitingreservestransfers.pl b/circ/waitingreservestransfers.pl index 916b6c9333..102a0385ad 100755 --- a/circ/waitingreservestransfers.pl +++ b/circ/waitingreservestransfers.pl @@ -27,6 +27,8 @@ use C4::Branch; # GetBranches use C4::Auth; use C4::Date; use C4::Circulation; +use C4::Reserves2; +use C4::Members; use Date::Calc qw( Today Add_Delta_Days @@ -37,8 +39,6 @@ use C4::Biblio; my $input = new CGI; -my $theme = $input->param('theme'); # only used if allowthemeoverride is set - my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => "circ/waitingreservestransfers.tmpl", @@ -77,25 +77,22 @@ foreach my $br ( keys %$branches ) { my %branchloop; $branchloop{'branchname'} = $branches->{$br}->{'branchname'}; $branchloop{'branchcode'} = $branches->{$br}->{'branchcode'}; - - # warn " branch=>".$branches->{$br}->{'branchcode'}; my @getreserves = - GetReservesToBranch( $branches->{$br}->{'branchcode'}, $default ); + GetReservesToBranch( $branches->{$br}->{'branchcode'} ); if (@getreserves) { foreach my $num (@getreserves) { my %getreserv; my %env; my $gettitle = GetBiblioFromItemNumber( $num->{'itemnumber'} ); +# use Data::Dumper; +# warn Dumper($gettitle); + warn "ITEM : ".$gettitle->{'title'}; my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} ); if ( $gettitle->{'holdingbranch'} eq $default ) { my $getborrower = GetMemberDetails( $num->{'borrowernumber'} ); $getreserv{'reservedate'} = format_date( $num->{'reservedate'} ); - -#my $calcDate=DateCalc($num->{'reservedate'},"+".C4::Context->preference('TransfersMaxDaysWarning')." days"); -#my $warning=Date_Cmp(ParseDate("today"),$calcDate); - my ( $reserve_year, $reserve_month, $reserve_day ) = split /-/, $num->{'reservedate'}; ( $reserve_year, $reserve_month, $reserve_day ) = @@ -119,12 +116,10 @@ foreach my $br ( keys %$branches ) { $getreserv{'borrowernum'} = $getborrower->{'borrowernumber'}; $getreserv{'borrowername'} = $getborrower->{'surname'}; $getreserv{'borrowerfirstname'} = $getborrower->{'firstname'}; - - if ( $getborrower->{'emailaddress'} ) { - $getreserv{'borrowermail'} = $getborrower->{'emailaddress'}; - } + $getreserv{'borrowermail'} = $getborrower->{'emailaddress'}; $getreserv{'borrowerphone'} = $getborrower->{'phone'}; push( @reservloop, \%getreserv ); + warn "=".$getreserv{'title'}.">>".$gettitle->{'title'}; } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/circ/branchreserves.tmpl b/koha-tmpl/intranet-tmpl/prog/en/circ/branchreserves.tmpl index ab9deea61f..a1530f6e09 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/circ/branchreserves.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/circ/branchreserves.tmpl @@ -48,7 +48,7 @@

Reserve Over

- "> + ">   ()
Barcode :

diff --git a/koha-tmpl/intranet-tmpl/prog/en/circ/currenttransfers.tmpl b/koha-tmpl/intranet-tmpl/prog/en/circ/currenttransfers.tmpl index ae3bfbb088..36aa344bdf 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/circ/currenttransfers.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/circ/currenttransfers.tmpl @@ -5,18 +5,19 @@
-

Transfers in wait for your library the :

+

Transfers made TO your library the :

+

You are the destination of this transfer

- + - + @@ -37,9 +38,9 @@

-

- Transfer without reserv linked -

+

+ None +

diff --git a/koha-tmpl/intranet-tmpl/prog/en/circ/returns.tmpl b/koha-tmpl/intranet-tmpl/prog/en/circ/returns.tmpl index b09215b7f7..9fe7f7ce8b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/circ/returns.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/circ/returns.tmpl @@ -1,126 +1,136 @@ -Koha › Circulation › Returns<!-- TMPL_IF Name="returned" -->: <!-- TMPL_VAR Name="itemtitle" --><!-- /TMPL_IF --> +Koha › Circulation › Returns <!-- TMPL_VAR Name="title" --> + +

This item was not transfered initialy to this library !

+
current transfers from the library : Coming from
Date of transfer TitleBorrowerReserved by Localisation Action

+ + + + + + + + + + +
Title : + "> +
Reserved for: + +
    +
  • ">
  • +
  • ,
  • +

  • +
  • +
  • +
+ + No reservation linked + +
Action : + this document must be transfered to : +
+
+ " /> + " /> + " /> + +
+ - -

This item was not transfered initialy to this library !

- + + + +

Waiting Reserve Found in your library

+ - - - - - + - - - - + +
">
Title : - "> -
Reserved for: - + Patron:
    -
  • ">
  • -
  • ,
  • -

  • -
  • -
  • +
  • ">
  • +
  • ,
  • +

  • +
  • +
- - No reservation linked - -
Action : - this document must be transfered to : -
- " /> - " /> - " /> - -
- - - - - - - -

Waiting Reserve Found in your library

- - - -
">
Patron: -
    -
  • ">
  • -
  • ,
  • -

  • -
  • -
  • -
- + + " value="" /> " value="" /> " value="" /> - -
- + + + - -

Reserve With necesary transfert Found

+ +

Reserve needing transfert found

- - + + + - - - -
">
Patron: -
    +
">
Patron: +
  • ">
  • -
  • ,
  • -

  • -
  • -
  • -
Transfer to:
- +
  • ,
  • +

  • +
  • +
  • + + + + + Transfer to: + + + + + " value="" /> " value="" /> " value="" /> " /> -
    - - - - -

    This item must return to his homebranch :

    -

    The document () Must be returned to his homebranch()

    -
    - - " value=""> - " value=""> - " value=""> - - - -
    - - - - -

    Item Consigned:

    - + + + + + +

    This item must return to his homebranch :

    +

    The document () Must be returned to his homebranch()

    +
    + + " value=""> + " value=""> + " value=""> + + + +
    + + + +

    Item Consigned:

    - - -
    ">
    Patron:
    + "> + + Patron: + + + + " value="" /> @@ -129,51 +139,51 @@ - -
    + + + + + + + +

    Reserve With necesary transfert Found

    + +

    Waiting Reserve Found in your library

    - - - - - -

    Reserve With necesary transfert Found

    - -

    Waiting Reserve Found in your library

    - - - - -
    ">
    Patron: -
      + + + + + - - - +
    • ,
    • +

    • +
    • +
    • + + + + + + +
      ">
      Patron: +
      • ">
      • -
      • ,
      • -

      • -
      • -
      • -
      Transfer to:
      Transfer to:
      +
      + + + " value="" /> + " value="" /> + " value="" /> + + " /> + " /> + " /> + " /> +
      + -
    -
    - - - " value="" /> - " value="" /> - " value="" /> - - " /> - " /> - " /> - " /> -
    - - -

    Circulation › Returns

    - +

    Circulation › Returns

    Enter item barcode @@ -213,26 +223,24 @@ - +
    -
    Item InformationPatron Information
    - -"> - , - - -( -, -) -
    - + + + + "> + , + + ( + , + ) + + + - - - -

    Returned Items

    - +

    Returned Items

    +
    @@ -247,7 +255,7 @@
    - + -
    Title Itemtype // @@ -268,8 +276,7 @@
    - +