koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/C4 Search.pm,1.99.2.5,1.99.2.6


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 Search.pm,1.99.2.5,1.99.2.6
Date: Thu, 07 Apr 2005 03:08:33 -0700

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10088/C4

Modified Files:
      Tag: rel_2_2
        Search.pm 
Log Message:
some bugfixes on item count & results shown on screen

Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.99.2.5
retrieving revision 1.99.2.6
diff -C2 -r1.99.2.5 -r1.99.2.6
*** Search.pm   18 Mar 2005 08:57:04 -0000      1.99.2.5
--- Search.pm   7 Apr 2005 10:08:31 -0000       1.99.2.6
***************
*** 1306,1314 ****
                                        AND biblioitems.biblioitemnumber = 
items.biblioitemnumber
                                        AND biblio.biblionumber = 
items.biblionumber";
!       if ($type ne 'intra'){
!               $query .= " and ((items.itemlost<>1 and items.itemlost <> 2)
!               or items.itemlost is NULL)
!               and (wthdrawn <> 1 or wthdrawn is NULL)";
!       }
        $query .= " order by items.dateaccessioned desc";
        my $sth=$dbh->prepare($query);
--- 1306,1315 ----
                                        AND biblioitems.biblioitemnumber = 
items.biblioitemnumber
                                        AND biblio.biblionumber = 
items.biblionumber";
! # buggy : opac & librarian interface can show the same info level & 
itemstatus should not be hardcoded
! #     if ($type ne 'intra'){
! #             $query .= " and ((items.itemlost<>1 and items.itemlost <> 2)
! #             or items.itemlost is NULL)
! #             and (wthdrawn <> 1 or wthdrawn is NULL)";
! #     }
        $query .= " order by items.dateaccessioned desc";
        my $sth=$dbh->prepare($query);
***************
*** 1325,1337 ****
                $datedue = format_date($idata->{'date_due'});
                }
!               if ($data->{'itemlost'} eq '2'){
!                       $datedue='Very Overdue';
!               }
!               if ($data->{'itemlost'} eq '1'){
!                       $datedue='Lost';
!               }
!               if ($data->{'wthdrawn'} eq '1'){
!                       $datedue="Cancelled";
!               }
                if ($datedue eq ''){
        #       $datedue="Available";
--- 1326,1340 ----
                $datedue = format_date($idata->{'date_due'});
                }
! # buggy : hardcoded & non-translatable
! # more : why don't you want to show the datedue if it's very very overdue ?
! #             if ($data->{'itemlost'} eq '2'){
! #                     $datedue='Very Overdue';
! #             }
! #             if ($data->{'itemlost'} eq '1'){
! #                     $datedue='Lost';
! #             }
! #             if ($data->{'wthdrawn'} eq '1'){
! #                     $datedue="Cancelled";
! #             }
                if ($datedue eq ''){
        #       $datedue="Available";
***************
*** 1366,1383 ****
        $sth->finish;
        #FIXME: ordering/indentation here looks wrong
!       my $sth2=$dbh->prepare("Select * from aqorders where biblionumber=?");
!       $sth2->execute($biblionumber);
!       my $data;
!       my $ocount;
!       if ($data=$sth2->fetchrow_hashref){
!               $ocount=$data->{'quantity'} - $data->{'quantityreceived'};
!               if ($ocount > 0){
!               $data->{'ocount'}=$ocount;
!               $data->{'order'}="One Order";
!               $results[$i]=$data;
!               }
!       }
!       $sth2->finish;
!       
        return(@results);
  }
--- 1369,1388 ----
        $sth->finish;
        #FIXME: ordering/indentation here looks wrong
! # buggy : count in $i+1 the info on qty ordered for $i : total shown is real 
total +1
! # useless : Koha 2.2.2 now automatically show the existing number of items
! # and if there is no items, and at least one is on order, show "on order".
! #     my $sth2=$dbh->prepare("Select * from aqorders where biblionumber=?");
! #     $sth2->execute($biblionumber);
! #     my $data;
! #     my $ocount;
! #     if ($data=$sth2->fetchrow_hashref){
! #             $ocount=$data->{'quantity'} - $data->{'quantityreceived'};
! #             if ($ocount > 0){
! #             $data->{'ocount'}=$ocount;
! #             $data->{'order'}="One Order";
! #             $results[$i]=$data;
! #             }
! #     }
! #     $sth2->finish;
        return(@results);
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]