* updates to make acquisition compatible with suggestions & serials
authortipaul <tipaul>
Thu, 12 Aug 2004 14:35:22 +0000 (14:35 +0000)
committertipaul <tipaul>
Thu, 12 Aug 2004 14:35:22 +0000 (14:35 +0000)
* changes to use supplierid instead of id, that's easier to read.

17 files changed:
acqui/acquire.pl
acqui/addorder.pl
acqui/basket.pl
acqui/finishreceive.pl
acqui/newbasket2.pl
acqui/newbiblio.pl
acqui/order.pl
acqui/receive.pl
acqui/recieveorder.pl
acqui/suggestion-select.pl
acqui/supplier.pl
koha-tmpl/intranet-tmpl/default/en/acqui/acquire.tmpl
koha-tmpl/intranet-tmpl/default/en/acqui/newbasket2.tmpl
koha-tmpl/intranet-tmpl/default/en/acqui/order.tmpl
koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl
koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl
koha-tmpl/intranet-tmpl/default/en/acqui/suggestion-select.tmpl

index 98d6932..2b8b49d 100755 (executable)
@@ -36,7 +36,7 @@ use HTML::Template;
 use C4::Date;
 
 my $input=new CGI;
-my $id=$input->param('id');
+my $supplierid=$input->param('supplierid');
 my $dbh = C4::Context->dbh;
 
 my $search=$input->param('recieve');
@@ -45,7 +45,8 @@ my $freight=$input->param('freight');
 my $biblio=$input->param('biblio');
 my $catview=$input->param('catview');
 my $gst=$input->param('gst');
-my ($count,@results)=ordersearch($search,$id,$biblio,$catview);
+my ($count,@results)=ordersearch($search,$supplierid,$biblio,$catview);
+warn "C:$count for ordersearch($search,$supplierid,$biblio,$catview);";
 my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'});
 my $date = $results[0]->{'entrydate'};
 
