koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/acqui acquire.pl,1.10,1.11 finishreceive.pl,1.11,1.


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/acqui acquire.pl,1.10,1.11 finishreceive.pl,1.11,1.12 receive.pl,1.7,1.8
Date: Mon, 03 Mar 2003 09:35:39 -0800

Update of /cvsroot/koha/koha/acqui
In directory sc8-pr-cvs1:/tmp/cvs-serv14855/acqui

Modified Files:
        acquire.pl finishreceive.pl receive.pl 
Log Message:
bugfixes. seems to work better.
NOTES to 1.2 managers : the 1.2 seems to have problems too : 
* when finishrecieve is called, the booksellerid is lost, and you arrive to the 
"recieve.pl" again, it's with the 1st bookseller from the DB.
* under certain circunstances, the invoice # is lost, and ALL lines from the 
bookseller are shown. this strange behaviour is fixed too in this commit


Index: acquire.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/acquire.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** acquire.pl  27 Feb 2003 16:54:10 -0000      1.10
--- acquire.pl  3 Mar 2003 17:35:29 -0000       1.11
***************
*** 47,51 ****
  my $catview=$input->param('catview');
  my $gst=$input->param('gst');
! my ($count,@results)=ordersearch($search,$biblio,$catview);
  my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'});
  my @date=split('-',$results[0]->{'entrydate'});
--- 47,51 ----
  my $catview=$input->param('catview');
  my $gst=$input->param('gst');
! my ($count,@results)=ordersearch($search,$id,$biblio,$catview);
  my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'});
  my @date=split('-',$results[0]->{'entrydate'});
***************
*** 166,169 ****
--- 166,172 ----
                my %line;
                $line{isbn} = $results[$i]->{'isbn'};
+               $line{basketno} = $results[$i]->{'basketno'};
+               $line{quantity} = $results[$i]->{'quantity'};
+               $line{quantityrecieved} = $results[$i]->{'quantityreceived'};
                $line{ordernumber} = $results[$i]->{'ordernumber'};
                $line{biblionumber} = $results[$i]->{'biblionumber'};
***************
*** 173,179 ****
                $line{title} = $results[$i]->{'title'};
                $line{author} = $results[$i]->{'author'};
                push @loop,\%line;
        }
!       $template->param( loop => address@hidden);
  
  }
--- 176,189 ----
                $line{title} = $results[$i]->{'title'};
                $line{author} = $results[$i]->{'author'};
+               $line{id} = $id;
                push @loop,\%line;
        }
!       $template->param( loop => address@hidden,
!                                               user => $loggedinuser,
!                                               date => $date,
!                                               name => 
$booksellers[0]->{'name'},
!                                               id => $id,
!                                               invoice => $invoice,
! );
  
  }

Index: finishreceive.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/finishreceive.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** finishreceive.pl    27 Feb 2003 16:54:10 -0000      1.11
--- finishreceive.pl    3 Mar 2003 17:35:33 -0000       1.12
***************
*** 54,59 ****
  my $itemtype=$input->param('format');
  my $isbn=$input->param('ISBN');
- my $bookseller = $input->param('bookseller');
- my $id         = $bookseller;
  my $biblio = {
        biblionumber  => $biblionumber,
--- 54,57 ----
***************
*** 71,74 ****
--- 69,73 ----
  my $freight=$input->param('freight');
  my $volinf=$input->param('volinf');
+ my $id = $input->param('id');
  my $loan=0;
  if ($itemtype =~ /REF/){
***************
*** 85,90 ****
                classification => $class?$class:"" });
  }
- warn "qty : $quantity";
  if ($quantity != 0){
        
receiveorder($biblionumber,$ordnum,$quantrec,$user,$cost,$invoiceno,$bibitemno,$freight,$bookfund);
        modbiblio($biblio);
--- 84,89 ----
                classification => $class?$class:"" });
  }
  if ($quantity != 0){
+       warn "receive : 
$biblionumber,$ordnum,$quantrec,$user,$cost,$invoiceno,$bibitemno,$freight,$bookfund";
        
receiveorder($biblionumber,$ordnum,$quantrec,$user,$cost,$invoiceno,$bibitemno,$freight,$bookfund);
        modbiblio($biblio);
***************
*** 117,130 ****
                                        replacementprice => $replacement,
                                        price            => $cost,
!                                       booksellerid     => $bookseller,
                                        homebranch       => $branch,
                                        loan             => $loan },
                                @barcodes);
        if ($error eq ''){
!       if ($itemtype ne 'PER'){
!               print 
$input->redirect("/cgi-bin/koha/acqui/receive.pl?invoice=$invoiceno&id=$id&freight=$freight&gst=$gst");
!       } else {
!               print $input->redirect("/acquisitions/");
!       }
        } else {
                print $input->header;
--- 116,129 ----
                                        replacementprice => $replacement,
                                        price            => $cost,
!                                       booksellerid     => $id,
                                        homebranch       => $branch,
                                        loan             => $loan },
                                @barcodes);
        if ($error eq ''){
!               if ($itemtype ne 'PER'){
!                       print 
$input->redirect("/cgi-bin/koha/acqui/receive.pl?invoice=$invoiceno&id=$id&freight=$freight&gst=$gst");
!               } else {
!                       print $input->redirect("/acquisitions/");
!               }
        } else {
                print $input->header;

Index: receive.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/receive.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** receive.pl  13 Feb 2003 17:27:51 -0000      1.7
--- receive.pl  3 Mar 2003 17:35:34 -0000       1.8
***************
*** 41,45 ****
  my $freight=$input->param('freight');
  my $gst=$input->param('gst');
- my $user=$input->remote_user;
  my $date=localtime(time);
  
--- 41,44 ----
***************
*** 66,70 ****
  my @loop_orders = ();
  for (my$i=0;$i<$count;$i++){
-       warn "nb : ".$results[$i]->{'ordernumber'};
        $total=($results[$i]->{'unitprice'} + $results[$i]->{'freight'}) * 
$results[$i]->{'quantityreceived'};
        $results[$i]->{'unitprice'}+=0;
--- 65,68 ----
***************
*** 99,105 ****
  
  $template->param(invoice => $invoice,
!                                               user => $user,
                                                date => $date,
                                                name => 
$booksellers[0]->{'name'},
                                                gst => $gst,
                                                freight => $freight,
--- 97,104 ----
  
  $template->param(invoice => $invoice,
!                                               user => $loggedinuser,
                                                date => $date,
                                                name => 
$booksellers[0]->{'name'},
+                                               id => $id,
                                                gst => $gst,
                                                freight => $freight,




reply via email to

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