koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Accounts2.pm,1.22,1.23 Acquisition.pm,1.12,1.13


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 Accounts2.pm,1.22,1.23 Acquisition.pm,1.12,1.13 AuthoritiesMarc.pm,1.18,1.19 Auth.pm,1.38,1.39 Auth_with_ldap.pm,1.3,1.4 Biblio.pm,1.120,1.121 Bull.pm,1.11,1.12 Context.pm,1.20,1.21 Members.pm,1.7,1.8 Output.pm,1.51,1.52 SearchMarc.pm,1.45,1.46
Date: Mon, 20 Jun 2005 07:10:05 -0700

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

Modified Files:
        Accounts2.pm Acquisition.pm AuthoritiesMarc.pm Auth.pm 
        Auth_with_ldap.pm Biblio.pm Bull.pm Context.pm Members.pm 
        Output.pm SearchMarc.pm 
Log Message:
synch'ing 2.2 and head

Index: Accounts2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Accounts2.pm,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** Accounts2.pm        9 Dec 2003 15:03:00 -0000       1.22
--- Accounts2.pm        20 Jun 2005 14:10:00 -0000      1.23
***************
*** 302,310 ****
    }
    if ($itemnum ne ''){
- #FIXME to use ? before uncommenting
- #     my $sth=$dbh->prepare("Select * from items where barcode='$itemnum'");
- #     $sth->execute;
- #     my $data=$sth->fetchrow_hashref;
- #     $sth->finish;
      $desc.=" ".$itemnum;
      my $sth=$dbh->prepare("INSERT INTO        accountlines
--- 302,305 ----
***************
*** 314,318 ****
       $sth->execute($bornum, $accountno, $amount, $desc, $type, $amountleft, 
$itemnum);
    } else {
-     $desc=$dbh->quote($desc);
      my $sth=$dbh->prepare("INSERT INTO        accountlines
                        (borrowernumber, accountno, date, amount, description, 
accounttype, amountoutstanding)
--- 309,312 ----

Index: Acquisition.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisition.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** Acquisition.pm      6 Jun 2005 23:29:36 -0000       1.12
--- Acquisition.pm      20 Jun 2005 14:10:00 -0000      1.13
***************
*** 105,109 ****
        my ($basketno,$supplier,$orderby)address@hidden;
        my $dbh = C4::Context->dbh;
!       my $query="Select *,biblio.title,aqorders.ordernumber from 
aqorders,biblio,biblioitems
        left join aqorderbreakdown on 
aqorderbreakdown.ordernumber=aqorders.ordernumber
        where basketno='$basketno'
--- 105,109 ----
        my ($basketno,$supplier,$orderby)address@hidden;
        my $dbh = C4::Context->dbh;
!       my $query="Select 
biblio.*,biblioitems.*,aqorders.*,aqorderbreakdown.*,biblio.title from 
aqorders,biblio,biblioitems
        left join aqorderbreakdown on 
aqorderbreakdown.ordernumber=aqorders.ordernumber
        where basketno='$basketno'
***************
*** 563,567 ****
        map { push(@searchterms,"$_%","% $_%") } @data;
        push(@searchterms,$search,$search,$biblio);
!       my $sth=$dbh->prepare("Select *,biblio.title from 
aqorders,biblioitems,biblio,aqbasket
                where aqorders.biblioitemnumber = biblioitems.biblioitemnumber 
and
                aqorders.basketno = aqbasket.basketno
--- 563,567 ----
        map { push(@searchterms,"$_%","% $_%") } @data;
        push(@searchterms,$search,$search,$biblio);
!       my $sth=$dbh->prepare("Select 
biblio.*,biblioitems.*,aqorders.*,aqbasket.*,biblio.title from 
aqorders,biblioitems,biblio,aqbasket
                where aqorders.biblioitemnumber = biblioitems.biblioitemnumber 
and
                aqorders.basketno = aqbasket.basketno
***************
*** 598,610 ****
  
  sub histsearch {
!       my ($title,$author,$name)address@hidden;
        my $dbh= C4::Context->dbh;
!       my $query = "select 
biblio.title,aqorders.basketno,name,aqbasket.creationdate,aqorders.datereceived,
 aqorders.quantity, aqorders.ecost
!                                                       from 
aqorders,aqbasket,aqbooksellers,biblio 
!                                                       where 
aqorders.basketno=aqbasket.basketno and aqbasket.booksellerid=aqbooksellers.id 
and
!                                                       
biblio.biblionumber=aqorders.biblionumber";
        $query .= " and biblio.title like ".$dbh->quote("%".$title."%") if 
$title;
        $query .= " and biblio.author like ".$dbh->quote("%".$author."%") if 
$author;
        $query .= " and name like ".$dbh->quote("%".$name."%") if $name;
        my $sth = $dbh->prepare($query);
        $sth->execute;
--- 598,612 ----
  
  sub histsearch {
!       my ($title,$author,$name,$from_placed_on,$to_placed_on)address@hidden;
        my $dbh= C4::Context->dbh;
!       my $query = "select 
biblio.title,aqorders.basketno,name,aqbasket.creationdate,aqorders.datereceived,
 aqorders.quantity, aqorders.ecost from aqorders,aqbasket,aqbooksellers,biblio 
! where aqorders.basketno=aqbasket.basketno and 
aqbasket.booksellerid=aqbooksellers.id and
! biblio.biblionumber=aqorders.biblionumber";
        $query .= " and biblio.title like ".$dbh->quote("%".$title."%") if 
$title;
        $query .= " and biblio.author like ".$dbh->quote("%".$author."%") if 
$author;
        $query .= " and name like ".$dbh->quote("%".$name."%") if $name;
+       $query .= " and creationdate >" .$dbh->quote($from_placed_on) if 
$from_placed_on;
+       $query .= " and creationdate<".$dbh->quote($to_placed_on) if 
$to_placed_on;
+       warn "C4:Acquisition : ".$query;
        my $sth = $dbh->prepare($query);
        $sth->execute;

Index: AuthoritiesMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/AuthoritiesMarc.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** AuthoritiesMarc.pm  7 Jun 2005 10:00:47 -0000       1.18
--- AuthoritiesMarc.pm  20 Jun 2005 14:10:00 -0000      1.19
***************
*** 667,671 ****
--- 667,673 ----
                        if (@$rtags[$i] <10) {
                                $prevvalue= @$rvalues[$i];
+                               undef $field;
                        } else {
+                               undef $prevvalue;
                                $field = MARC::Field->new( (sprintf 
"%03s",@$rtags[$i]), substr(address@hidden,0,1),substr(address@hidden,1,1), 
@$rsubfields[$i] => @$rvalues[$i]);
                        }
***************
*** 675,679 ****
                                address@hidden;
                        } else {
!                               if (@$rvalues[$i]) {
                                        $field->add_subfields(@$rsubfields[$i] 
=> @$rvalues[$i]);
                                }
--- 677,681 ----
                                address@hidden;
                        } else {
!                               if (length(@$rvalues[$i])>0) {
                                        $field->add_subfields(@$rsubfields[$i] 
=> @$rvalues[$i]);
                                }
***************
*** 683,688 ****
        }
        # the last has not been included inside the loop... do it now !
!       $record->add_fields($field);
! #     warn $record->as_formatted;
        return $record;
  }
--- 685,689 ----
        }
        # the last has not been included inside the loop... do it now !
!       $record->add_fields($field) if $field;
        return $record;
  }
***************
*** 922,925 ****
--- 923,929 ----
  # $Id$
  # $Log$
+ # Revision 1.19  2005/06/20 14:10:00  tipaul
+ # synch'ing 2.2 and head
+ #
  # Revision 1.18  2005/06/07 10:00:47  tipaul
  # adding $b to mainentry (in UNIMARC, for personal names, $a is the surname, 
$b is the firstname)

Index: Auth.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Auth.pm,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** Auth.pm     4 May 2005 15:40:01 -0000       1.38
--- Auth.pm     20 Jun 2005 14:10:00 -0000      1.39
***************
*** 400,404 ****
  
        my $self_url = $query->url(-absolute => 1);
!       $template->param(url => $self_url);
        $template->param(\%info);
        $cookie=$query->cookie(-name => 'sessionID',
--- 400,404 ----
  
        my $self_url = $query->url(-absolute => 1);
!       $template->param(url => $self_url, LibraryName=> => 
C4::Context->preference("LibraryName"),);
        $template->param(\%info);
        $cookie=$query->cookie(-name => 'sessionID',

Index: Auth_with_ldap.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Auth_with_ldap.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Auth_with_ldap.pm   4 May 2005 15:40:01 -0000       1.3
--- Auth_with_ldap.pm   20 Jun 2005 14:10:00 -0000      1.4
***************
*** 138,142 ****
                $template->param(USER_INFO => address@hidden,
                );
-               
                # We are going to use the $flags returned by checkauth
                # to create the template's parameters that will indicate
--- 138,141 ----
***************
*** 164,167 ****
--- 163,167 ----
                        $template->param(CAN_user_catalogue => 1); }
                
+ 
                if ($flags->{parameters} == 1) {
                        $template->param(CAN_user_parameters => 1);     
***************
*** 169,175 ****
--- 169,177 ----
                        $template->param(CAN_user_tools => 1); }
                
+ 
                if ($flags->{borrowers} == 1) {
                        $template->param(CAN_user_borrowers => 1); }
                
+ 
                if ($flags->{permissions} == 1) {
                        $template->param(CAN_user_permission => 1); }
***************
*** 178,190 ****
--- 180,196 ----
                        $template->param(CAN_user_reserveforothers => 1); }
                
+ 
                if ($flags->{borrow} == 1) {
                        $template->param(CAN_user_borrow => 1); }
                
+ 
                if ($flags->{reserveforself} == 1) {
                        $template->param(CAN_user_reserveforself => 1); }
                
+ 
                if ($flags->{editcatalogue} == 1) {
                        $template->param(CAN_user_editcatalogue => 1); }
                
+ 
                if ($flags->{updatecharges} == 1) {
                        $template->param(CAN_user_updatecharge => 1); }

Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.120
retrieving revision 1.121
diff -C2 -r1.120 -r1.121
*** Biblio.pm   15 Jun 2005 16:09:43 -0000      1.120
--- Biblio.pm   20 Jun 2005 14:10:00 -0000      1.121
***************
*** 59,62 ****
--- 59,63 ----
    &NEWmodbiblio &NEWmoditem
    &NEWdelbiblio &NEWdelitem
+   &NEWmodbiblioframework
  
    &MARCaddbiblio &MARCadditem
***************
*** 930,934 ****
              $row->{'author'},'' );
      }