@@ -60,24 +61,25 @@ my ($template, $loggedinuser, $cookie)
 
 $template->param($count);
 if ($count == 1){
-       my $sth=$dbh->prepare("Select itemtype,description from itemtypes order by description");
-       $sth->execute;
-       my  @itemtype;
-       my %itemtypes;
-       push @itemtype, "";
-       $itemtypes{''} = "Please choose";
-       while (my ($value,$lib) = $sth->fetchrow_array) {
-               push @itemtype, $value;
-               $itemtypes{$value}=$lib;
-       }
-
-       my $CGIitemtype=CGI::scrolling_list( -name     => 'format',
-                               -values   => \@itemtype,
-                               -default  => $results[0]->{'itemtype'},
-                               -labels   => \%itemtypes,
-                               -size     => 1,
-                               -multiple => 0 );
-       $sth->finish;
+       my $sth;
+#      my $sth=$dbh->prepare("Select itemtype,description from itemtypes order by description");
+#      $sth->execute;
+#      my  @itemtype;
+#      my %itemtypes;
+#      push @itemtype, "";
+#      $itemtypes{''} = "Please choose";
+#      while (my ($value,$lib) = $sth->fetchrow_array) {
+#              push @itemtype, $value;
+#              $itemtypes{$value}=$lib;
+#      }
+# 
+#      my $CGIitemtype=CGI::scrolling_list( -name     => 'format',
+#                              -values   => \@itemtype,
+#                              -default  => $results[0]->{'itemtype'},
+#                              -labels   => \%itemtypes,
+#                              -size     => 1,
+#                              -multiple => 0 );
+#      $sth->finish;
 
        my @branches;
        my @select_branch;
@@ -93,7 +95,6 @@ if ($count == 1){
                                -labels   => \%select_branches,
                                -size     => 1,
                                -multiple => 0 );
-       $sth->finish;
 
        my $auto_barcode = C4::Context->boolean_preference("autoBarcode") || 0;
                # See whether barcodes should be automatically allocated.
@@ -107,22 +108,21 @@ if ($count == 1){
                $sth->finish;
        }
 
-       my @bookfund;
-       my @select_bookfund;
-       my %select_bookfunds;
-       ($count2,@bookfund)=bookfunds();
-       for (my $i=0;$i<$count2;$i++){
-               push @select_bookfund, $bookfund[$i]->{'bookfundid'};
-               $select_bookfunds{$bookfund[$i]->{'bookfundid'}} = $bookfund[$i]->{'bookfundname'}
-       }
-       my $CGIbookfund=CGI::scrolling_list( -name     => 'bookfund',
-                               -values   => \@select_bookfund,
-                               -default  => $results[0]->{'bookfundid'},
-                               -labels   => \%select_bookfunds,
-                               -size     => 1,
-                               -multiple => 0 );
+#      my @bookfund;
+#      my @select_bookfund;
+#      my %select_bookfunds;
+#      ($count2,@bookfund)=bookfunds();
+#      for (my $i=0;$i<$count2;$i++){
+#              push @select_bookfund, $bookfund[$i]->{'bookfundid'};
+#              $select_bookfunds{$bookfund[$i]->{'bookfundid'}} = $bookfund[$i]->{'bookfundname'}
+#      }
+#      my $CGIbookfund=CGI::scrolling_list( -name     => 'bookfund',
+#                              -values   => \@select_bookfund,
+#                              -default  => $results[0]->{'bookfundid'},
+#                              -labels   => \%select_bookfunds,
+#                              -size     => 1,
+#                              -multiple => 0 );
 
-       my $rrp=$results[0]->{'rrp'};
        if ($results[0]->{'quantityreceived'} == 0){
        $results[0]->{'quantityreceived'}='';
        }
@@ -134,7 +134,7 @@ if ($count == 1){
                biblionumber => $results[0]->{'biblionumber'},
                ordernumber => $results[0]->{'ordernumber'},
                biblioitemnumber => $results[0]->{'biblioitemnumber'},
-               booksellerid => $results[0]->{'booksellerid'},
+               supplierid => $results[0]->{'booksellerid'},
                freight => $freight,
                gst => $gst,
                catview => ($catview ne 'yes'?1:0),
@@ -143,15 +143,15 @@ if ($count == 1){
                title => $results[0]->{'title'},
                author => $results[0]->{'author'},
                copyrightdate => format_date($results[0]->{'copyrightdate'}),
-               CGIitemtype => $CGIitemtype,
+               itemtype => $results[0]->{'itemtype'},
                CGIbranch => $CGIbranch,
                isbn => $results[0]->{'isbn'},
                seriestitle => $results[0]->{'seriestitle'},
                barcode => $barcode,
-               CGIbookfund => $CGIbookfund,
+               bookfund => $results[0]->{'bookfundid'},
                quantity => $results[0]->{'quantity'},
                quantityreceived => $results[0]->{'quantityreceived'},
-               rrp => $rrp,
+               rrp => $results[0]->{'rrp'},
                ecost => $results[0]->{'ecost'},
                unitprice => $results[0]->{'unitprice'},
                invoice => $invoice,
@@ -172,13 +172,13 @@ if ($count == 1){
                $line{gst} = $gst;
                $line{title} = $results[$i]->{'title'};
                $line{author} = $results[$i]->{'author'};
-               $line{id} = $id;
+               $line{supplierid} = $supplierid;
                push @loop,\%line;
        }
        $template->param( loop => \@loop,
                                                date => format_date($date),
                                                name => $booksellers[0]->{'name'},
-                                               id => $id,
+                                               supplierid => $supplierid,
                                                invoice => $invoice,
 );
 
index e7a9401..58c6963 100755 (executable)
@@ -107,18 +107,18 @@ if ($quantity ne '0'){
        } else {
                $bibnum=$input->param('biblio');
                $bibitemnum=$input->param('bibitemnum');
-               my $oldtype=$input->param('oldtype');
-               &modbibitem({biblioitemnumber => $bibitemnum,
-                                               isbn            => $isbn,
-                                               publishercode   => $publishercode,
-               });
-               &modbiblio({
-                       biblionumber  => $bibnum,
-                       title         => $title?$title:"",
-                       author        => $author?$author:"",
-                       copyrightdate => $copyrightdate?$copyrightdate:"",
-                       series        => $series?$series:"" },
-                       );
+#              my $oldtype=$input->param('oldtype');
+#              &modbibitem({biblioitemnumber => $bibitemnum,
+#                                              isbn            => $isbn,
+#                                              publishercode   => $publishercode,
+#              });
+#              &modbiblio({
+#                      biblionumber  => $bibnum,
+#                      title         => $title?$title:"",
+#                      author        => $author?$author:"",
+#                      copyrightdate => $copyrightdate?$copyrightdate:"",
+#                      series        => $series?$series:"" },
+#                      );
        }
        if ($ordnum) {
                modorder($title,$ordnum,$quantity,$listprice,$bibnum,$basketno,$booksellerid,$loggedinuser,$notes,$bookfund,$bibitemnum,$rrp,$ecost,$gst,$budget,$cost,$sub,$invoice,$sort1,$sort2);
index 9d41fa8..8bff880 100755 (executable)
@@ -26,7 +26,6 @@
 use strict;
 use C4::Auth;
 use C4::Koha;
-# use C4::Biblio;
 use C4::Output;
 use CGI;
 use C4::Interface::CGI::Output;
@@ -37,7 +36,7 @@ use C4::Date;
 
 my $query =new CGI;
 my $basketno = $query ->param('basket');
-my $supplierid = $query->param('id');
+my $booksellerid = $query->param('supplierid');
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "acqui/basket.tmpl",
                             query => $query,
@@ -48,9 +47,13 @@ my ($template, $loggedinuser, $cookie)
                             });
 my ($count,@results);
 
-my ($count2,@booksellers)=bookseller($supplierid);
-
 my $basket = getbasket($basketno);
+# FIXME : the query->param('supplierid') below is probably useless. The bookseller is always known from the basket
+# if no booksellerid in parameter, get it from basket
+warn "=>".$basket->{booksellerid};
+$booksellerid = $basket->{booksellerid} unless $booksellerid;
+my ($count2,@booksellers)=bookseller($booksellerid);
+
 # if new basket, pre-fill infos
 $basket->{creationdate} = "" unless ($basket->{creationdate});
 $basket->{authorisedby} = $loggedinuser unless ($basket->{authorisedby});
index dd351a3..11cccb7 100755 (executable)
@@ -21,6 +21,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
+use strict;
 use C4::Output;
 use C4::Acquisition;
 use C4::Biblio;
@@ -31,104 +32,37 @@ my $input=new CGI;
 
 my $user=$input->remote_user;
 my $biblionumber = $input->param('biblio');
+my $bibitemno=$input->param('biblioitemnum');
 my $ordnum=$input->param('ordnum');
 my $quantrec=$input->param('quantityrec');
 my $quantity=$input->param('quantity');
-my $notes=$input->param('notes');
 my $cost=$input->param('cost');
 my $invoiceno=$input->param('invoice');
-my $bibitemno=$input->param('biblioitemnum');
-my $data=bibitemdata($bibitemno);
-my $publisher=$data->{'publishercode'};
-my $pubdate=$data->{'publicationdate'};
-my $class=$data->{'classification'};
-my $dewey=$data->{'dewey'};
-my $subclass=$data->{'subclass'};
-
-my $size=$data->{'size'};
-my $illus=$data->{'illus'};
-my $pages=$data->{'pages'};
 my $replacement=$input->param('rrp');
+my $gst=$input->param('gst');
+my $freight=$input->param('freight');
+my $supplierid = $input->param('supplierid');
 my $branch=$input->param('branch');
-my $bookfund=$input->param('bookfund');
-my $itemtype=$input->param('format');
-my $isbn=$input->param('ISBN');
-my $biblio = {
-       biblionumber  => $biblionumber,
-       title         => $input->param('title')?$input->param('title'):"",
-       author        => $input->param('author')?$input->param('author'):"",
-       copyrightdate => $input->param('copyright')?$input->param('copyright'):"",
-       series        => $input->param('Series')?$input->param('Series'):""
-}; # my $biblio
 
 if ($quantrec != 0){
        $cost /= $quantrec;
 }
 
-my $gst=$input->param('gst');
-my $freight=$input->param('freight');
-my $volinf=$input->param('volinf');
-my $id = $input->param('id');
-my $loan=0;
-if ($itemtype =~ /REF/){
-       $loan=1;
-}
-
-if ($itemtype =~ /PER/){
-       $class="Periodical";
-       $bibitemno = &newbiblioitem({
-               biblionumber   => $biblionumber,
-               itemtype       => $itemtype?$itemtype:"",
-               isbn           => $isbn?$isbn:"",
-               volumeddesc    => $volinf?$volinf:"",
-               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);
-       &modbibitem({
-               biblioitemnumber => $bibitemno,
-               biblionumber     => $biblionumber,
-               itemtype         => $itemtype?$itemtype:"",
-               isbn             => $isbn?$isbn:"",
-               publisher        => $publisher?$publisher:"",
-               publicationyear  => $pubdate?$pubdate:"",
-               class            => $class?$class:"",
-               dewey            => $dewey?$dewey:"",
-               subclass         => $subclass?$subclass:"",
-               illus            => $illus?$illus:"",
-               pages            => $pages?$pages:"",
-               volumeddesc      => $volinf?$volinf:"",
-               notes            => $notes?$notes:"",
-               size             => $size?$size:"" });
+if ($quantity != 0) {
+       # save the quantity recieved.
+       receiveorder($biblionumber,$ordnum,$quantrec,$user,$cost,$invoiceno,$freight,$replacement);
+       # create items if the user has entered barcodes
        my $barcode=$input->param('barcode');
-       my @barcodes;
-#      if ($barcode =~ /\,/){
-               @barcodes=split(/\,| |\|/,$barcode);
-#      }elsif ($barcode =~ /\|/){
-#              @barcodes=split(/\|/,$barcode);
-#      } else {
-#              $barcodes[0]=$barcode;
-#      }
+       my @barcodes=split(/\,| |\|/,$barcode);
        my ($error) = newitems({ biblioitemnumber => $bibitemno,
                                        biblionumber     => $biblionumber,
                                        replacementprice => $replacement,
                                        price            => $cost,
-                                       booksellerid     => $id,
+                                       booksellerid     => $supplierid,
                                        homebranch       => $branch,
-                                       loan             => $loan },
+                                       loan             => 0 },
                                @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;
-               print $error;
-       }
+       print $input->redirect("/cgi-bin/koha/acqui/receive.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst");
 } else {
        print $input->header;
        delorder($biblionumber,$ordnum);
index 19aaea0..981bad2 100755 (executable)
@@ -61,15 +61,11 @@ my $num=$input->param('num');
 if ($num eq ''){
   $num=10;
 }
-my $id=$input->param('id');
+my $booksellerid=$input->param('booksellerid');
 my $basket=$input->param('basket');
 my $sub=$input->param('sub');
-my $donation;
-if ($id == 72){
-  $donation='yes';
-}
 #print $sub;
-my ($count,@booksellers)=bookseller($id);
+my ($count,@booksellers)=bookseller($booksellerid);
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "acqui/newbasket2.tmpl",
                             query => $input,
@@ -83,7 +79,6 @@ my ($template, $loggedinuser, $cookie)
 #print startpage();
 #print startmenu('acquisitions');
 
-my $testdonation = ($donation ne 'yes'); #tests if donation = true
 if ($keyword ne ''){
        ($count,@results)=KeywordSearch(undef,'intra',\%search,$num,$offset);
 } elsif ($search{'front'} ne '') {
@@ -221,7 +216,7 @@ while ($i < $count2){
        $lineres{author2}=$author2;
        $lineres{title2}=$title2;
        $lineres{copyright}=$result->{'copyrightdate'};
-       $lineres{id}=$id;
+       $lineres{booksellerid}=$booksellerid;
        $lineres{basket}=$basket;
        $lineres{sub}=$sub;
        $lineres{biblionumber}=$result->{biblionumber};
@@ -237,10 +232,9 @@ while ($i < $count2){
 
 $offset=$num+$offset;
 $template->param(      bookselname => $booksellers[0]->{'name'},
-                                                               id => $id,
+                                                               booksellerid => $booksellerid,
                                                                basket => $basket,
                                                                parsub => $sub,
-                                                               testdonation => $testdonation,
                                                                count => $count,
                                                                offset2 =>$offset2,
                                                                dispnum => $dispnum,
@@ -248,7 +242,6 @@ $template->param(   bookselname => $booksellers[0]->{'name'},
                                                                num => $num,
                                                                offset => $offset,
                                                                type =>  $type,
-                                                               id => $id,
                                                                basket => $basket,
                                                                title => $title,
                                                                author => $author,
index 757c451..c836b9e 100755 (executable)
@@ -49,11 +49,17 @@ my $dbh = C4::Context->dbh;
 if ($ordnum eq ''){ # create order
        $new='yes';
 #      $ordnum=newordernum;
-       if ($biblio) {
+       if ($biblio && !$suggestionid) {
                        $data=bibdata($biblio);
        }
-       if ($suggestionid) { # get suggestion fields if applicable.
-               $data = getsuggestion($suggestionid);
+       # get suggestion fields if applicable. If it's a subscription renewal, then the biblio already exists
+       # otherwise, retrieve suggestion information.
+       if ($suggestionid) {
+               if ($biblio) {
+                       $data=bibdata($biblio);
+               } else {
+                       $data = getsuggestion($suggestionid);
+               }
        }
        if ($data->{'title'} eq ''){
                $data->{'title'}=$title;
index 7d8acf8..5931c62 100755 (executable)
@@ -54,7 +54,7 @@ if ($op eq 'close') {
        closebasket($basket);
 }
 
-#build reult page
+#build result page
 my $toggle=0;
 my @loop_suppliers;
 for (my $i=0; $i<$count; $i++) {
index 16e2fd1..50ab147 100755 (executable)
@@ -34,8 +34,8 @@ use HTML::Template;
 use strict;
 
 my $input=new CGI;
-my $id=$input->param('id');
-my ($count,@booksellers)=bookseller($id);
+my $supplierid=$input->param('supplierid');
+my ($count,@booksellers)=bookseller($supplierid);
 my $invoice=$input->param('invoice');
 my $freight=$input->param('freight');
 my $gst=$input->param('gst');
@@ -53,7 +53,7 @@ my ($template, $loggedinuser, $cookie)
 my @results;
 ($count,@results)=invoice($invoice);
 if ($invoice eq ''){
-       ($count,@results)=getallorders($id);
+       ($count,@results)=getallorders($supplierid);
 }
 my $totalprice=0;
 my $totalfreight=0;
@@ -84,7 +84,7 @@ for (my$i=0;$i<$count;$i++){
        $line{unitprice} = $results[$i]->{'unitprice'};
        $line{quantityrecieved} = $results[$i]->{'quantityreceived'};
        $line{total} = $total;
-       $line{id} = $id;
+       $line{supplierid} = $supplierid;
        push @loop_orders, \%line;
        $totalprice+=$results[$i]->{'unitprice'};
        $totalfreight+=$results[$i]->{'freight'};
@@ -98,7 +98,7 @@ $tototal=$tototal+$freight;
 $template->param(invoice => $invoice,
                                                date => $date,
                                                name => $booksellers[0]->{'name'},
-                                               id => $id,
+                                               supplierid => $supplierid,
                                                gst => $gst,
                                                freight => $freight,
                                                invoice => $invoice,
index 302df0f..024c4f8 100755 (executable)
@@ -32,8 +32,8 @@ use HTML::Template;
 use C4::Acquisition;
 
 my $input=new CGI;
-my $id=$input->param('id');
-my ($count,@booksellers)=bookseller($id);
+my $supplierid=$input->param('supplierid');
+my ($count,@booksellers)=bookseller($supplierid);
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "acqui/recieveorder.tmpl",
@@ -46,7 +46,7 @@ my ($template, $loggedinuser, $cookie)
 
 $template->param(
                name => $booksellers[0]->{'name'},
-               id => $id,
+               supplierid => $supplierid,
                );
 
 output_html_with_http_headers $input, $cookie, $template->output;
index d2ec8a7..a00a8ad 100755 (executable)
@@ -11,7 +11,7 @@ use C4::Suggestions;
 my $input = new CGI;
 
 my $basketid = $input->param('basket');
-my $supplierid = $input->param('id');
+my $supplierid = $input->param('booksellerid');
 
 my $title = $input->param('title');
 my $author = $input->param('author');
index 4df003f..e8c872b 100755 (executable)
@@ -34,7 +34,7 @@ use HTML::Template;
 use strict;
 
 my $query=new CGI;
-my $id=$query->param('id');
+my $id=$query->param('supplierid');
 my ($count,@booksellers)=bookseller($id);
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "acqui/supplier.tmpl",
index 247ebfe..462345c 100644 (file)
@@ -2,26 +2,8 @@
 
 <div id="mainbloc">
 <h1 class="acquisition">Receipt Summary for: <i><!-- TMPL_VAR NAME="name" --></i> Invoice <i><!-- TMPL_VAR NAME="invoice" --></i></h1>
-       <div id="bloc25">
-               Invoice: <!-- TMPL_VAR NAME="invoice" --><br>
-               Received By: <!-- TMPL_VAR NAME="user" --><br>
-               <!-- TMPL_VAR NAME="date" -->
-       </div>
 
        <!-- TMPL_IF name="count" -->
-               <script language="javascript" type="text/javascript">
-               <!--
-               function messenger(X,Y,etc){
-               win=window.open("","mess","height="+X+",width="+Y+",screenX=150,screenY=0");
-               win.focus();
-               win.document.close();
-               win.document.write("<body link='#333333' bgcolor='#ffffff' text='#000000'><font size="2"><p><br>");
-               win.document.write(etc);
-               win.document.write("<center><form><input type=button onclick='self.close()' value="Close"></form></center>");
-               win.document.write("</font></body></html>");
-               }
-               //-->
-               </script>
                <form action="/cgi-bin/koha/acqui/finishreceive.pl" method="post">
                <h1 class="acquisition"><!-- TMPL_VAR NAME="ordernumber" --> - Receive Order</h1>
                Shopping Basket For: <!-- TMPL_VAR NAME="name" -->
                <div id="bloc25">
                                <h2 class="acquisition">catalogue details</h2>
                        <p>
-                               <label>Title *</label>
-                               <input type="text" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->" >
+                               <label class="label100">Title </label>
+                               <!-- TMPL_VAR NAME="title" -->
                        </p>
                        <p>
-                               <label>Author</label>
-                               <input type="text" size="20" name="author" value="<!-- TMPL_VAR NAME="author" -->" >
+                               <label class="label100">Author</label>
+                               <!-- TMPL_VAR NAME="author" -->
                        </p>
                        <p>
-                               <label>Copyright Date</label>
-                               <input type="text" size="20" name="copyright" value="<!-- TMPL_VAR NAME="copyrightdate" -->" >
+                               <label class="label100">Copyright Date</label>
+                               <!-- TMPL_VAR NAME="copyrightdate" -->
                        </p>
                        <p>
-                               <label>Format</label>
-                               <!-- TMPL_VAR NAME="CGIitemtype" -->
+                               <label class="label100">Format</label>
+                               <!-- TMPL_VAR NAME="itemtype" -->
                        </p>
                        <p>
-                               <label>ISBN</label>
-                               <input type="text" size="20" name="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->">
+                               <label class="label100">ISBN</label>
+                               <!-- TMPL_VAR NAME="isbn" -->
                        </p>
                        <p>
-                               <label>Series</label>
-                               <input type="text" size="20" name="Series" value="<!-- TMPL_VAR NAME="seriestitle" -->">
+                               <label class="label100">Series</label>
+                               <!-- TMPL_VAR NAME="seriestitle" -->
                        </p>
+                       <p>Enter barcode(s) and branch if you want to add item(s) immediatly</p>
                        <p>
-                               <label>Branch</label>
+                               <label class="label100">Branch</label>
                                <!-- TMPL_VAR NAME="CGIbranch" -->
                        </p>
                        <p>
-                               <label>Item Barcode *</label>
-                               <input type="text" size="20" name="barcode" value="<!-- TMPL_VAR NAME="barcode" -->">
-                       </p>
-                       <p>
-                               <label>Volume Info (for serials) *</label>
-                               <input type="text" size="20" name="volinf">
-                       </p>
-                       <p>
-                                       <input type="hidden" name="biblio" value="<!-- TMPL_VAR NAME="biblionumber" -->">
-                                       <input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordernumber" -->">
-                                       <input type="hidden" name="biblioitemnum" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->">
-                                       <input type="hidden" name="id" value="<!-- TMPL_VAR NAME="booksellerid" -->">
-                                       <input type="hidden" name="freight" value="<!-- TMPL_VAR NAME="freight" -->">
-                                       <input type="hidden" name="gst" value="<!-- TMPL_VAR NAME="gst" -->">
-                                       <!-- TMPL_IF name="catview" -->
-                                               <input type="submit" class="button acquisition" value="save">
-                                       <!-- TMPL_ELSE -->
-                                               <a class="button acquisition" href="/cgi-bin/koha/acqui/newbiblio.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&amp;id=<!-- TMPL_VAR NAME="booksellerid" -->">
-                                                       Edit
-                                               </a>
-                                       <!-- /TMPL_IF -->
+                               <label class="label100">Item Barcode *</label>
+                               <input type=text size=20 name=barcode value="<!-- TMPL_VAR name="barcode" -->">
                        </p>
                </div>
                <div id="bloc25">
                        <h2 class="acquisition">Accounting details</h2>
                        <p>
-                               <label>Bookfund *</label>
-                               <!-- TMPL_VAR NAME="CGIbookfund" -->
+                               <label class="label100">Bookfund</label>
+                               <!-- TMPL_VAR NAME="bookfund" -->
                        </p>
                        <p>
-                               <label>Quantity Ordered</label>
-                               <input type="text" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->">
+                               <label class="label100">Quantity Ordered</label>
+                               <!-- TMPL_VAR NAME="quantity" -->
+                               <input type="hidden" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->">
                        </p>
                        <p>
-                               <label>Quantity Received *</label>
+                               <label class="label100">Quantity Received *</label>
                                <input type="text" size="20" name="quantityrec" value="<!-- TMPL_VAR NAME="quantityreceived" -->">
                        </p>
                        <p>
-                               <label>Replacement Cost</label>
+                               <label class="label100">Replacement Cost</label>
                                <input type="text" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->">
                        </p>
                        <p>
-                               <label>Budgeted Cost </label>
-                               <input type="text" size="20" name="ecost" value="<!-- TMPL_VAR NAME="ecost" -->">
+                               <label class="label100">Budgeted Cost </label>
+                               <!-- TMPL_VAR NAME="ecost" -->
                        </p>
                        <p>
-                               <label>Actual Cost *</label>
+                               <label class="label100">Actual Cost *</label>
                                <input type="text" size="20" name="cost" value="<!-- TMPL_VAR NAME="unitprice" -->">
                        </p>
                        <p>
-                               <label>Invoice Number</label>
+                               <label class="label100">Invoice Number</label>
                                        <!-- TMPL_VAR NAME="invoice" -->
                                        <input type="hidden" name="invoice" value="<!-- TMPL_VAR NAME="invoice" -->">
                        </p>
                        <p>
-                               <label>Notes</label>
-                               <td><input type="text" size="20" name="notes" value="<!-- TMPL_VAR NAME="notes" -->"></td>
+                               <label class="label100">Notes</label>
+                               <!-- TMPL_VAR NAME="notes" -->
+                       </p>
+                       <p>
+                               <input type="hidden" name="biblio" value="<!-- TMPL_VAR NAME="biblionumber" -->">
+                               <input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordernumber" -->">
+                               <input type="hidden" name="biblioitemnum" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->">
+                               <input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid" -->">
+                               <input type="hidden" name="freight" value="<!-- TMPL_VAR NAME="freight" -->">
+                               <input type="hidden" name="gst" value="<!-- TMPL_VAR NAME="gst" -->">
+                               <!-- TMPL_IF name="catview" -->
+                                       <input type="submit" class="button acquisition" value="save">
+                               <!-- TMPL_ELSE -->
+                                       <a class="button acquisition" href="/cgi-bin/koha/acqui/newbiblio.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&amp;booksellerid=<!-- TMPL_VAR NAME="supplierid" -->">
+                                               Edit
+                                       </a>
+                               <!-- /TMPL_IF -->
                        </p>
                </div>
                </form>
                        <tr>
                                <td><!-- TMPL_VAR NAME="basketno" --></td>
                                <td><!-- TMPL_VAR NAME="isbn" --></td>
-                               <td><a href="acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblio=<!-- TMPL_VAR NAME="biblionumber" -->&amp;invoice=<!-- TMPL_VAR NAME="invoice" -->&amp;freight=<!-- TMPL_VAR NAME="freight" -->&amp;gst=<!-- TMPL_VAR NAME="gst" -->&amp;id=<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="title" --></a></td>
+                               <td><a href="acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblio=<!-- TMPL_VAR NAME="biblionumber" -->&amp;invoice=<!-- TMPL_VAR NAME="invoice" -->&amp;freight=<!-- TMPL_VAR NAME="freight" -->&amp;gst=<!-- TMPL_VAR NAME="gst" -->&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="title" --></a></td>
                                <td><!-- TMPL_VAR NAME="author" --></td>
                                <td><!-- TMPL_VAR NAME="quantity" --></td>
                                <td><!-- TMPL_VAR NAME="quantityrecieved" --></td>
index fb6ef9d..c3ccf1d 100755 (executable)
@@ -1,18 +1,13 @@
 <!-- TMPL_INCLUDE NAME="acquisitions-top.inc" -->
 <div id="mainbloc">
        <h1 class="acquisition">Shopping Basket For: <!-- TMPL_VAR NAME="bookselname" --></h1>
-       <!-- TMPL_IF name ="testdonation" -->
-               <a href="newbiblio.pl?id=<!-- TMPL_VAR NAME="id" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;sub=<!-- TMPL_VAR NAME="parsub" -->">
+               <a href="newbiblio.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;sub=<!-- TMPL_VAR NAME="parsub" -->">
                <img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filenew.png" border="0" alt="Add New Biblio"></a>
-       <!-- TMPL_ELSE -->
-               <a href="newdonation.pl?id=<!-- TMPL_VAR NAME="id" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;sub=<!-- TMPL_VAR NAME="parsub" -->">
-               <img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filenew.png"  border="0" alt="Add New Biblio"></a>
-       <!-- /TMPL_IF -->
        <a href="basket.pl?basket=<!-- TMPL_VAR NAME="basket" -->">
                <img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1uparrow.png"  border="0" alt="View Basket">
        </a>
        <form action="/cgi-bin/koha/acqui/newbasket2.pl">
-       <input type="hidden" name="id" value=<!-- TMPL_VAR NAME="id" -->>
+       <input type="hidden" name="booksellerid" value=<!-- TMPL_VAR NAME="booksellerid" -->>
        <input type="hidden" name="basket" value=<!-- TMPL_VAR NAME="basket" -->>
        <b>New Search: </b><input="text"  size="25"   name="search">
        <input type="submit" value="Search" class="button acquisition">
        <!-- TMPL_LOOP NAME="loopresult" -->
                <tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
                        <td>
-                               <!-- TMPL_IF name="testdonation" -->
-                                       <a href="/cgi-bin/koha/acqui/newbiblio.pl?sub=<!-- TMPL_VAR NAME="sub" -->&amp;author=<!-- TMPL_VAR NAME="author2" -->&amp;copyright=<!-- TMPL_VAR NAME="copyright" -->&amp;id=<!-- TMPL_VAR NAME="id" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;biblio=<!-- TMPL_VAR NAME="biblionumber" -->&amp;title=<!-- TMPL_VAR NAME="title2" -->">
+                                       <a href="/cgi-bin/koha/acqui/newbiblio.pl?sub=<!-- TMPL_VAR NAME="sub" -->&amp;booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;biblio=<!-- TMPL_VAR NAME="biblionumber" -->">
                                        <!-- TMPL_VAR NAME="title" -->
                                        </a>
-                               <!-- TMPL_ELSE -->
-                                       <a href="/cgi-bin/koha/acqui/newdonation.pl?author=<!-- TMPL_VAR NAME="author2" -->&amp;copyright=<!-- TMPL_VAR NAME="copyright" -->&amp;id=<!-- TMPL_VAR NAME="id" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;biblio=<!-- TMPL_VAR NAME="biblionumber" -->&amp;title=<!-- TMPL_VAR NAME="title2" -->">
-                                       <!-- TMPL_VAR NAME="title" -->
-                                       </a>
-                               <!-- /TMPL_IF -->
                        </td>
                        <td>
-                               <a href="/cgi-bin/koha/search.pl?author=<!-- TMPL_VAR NAME="word" -->&amp;type=<!-- TMPL_VAR NAME="type" -->">
                                <!-- TMPL_VAR NAME="author" -->
-                               </a>
                        </td>
                        <td>
                                <!-- TMPL_VAR NAME="copyright" -->
@@ -97,7 +84,7 @@
        </table>
        
        <!-- TMPL_IF name="offsetover" -->
-       <a href="/cgi-bin/koha/acqui/newbasket2.pl?num=<!-- TMPL_VAR NAME="num" -->&amp;offset=<!-- TMPL_VAR NAME="offset" -->&amp;type=<!-- TMPL_VAR NAME="type" -->&amp;id=<!-- TMPL_VAR NAME="id" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;search=<!-- TMPL_VAR NAME="title" -->&amp;author=<!-- TMPL_VAR NAME="author" -->">
+       <a href="/cgi-bin/koha/acqui/newbasket2.pl?num=<!-- TMPL_VAR NAME="num" -->&amp;offset=<!-- TMPL_VAR NAME="offset" -->&amp;type=<!-- TMPL_VAR NAME="type" -->&amp;booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;search=<!-- TMPL_VAR NAME="title" -->&amp;author=<!-- TMPL_VAR NAME="author" -->">
        Next
        </a>
        <!-- /TMPL_IF -->
index 2474516..0b34aa3 100644 (file)
@@ -6,41 +6,24 @@
 <table>
 <tr>
        <th class="acquisition">Order</th>
-       <th class="acquisition">View gapped numbers</th>
        <th class="acquisition">Receive</th>
        <th class="acquisition">Company</th>
-       <th class="acquisition">
-               <table class="noborder">
-                       <tr>
-                               <th class="acquisition">Basket</th>
-                               <th class="acquisition">Items</th>
-                               <th class="acquisition">Staff</th>
-                               <th class="acquisition">Date</th>
-                       </tr>
-               </table>
-       </td>
+       <th class="acquisition">&nbsp;</th>
 </tr>
 
 <!-- TMPL_LOOP name="loop_suppliers" -->
        <tr valign=top bgcolor=<!-- TMPL_VAR name="color" -->>
                <td>
                        <!-- TMPL_IF name="active" -->
-                               <a href="basket.pl?id=<!-- TMPL_VAR name=id -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/mail_send.png" title="Add order" ALT="Add" BORDER=0 ></a>
+                               <a href="basket.pl?supplierid=<!-- TMPL_VAR name=supplierid -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/mail_send.png" title="Add order" ALT="Add" BORDER=0 ></a>
                        <!-- TMPL_ELSE -->
                                Inactive
                        <!-- /TMPL_IF -->
                </td>
                <td>
-                       <!-- TMPL_IF name="active" -->
-<div align="center">                           <a href="select-late.pl?id=<!-- TMPL_VAR name=id -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/mail_send.png" title="Add order" ALT="Add" BORDER=0 ></a></div>
-                       <!-- TMPL_ELSE -->
-                               Inactive
-                       <!-- /TMPL_IF -->
-               </td>
-               <td>
-                       <a href="recieveorder.pl?id=<!-- TMPL_VAR name=id -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/mail_get.png" title="receive" ALT="Add" BORDER=0 ></a>
+                       <a href="recieveorder.pl?supplierid=<!-- TMPL_VAR name=supplierid -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/mail_get.png" title="receive" ALT="Add" BORDER=0 ></a>
                </td>
-               <td><a href="supplier.pl?id=<!-- TMPL_VAR name=id -->"><!-- TMPL_VAR name="name" --></a></td>
+               <td><a href="supplier.pl?supplierid=<!-- TMPL_VAR name=supplierid -->"><!-- TMPL_VAR name="name" --></a></td>
                <td>
                        <table width="100%" cellspacing=0 cellpadding=5 border=0>
                                        <tr>
@@ -70,6 +53,6 @@
        <!-- /TMPL_LOOP -->
        </table>
        </div>
-       <a class="button acquisition" href="supplier.pl?supplerid=0">Add supplier</a>
+       <a class="button acquisition" href="supplier.pl?supplierid=0">Add supplier</a>
 </div>
 <!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->
index 48c337e..223dc61 100644 (file)
@@ -11,7 +11,7 @@
        
        <div id="bloc25">
                <form action="/cgi-bin/koha/acqui/acquire.pl">
-                       <input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->">
+                       <input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid" -->">
                        <input type="hidden" name="gst" value="<!-- TMPL_VAR NAME="gst" -->">
                        <input type="hidden" name="freight" value="<!-- TMPL_VAR NAME="freight" -->">
                        <input type="hidden" name="invoice" value="<!-- TMPL_VAR NAME="invoice" -->">
@@ -37,7 +37,7 @@
                        <tr bgcolor="<!-- TMPL_VAR NAME="color" -->">
                                <td><!-- TMPL_VAR NAME="basketno" --></td>
                                <td><!-- TMPL_VAR NAME="isbn" --></td>
-                               <td><a href="acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblio=<!-- TMPL_VAR NAME="biblionumber" -->&amp;invoice=<!-- TMPL_VAR NAME="invoice" -->&amp;gst=<!-- TMPL_VAR NAME="gst" -->&amp;freight=<!-- TMPL_VAR NAME="freight" -->&amp;id=<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="title" --></a></td>
+                               <td><a href="acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblio=<!-- TMPL_VAR NAME="biblionumber" -->&amp;invoice=<!-- TMPL_VAR NAME="invoice" -->&amp;gst=<!-- TMPL_VAR NAME="gst" -->&amp;freight=<!-- TMPL_VAR NAME="freight" -->&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="title" --></a></td>
                                <td><!-- TMPL_VAR NAME="author" --></td>
                                <td>$<!-- TMPL_VAR NAME="unitprice" --></td>
                                <td></td>
index 0e27c0c..518f2dd 100644 (file)
@@ -1,10 +1,10 @@
 <!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
 <div id="mainbloc">
-       <h1 class="acquisition">Receive Orders From Supplier <a href="/cgi-bin/koha/acqui/supplier.pl?id=<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name" --></a></h1>
+       <h1 class="acquisition">Receive Orders From Supplier <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="name" --></a></h1>
        <div id="bloc25">
                <form method="get" action="receive.pl">
                <p>
-                       <input type="hidden" name="id" value=<!-- TMPL_VAR NAME="id" -->>
+                       <input type="hidden" name="supplierid" value=<!-- TMPL_VAR NAME="supplierid" -->>
                        <h2 class="acquisition">Supplier invoice information</h2>
                <p>
                        <label>Supplier Invoice Number</label>
index 9edb69e..840450f 100644 (file)
                                        <!-- TMPL_VAR NAME="usermanagedby" --><!-- TMPL_IF name="firstnamemanagedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="firstnamemanagedby" -->
                                </td>
                                <td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
-                                       <a href="newbiblio.pl?id=<!-- TMPL_VAR NAME="supplierid" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->" class="button acquisition">Order</a>
+                                       <!-- TMPL_IF name="biblionumber" -->
+                                               <a href="newbiblio.pl?booksellerid=<!-- TMPL_VAR NAME="supplierid" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->&biblio=<!-- TMPL_VAR name="biblionumber" -->" class="button acquisition">Order</a>
+                                       <!-- TMPL_ELSE -->
+                                               <a href="newbiblio.pl?booksellerid=<!-- TMPL_VAR NAME="supplierid" -->&amp;basket=<!-- TMPL_VAR NAME="basket" -->&amp;suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->" class="button acquisition">Order</a>
+                                       <!-- /TMPL_IF -->
                                </td>
                        </tr>
                <!-- /TMPL_LOOP -->