!     my $sth2 =
        $dbh->prepare(" SELECT subject FROM bibliosubject WHERE 
biblionumber=?");
      $sth2->execute($biblionumber);
--- 931,935 ----
              $row->{'author'},'' );
      }
!     $sth2 =
        $dbh->prepare(" SELECT subject FROM bibliosubject WHERE 
biblionumber=?");
      $sth2->execute($biblionumber);
***************
*** 937,941 ****
              $row->{'subject'},'' );
      }
!     my $sth2 =
        $dbh->prepare(
          " SELECT subtitle FROM bibliosubtitle WHERE biblionumber=?");
--- 938,942 ----
              $row->{'subject'},'' );
      }
!     $sth2 =
        $dbh->prepare(
          " SELECT subtitle FROM bibliosubtitle WHERE biblionumber=?");
***************
*** 1044,1048 ****
--- 1045,1051 ----
                        if (@$rtags[$i] <10) {
                                $prevvalue= @$rvalues[$i];
+                               undef $field;
                        } else {
+                               undef $prevvalue;
                                $field = MARC::Field->new( (sprintf 
"%03s",@$rtags[$i]), substr(address@hidden,0,1),substr(address@hidden,1,1), 
@$rsubfields[$i] => @$rvalues[$i]);
  #                     warn "1=>"address@hidden@$rsubfields[$i]." = 
"address@hidden": ".$field->as_formatted;
***************
*** 1062,1066 ****
        }
        # the last has not been included inside the loop... do it now !
!       $record->add_fields($field);
  #     warn "HTML2MARC=".$record->as_formatted;
        return $record;
--- 1065,1069 ----
        }
        # the last has not been included inside the loop... do it now !
!       $record->add_fields($field) if $field;
  #     warn "HTML2MARC=".$record->as_formatted;
        return $record;
***************
*** 1101,1105 ****
        }
  # modify publicationyear to keep only the 1st year found
!       my $temp = $result->{'publicationyear'};
        $temp =~ m/c(\d\d\d\d)/; # search cYYYY first
        if ($1>0) {
--- 1104,1108 ----
        }
  # modify publicationyear to keep only the 1st year found
!       $temp = $result->{'publicationyear'};
        $temp =~ m/c(\d\d\d\d)/; # search cYYYY first
        if ($1>0) {
***************
*** 1275,1278 ****
--- 1278,1287 ----
  }
  
+ sub NEWmodbiblioframework {
+       my ($dbh,$bibid,$frameworkcode) address@hidden;
+       my $sth = $dbh->prepare("Update marc_biblio SET frameworkcode=? WHERE 
bibid=$bibid");
+       $sth->execute($frameworkcode);
+       return 1;
+ }
  sub NEWmodbiblio {
        my ($dbh,$record,$bibid,$frameworkcode) address@hidden;
***************
*** 1348,1352 ****
  
      # add itemnumber to MARC::Record before adding the item.
!     my $sth =
        $dbh->prepare(
  "select tagfield,tagsubfield from marc_subfield_structure where 
frameworkcode=? and kohafield=?"
--- 1357,1361 ----
  
      # add itemnumber to MARC::Record before adding the item.
!     $sth =
        $dbh->prepare(
  "select tagfield,tagsubfield from marc_subfield_structure where 
frameworkcode=? and kohafield=?"
***************
*** 1458,1462 ****
      $sth =
        $dbh->prepare(
! "insert into biblio set biblionumber  = ?, title = ?, author = ?, 
copyrightdate = ?, serial = ?, seriestitle = ?, notes = ?, abstract = ?"
      );
      $sth->execute(
--- 1467,1471 ----
      $sth =
        $dbh->prepare(
! "insert into biblio set biblionumber  = ?, title = ?, author = ?, 
copyrightdate = ?, serial = ?, seriestitle = ?, notes = ?, abstract = ?, 
unititle = ?"
      );
      $sth->execute(
***************
*** 1464,1468 ****
          $biblio->{'author'}, $biblio->{'copyrightdate'},
          $biblio->{'serial'},             $biblio->{'seriestitle'},
!         $biblio->{'notes'},  $biblio->{'abstract'}
      );
  
--- 1473,1478 ----
          $biblio->{'author'}, $biblio->{'copyrightdate'},
          $biblio->{'serial'},             $biblio->{'seriestitle'},
!         $biblio->{'notes'},  $biblio->{'abstract'},
!               $biblio->{'unititle'},
      );
  
***************
*** 2672,2675 ****
--- 2682,2688 ----
  # $Id$
  # $Log$
+ # Revision 1.121  2005/06/20 14:10:00  tipaul
+ # synch'ing 2.2 and head
+ #
  # Revision 1.120  2005/06/15 16:09:43  hdl
  # Displaying dashed isbn.

Index: Bull.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Bull.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** Bull.pm     17 Jun 2005 13:44:25 -0000      1.11
--- Bull.pm     20 Jun 2005 14:10:01 -0000      1.12
***************
*** 47,50 ****
--- 47,51 ----
  @EXPORT = qw(&newsubscription &modsubscription &delsubscription 
&getsubscriptions &getsubscription 
                        &getsubscriptionfrombiblionumber 
&get_subscription_list_from_biblionumber
+                       &get_full_subscription_list_from_biblionumber 
                        &modsubscriptionhistory &newissue
                        &getserials &serialchangestatus
***************
*** 101,104 ****
--- 102,106 ----
        return @issuelist;
  }
+ 
  sub newsubscription {
        my ($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
***************
*** 140,143 ****
--- 142,146 ----
        return $subscriptionid;
  }
+ 
  sub getsubscription {
        my ($subscriptionid) = @_;
***************
*** 167,171 ****
        my ($biblionumber) = @_;
        my $dbh = C4::Context->dbh;
!       my $sth = $dbh->prepare('select 
subscription.*,subscriptionhistory.*,aqbudget.bookfundid,aqbooksellers.name as 
aqbooksellername,biblio.title as bibliotitle 
                                                        from subscription 
                                                        left join 
subscriptionhistory on 
subscription.subscriptionid=subscriptionhistory.subscriptionid
--- 170,174 ----
        my ($biblionumber) = @_;
        my $dbh = C4::Context->dbh;
!       my $sth = $dbh->prepare('select subscription.*,subscriptionhistory.*,  
aqbudget.bookfundid,aqbooksellers.name as aqbooksellername,biblio.title as 
bibliotitle 
                                                        from subscription 
                                                        left join 
subscriptionhistory on 
subscription.subscriptionid=subscriptionhistory.subscriptionid
***************
*** 178,184 ****
--- 181,194 ----
        while (my $subs = $sth->fetchrow_hashref) {
                $subs->{startdate} = format_date($subs->{startdate});
+               $subs->{histstartdate} = format_date($subs->{histstartdate});
                $subs->{opacnote} =~ s/\n/\<br\/\>/g;
                $subs->{missinglist} =~ s/\n/\<br\/\>/g;
                $subs->{recievedlist} =~ s/\n/\<br\/\>/g;
+               $subs->{"periodicity".$subs->{periodicity}} = 1;
+               if ($subs->{enddate} eq '0000-00-00') {
+                       $subs->{enddate}='';
+               } else {
+                       $subs->{enddate} = format_date($subs->{enddate});
+               }
                push @res,$subs;
        }
***************
*** 186,189 ****
--- 196,263 ----
  }
  
+ sub get_full_subscription_list_from_biblionumber {
+       my ($biblionumber) = @_;
+       my $dbh = C4::Context->dbh;
+       my $sth = $dbh->prepare('select serial.serialseq, serial.planneddate, 
serial.status, year(serial.planneddate) as year,subscription.*, 
aqbudget.bookfundid,aqbooksellers.name as aqbooksellername,biblio.title as 
bibliotitle 
+                                                       from serial left join 
subscription on (serial.subscriptionid=subscription.subscriptionid and 
subscription.biblionumber=serial.biblionumber)
+                                                       left join aqbudget on 
subscription.aqbudgetid=aqbudget.aqbudgetid 
+                                                       left join aqbooksellers 
on subscription.aqbooksellerid=aqbooksellers.id 
+                                                       left join biblio on 
biblio.biblionumber=subscription.biblionumber 
+                                                       where 
subscription.biblionumber = ? order by year,serial.planneddate');
+       $sth->execute($biblionumber);
+       my @res;
+       my $year;
+       my $startdate;
+       my $aqbooksellername;
+       my $bibliotitle;
+       my @loopissues;
+       my $first;
+       while (my $subs = $sth->fetchrow_hashref) {
+ #             my $sth2 = $dbh->prepare('select * from serial where 
serial.biblionumber = ? and serial.subscriptionid=? order by 
serial.planneddate');
+ #             $sth2->execute($biblionumber,$subs->{'subscriptionid'});
+ #             while (my $issues = $sth2->fetchrow_hashref){
+ #                             warn "planneddate ".$issues->{'planneddate'};
+ #                             warn "serialseq".$issues->{'serialseq'};
+ #             }
+               if ($year and ($year==$subs->{year})){
+                       if ($first eq 1){$first=0;}
+                       my $temp=$res[scalar(@res)-1]->{'serials'};
+                       push @$temp,
+                               {'planneddate' => 
format_date($subs->{'planneddate'}), 
+                               'serialseq' => $subs->{'serialseq'},
+                               'status1' => $subs->{'status'}==1,
+                               'status2' => $subs->{'status'}==2,
+                               'status3' => $subs->{'status'}==3,
+                               'status4' => $subs->{'status'}==4,
+                               };
+               }else {
+                       $first=1 if (not $year);
+                       $year= $subs->{'year'};
+                       $startdate= format_date($subs->{'startdate'});
+                       $aqbooksellername= $subs->{'aqbooksellername'};
+                       $bibliotitle= $subs->{'bibliotitle'};
+                       my @temp;
+                       push @temp,
+                               {'planneddate' => 
format_date($subs->{'planneddate'}), 
+                               'serialseq' => $subs->{'serialseq'},
+                               'status1' => $subs->{'status'}==1,
+                               'status2' => $subs->{'status'}==2,
+                               'status3' => $subs->{'status'}==3,
+                               'status4' => $subs->{'status'}==4,
+                               };
+                       
+                       push @res,{
+                               'year'=>$year,
+                               'startdate'=>$startdate,
+                               'aqbooksellername'=>$aqbooksellername,
+                               'bibliotitle'=>$bibliotitle,
+                               'serials'=>address@hidden,
+                               'first'=>$first 
+                       };
+               }
+       }
+       return address@hidden;
+ }
+ 
  
  sub modsubscription {
***************
*** 301,323 ****
                push @serials,$line;
        }
!       return address@hidden;
! }
! 
! sub serialdelete {
!       my ($serialid,$serialseq)address@hidden;
!       my $dbh = C4::Context->dbh;
!       my $sth = $dbh->prepare("select subscriptionid,status from serial where 
serialid=?");
!       $sth->execute($serialid);
!       my ($subscriptionid,$oldstatus) = $sth->fetchrow;
!       # change status & update subscriptionhistory
!       my $sth = $dbh->prepare("delete * from serial  where serialid = ?");
!       $sth->execute($serialid);
!       $sth = $dbh->prepare("select missinglist,recievedlist from 
subscriptionhistory where subscriptionid=?");
        $sth->execute($subscriptionid);
!       my ($missinglist,$recievedlist) = $sth->fetchrow;
!       $recievedlist =~ s/",$serialseq"//;
!       $missinglist =~ s/",$serialseq"//;
!       $sth=$dbh->prepare("update subscriptionhistory set recievedlist=?, 
missinglist=? where subscriptionid=?");
!       $sth->execute($recievedlist,$missinglist,$subscriptionid);
  }
  
--- 375,382 ----
                push @serials,$line;
        }
!       $sth=$dbh->prepare("select count(*) from serial where 
subscriptionid=?");
        $sth->execute($subscriptionid);
!       my ($totalissues) = $sth->fetchrow;
!       return ($totalissues,@serials);
  }
  
***************
*** 370,380 ****
        my $sth = $dbh->prepare("insert into serial 
(serialseq,subscriptionid,biblionumber,status, planneddate) values 
(?,?,?,?,?)");
        $sth->execute($serialseq,$subscriptionid,$biblionumber,$status, 
$planneddate);
! }
! 
! sub delissue {
!       my ($serialseq,$subscriptionid) = @_;
!       my $dbh = C4::Context->dbh;
!       my $sth = $dbh->prepare("delete from serial where serialseq= ? and 
subscriptionid= ? ");
!       $sth->execute($serialseq,$subscriptionid);
  }
  
--- 429,443 ----
        my $sth = $dbh->prepare("insert into serial 
(serialseq,subscriptionid,biblionumber,status, planneddate) values 
(?,?,?,?,?)");
        $sth->execute($serialseq,$subscriptionid,$biblionumber,$status, 
$planneddate);
!       $sth = $dbh->prepare("select missinglist,recievedlist from 
subscriptionhistory where subscriptionid=?");
!       $sth->execute($subscriptionid);
!       my ($missinglist,$recievedlist) = $sth->fetchrow;
!       if ($status eq 2) {
!               $recievedlist .= ",$serialseq";
!       }
!       if ($status eq 4) {
!               $missinglist .= ",$serialseq";
!       }
!       $sth=$dbh->prepare("update subscriptionhistory set recievedlist=?, 
missinglist=? where subscriptionid=?");
!       $sth->execute($recievedlist,$missinglist,$subscriptionid);
  }
  


Index: Members.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Members.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** Members.pm  4 May 2005 15:40:01 -0000       1.7
--- Members.pm  20 Jun 2005 14:10:01 -0000      1.8
***************
*** 100,104 ****
        my $dbh = C4::Context->dbh;
        $data{'dateofbirth'}=format_date_in_iso($data{'dateofbirth'});
-       $data{'joining'}=format_date_in_iso($data{'joining'});
        $data{'expiry'}=format_date_in_iso($data{'expiry'});
        my $query="update borrowers set 
title='$data{'title'}',expiry='$data{'expiry'}',
--- 100,103 ----
***************
*** 106,110 ****
        
streetaddress='$data{'streetaddress'}',faxnumber='$data{'faxnumber'}',firstname='$data{'firstname'}',
        
altnotes='$data{'altnotes'}',dateofbirth='$data{'dateofbirth'}',contactname='$data{'contactname'}',
!       
emailaddress='$data{'emailaddress'}',dateenrolled='$data{'joining'}',streetcity='$data{'streetcity'}',
        
altrelationship='$data{'altrelationship'}',othernames='$data{'othernames'}',phoneday='$data{'phoneday'}',
        
categorycode='$data{'categorycode'}',city='$data{'city'}',area='$data{'area'}',phone='$data{'phone'}',
--- 105,109 ----
        
streetaddress='$data{'streetaddress'}',faxnumber='$data{'faxnumber'}',firstname='$data{'firstname'}',
        
altnotes='$data{'altnotes'}',dateofbirth='$data{'dateofbirth'}',contactname='$data{'contactname'}',
!       emailaddress='$data{'emailaddress'}',streetcity='$data{'streetcity'}',
        
altrelationship='$data{'altrelationship'}',othernames='$data{'othernames'}',phoneday='$data{'phoneday'}',
        
categorycode='$data{'categorycode'}',city='$data{'city'}',area='$data{'area'}',phone='$data{'phone'}',
***************
*** 131,135 ****
--- 130,143 ----
        my $dbh = C4::Context->dbh;
        $data{'dateofbirth'}=format_date_in_iso($data{'dateofbirth'});
+       $data{'joining'} = &ParseDate("today") unless $data{'joining'};
        $data{'joining'}=format_date_in_iso($data{'joining'});
+       # if expirydate is not set, calculate it from borrower category 
subscription duration
+       unless ($data{'expiry'}) {
+               my $sth = $dbh->prepare("select enrolmentperiod from categories 
where categorycode=?");
+               $sth->execute($data{'categorycode'});
+               my ($enrolmentperiod) = $sth->fetchrow;
+               $enrolmentperiod = 12 unless ($enrolmentperiod);
+               $data{'expiry'} = &DateCalc($data{'joining'},"$enrolmentperiod 
years");
+       }
        $data{'expiry'}=format_date_in_iso($data{'expiry'});
  #     $data{'borrowernumber'}=NewBorrowerNumber();

Index: Output.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Output.pm,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** Output.pm   3 Jan 2005 10:58:46 -0000       1.51
--- Output.pm   20 Jun 2005 14:10:01 -0000      1.52
***************
*** 84,87 ****
--- 84,88 ----
                                                        theme => $theme,
                                                        opacstylesheet => 
$opacstylesheet,
+                                                       opacsmallimage => 
C4::Context->preference('opacsmallimage'),
                                                        lang => $lang);
  

Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -r1.45 -r1.46
*** SearchMarc.pm       15 Jun 2005 13:21:22 -0000      1.45
--- SearchMarc.pm       20 Jun 2005 14:10:01 -0000      1.46
***************
*** 340,344 ****
        # HINT : biblionumber as bn is important. The hash is fills 
biblionumber with items.biblionumber.
        # so if you dont' has an item, you get a not nice empty value.
!       $sth = $dbh->prepare("SELECT biblio.biblionumber as bn,biblio.*, 
biblioitems.*,marc_biblio.bibid,itemtypes.notforloan,itemtypes.description
                                                        FROM biblio, 
marc_biblio 
                                                        LEFT JOIN biblioitems 
on biblio.biblionumber = biblioitems.biblionumber
--- 340,344 ----
        # HINT : biblionumber as bn is important. The hash is fills 
biblionumber with items.biblionumber.
        # so if you dont' has an item, you get a not nice empty value.
!       $sth = $dbh->prepare("SELECT biblio.biblionumber as 
bn,biblioitems.*,biblio.*, 
marc_biblio.bibid,itemtypes.notforloan,itemtypes.description
                                                        FROM biblio, 
marc_biblio 
                                                        LEFT JOIN biblioitems 
on biblio.biblionumber = biblioitems.biblionumber
***************
*** 351,355 ****
        my $oldline;
        my ($oldbibid, $oldauthor, $oldtitle);
!       my $sth_itemCN = $dbh->prepare("select items.* from items where 
biblionumber=?");
        my $sth_issue = $dbh->prepare("select date_due,returndate from issues 
where itemnumber=?");
        # parse all biblios between start & end.
--- 351,360 ----
        my $oldline;
        my ($oldbibid, $oldauthor, $oldtitle);
!       my $sth_itemCN;
!       if (C4::Context->preference('hidelostitem')) {
!               $sth_itemCN = $dbh->prepare("select items.* from items where 
biblionumber=? and (itemlost = 0 or itemlost is NULL)");
!       } else {
!               $sth_itemCN = $dbh->prepare("select items.* from items where 
biblionumber=?");
!       }
        my $sth_issue = $dbh->prepare("select date_due,returndate from issues 
where itemnumber=?");
        # parse all biblios between start & end.




reply via email to

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