updates to acqui - first of several commits
authorRyan Higgins <rch@liblime.com>
Tue, 1 Jan 2008 20:52:05 +0000 (14:52 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 1 Jan 2008 21:07:02 +0000 (15:07 -0600)
bug fixes to display and save publishercode and purchase order numbers.
use invoice number in place of parcel code
fix template apparently allowing user to modify biblio details on add/mod order
removing CGI scrolling_list

Signed-off-by: Joshua Ferraro <jmf@liblime.com>

13 files changed:
C4/Acquisition.pm
acqui/addorder.pl
acqui/basket.pl
acqui/neworderbiblio.pl
acqui/neworderempty.pl
acqui/orderreceive.pl
acqui/parcel.pl
catalogue/showmarc.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl

index a1f2043..594bfce 100644 (file)
@@ -270,20 +270,20 @@ sub GetOrders {
     my $dbh   = C4::Context->dbh;
     my $query  ="
          SELECT  aqorderbreakdown.*,
-                biblio.*,biblioitems.*,
+                biblio.*,biblioitems.publishercode,
                 aqorders.*,
                 aqbookfund.bookfundname,
                 biblio.title
         FROM    aqorders
             LEFT JOIN aqorderbreakdown ON aqorders.ordernumber=aqorderbreakdown.ordernumber
-            LEFT JOIN biblio           ON biblio.biblionumber=aqorders.biblionumber
-            LEFT JOIN biblioitems      ON biblioitems.biblioitemnumber=aqorders.biblioitemnumber
             LEFT JOIN aqbookfund       ON aqbookfund.bookfundid=aqorderbreakdown.bookfundid
+            LEFT JOIN biblio           ON biblio.biblionumber=aqorders.biblionumber
+            LEFT JOIN biblioitems      ON biblioitems.biblionumber=biblio.biblionumber
         WHERE   basketno=?
             AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00')
     ";
 
-    $orderby = "biblioitems.publishercode" unless $orderby;
+    $orderby = "biblioitems.publishercode,biblio.title" unless $orderby;
     $query .= " ORDER BY $orderby";
     my $sth = $dbh->prepare($query);
     $sth->execute($basketno);
@@ -400,7 +400,7 @@ sub NewOrder {
         $listprice, $booksellerid, $authorisedby, $notes,
         $bookfund,  $bibitemnum,   $rrp,          $ecost,
         $gst,       $budget,       $cost,         $sub,
-        $invoice,   $sort1,        $sort2
+        $invoice,   $sort1,        $sort2,        $purchaseorder
       )
       = @_;
 
@@ -438,15 +438,15 @@ sub NewOrder {
     my $query = "
         INSERT INTO aqorders
            ( biblionumber,title,basketno,quantity,listprice,notes,
-           biblioitemnumber,rrp,ecost,gst,unitprice,subscription,sort1,sort2,budgetdate,entrydate)
-        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,$budget,now() )
+           biblioitemnumber,rrp,ecost,gst,unitprice,subscription,sort1,sort2,budgetdate,entrydate,purchaseordernumber)
+        VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,$budget,now(),? )
     ";
     my $sth = $dbh->prepare($query);
 
     $sth->execute(
         $bibnum, $title,      $basketno, $quantity, $listprice,
         $notes,  $bibitemnum, $rrp,      $ecost,    $gst,
-        $cost,   $sub,        $sort1,    $sort2
+        $cost,   $sub,        $sort1,    $sort2,       $purchaseorder
     );
     $sth->finish;
 
@@ -490,7 +490,7 @@ sub ModOrder {
         $title,      $ordnum,   $quantity, $listprice, $bibnum,
         $basketno,   $supplier, $who,      $notes,     $bookfund,
         $bibitemnum, $rrp,      $ecost,    $gst,       $budget,
-        $cost,       $invoice,  $sort1,    $sort2
+        $cost,       $invoice,  $sort1,    $sort2,     $purchaseorder
       )
       = @_;
     my $dbh = C4::Context->dbh;
@@ -499,14 +499,15 @@ sub ModOrder {
         SET    title=?,
                quantity=?,listprice=?,basketno=?,
                rrp=?,ecost=?,unitprice=?,booksellerinvoicenumber=?,
-               notes=?,sort1=?, sort2=?
+               notes=?,sort1=?, sort2=?, purchaseordernumber=?
         WHERE  ordernumber=? AND biblionumber=?
     ";
     my $sth = $dbh->prepare($query);
     $sth->execute(
         $title, $quantity, $listprice, $basketno, $rrp,
         $ecost, $cost,     $invoice,   $notes,    $sort1,
-        $sort2, $ordnum,   $bibnum
+        $sort2, $purchaseorder,
+               $ordnum,   $bibnum
     );
     $sth->finish;
     $query = "
@@ -893,7 +894,7 @@ sub GetParcels {
     my $dbh    = C4::Context->dbh;
     my $strsth ="
         SELECT  aqorders.booksellerinvoicenumber,
-                datereceived,
+                datereceived,purchaseordernumber,
                 count(DISTINCT biblionumber) AS biblio,
                 sum(quantity) AS itemsexpected,
                 sum(quantityreceived) AS itemsreceived
index c90719e..1bd80a1 100755 (executable)
@@ -165,6 +165,7 @@ my $gst           = $input->param('GST');
 my $budget        = $input->param('budget');
 my $cost          = $input->param('cost');
 my $sub           = $input->param('sub');
+my $purchaseorder = $input->param('purchaseordernumber');
 my $invoice       = $input->param('invoice');
 my $publishercode = $input->param('publishercode');
 my $suggestionid  = $input->param('suggestionid');
@@ -210,7 +211,7 @@ if ( $quantity ne '0' ) {
             $biblionumber,  $basketno, $booksellerid, $loggedinuser,
             $notes,   $bookfund, $bibitemnum,   $rrp,
             $ecost,   $gst,      $budget,       $cost,
-            $invoice, $sort1,    $sort2
+            $invoice, $sort1,    $sort2,               $purchaseorder
         );
     }
     else { # else, it's a new line
@@ -219,7 +220,7 @@ if ( $quantity ne '0' ) {
             $listprice, $booksellerid, $loggedinuser, $notes,
             $bookfund,  $bibitemnum,   $rrp,          $ecost,
             $gst,       $budget,       $cost,         $sub,
-            $invoice,   $sort1,        $sort2
+            $invoice,   $sort1,        $sort2,         $purchaseorder
         );
     }
 }
index d127ca1..9aba351 100755 (executable)
@@ -132,7 +132,6 @@ my $gist_est;           # GST
 my $grand_total_est;    # $subttotal + $gist
 
 my $qty_total;
-
 my @books_loop;
 for ( my $i = 0 ; $i < $count ; $i++ ) {
     my $rrp = $results[$i]->{'listprice'};
@@ -152,7 +151,8 @@ for ( my $i = 0 ; $i < $count ; $i++ ) {
         $line{color} = 'white';
         $toggle = 0;
     }
-    $line{basketno}         = $basketno;
+       $line{publishercode}    = $results[$i]->{'publishercode'};
+       $line{basketno}         = $basketno;
     $line{i}                = $i;
     $line{rrp}              = sprintf( "%.2f", $line{'rrp'} );
     $line{ecost}            = sprintf( "%.2f", $line{'ecost'} );
index d38dd6b..6fb6f7c 100755 (executable)
@@ -111,7 +111,6 @@ for(my $i=0;$i<$hits;$i++) {
     %resultsloop=%$biblio;
     $resultsloop{highlight}       = ($i % 2)?(1):(0);
     $resultsloop{booksellerid} = $booksellerid;
-
     push @results, \%resultsloop;
 }
 
index 97fc39c..8093015 100755 (executable)
@@ -89,6 +89,7 @@ my $count        = scalar @booksellers;
 my $ordnum       = $input->param('ordnum');
 my $biblionumber       = $input->param('biblionumber');
 my $basketno     = $input->param('basketno');
+my $purchaseorder= $input->param('purchaseordernumber');
 my $suggestionid = $input->param('suggestionid');
 # my $donation     = $input->param('donation');
 my $close        = $input->param('close');
@@ -151,23 +152,10 @@ for ( my $i = 0 ; $i < $count ; $i++ ) {
 my $itemtypes = GetItemTypes;
 
 my @itemtypesloop;
-my %itemtypesloop;
 foreach my $thisitemtype (sort keys %$itemtypes) {
-    push @itemtypesloop, $itemtypes->{$thisitemtype}->{'itemtype'};
-    $itemtypesloop{$itemtypes->{$thisitemtype}->{'itemtype'}} =        $itemtypes->{$thisitemtype}->{'description'};
+    push @itemtypesloop, { itemtype => $itemtypes->{$thisitemtype}->{'itemtype'} , desc =>  $itemtypes->{$thisitemtype}->{'description'} } ;
 }
 
-my $CGIitemtype = CGI::scrolling_list(
-    -name     => 'format',
-       -id          => 'format',
-    -values   => \@itemtypesloop,
-    -default  => $data->{'itemtype'},
-    -labels   => \%itemtypesloop,
-    -size     => 1,
-       -tabindex=>'',
-    -multiple => 0
-);
-
 # build branches list
 my $onlymine=C4::Context->preference('IndependantBranches') && 
              C4::Context->userenv && 
@@ -182,7 +170,7 @@ foreach my $thisbranch ( sort keys %$branches ) {
     );
     push @branchloop, \%row;
 }
-$template->param( branchloop => \@branchloop );
+$template->param( branchloop => \@branchloop , itypeloop => \@itemtypesloop );
 
 # build bookfund list
 my $borrower= GetMember($loggedinuser);
@@ -278,6 +266,7 @@ $template->param(
     authorisedbyname => $borrower->{'firstname'} . " " . $borrower->{'surname'},
        biblioitemnumber => $data->{'biblioitemnumber'},
     itemtype         => $data->{'itemtype'},
+    itemtype_desc         => $itemtypes->{$data->{'itemtype'}}->{description},
     discount         => $booksellers[0]->{'discount'},
     listincgst       => $booksellers[0]->{'listincgst'},
     listprice        => $booksellers[0]->{'listprice'},
@@ -293,7 +282,6 @@ $template->param(
     title            => $data->{'title'},
     author           => $data->{'author'},
     copyrightdate    => $data->{'copyrightdate'},
-    CGIitemtype      => $CGIitemtype,
     CGIbookfund      => $CGIbookfund,
     isbn             => $data->{'isbn'},
     seriestitle      => $data->{'seriestitle'},
@@ -303,6 +291,7 @@ $template->param(
     total            => $data->{ecost}*$data->{quantity},
     invoice          => $data->{'booksellerinvoicenumber'},
     ecost            => $data->{'ecost'},
+    purchaseordernumber            => $data->{'purchaseordernumber'},
     notes            => $data->{'notes'},
     publishercode    => $data->{'publishercode'},
 #     donation         => $donation
index cc2c673..cc62fe4 100755 (executable)
@@ -76,7 +76,7 @@ my $search       = $input->param('recieve');
 my $invoice      = $input->param('invoice');
 my $freight      = $input->param('freight');
 my $biblionumber       = $input->param('biblionumber');
-my $daterecieved = $input->param('daterecieved') || format_date(join "-",Date::Calc::Today());
+my $daterecieved = C4::Dates->new($input->param('datereceived'),'iso') || C4::Dates->new();
 my $catview      = $input->param('catview');
 my $gst          = $input->param('gst');
 
@@ -191,7 +191,7 @@ if ( $count == 1 ) {
         ecost                 => $results[0]->{'ecost'},
         unitprice             => $results[0]->{'unitprice'},
         invoice               => $invoice,
-        daterecieved          => $daterecieved,
+        daterecieved          => $daterecieved->output(),
     );
 }
 else {
@@ -200,7 +200,7 @@ else {
         my %line = %{ $results[$i] };
 
         $line{invoice}      = $invoice;
-        $line{daterecieved} = $daterecieved;
+        $line{daterecieved} = $daterecieved->output();
         $line{freight}      = $freight;
         $line{gst}          = $gst;
         $line{title}        = $results[$i]->{'title'};
@@ -211,11 +211,10 @@ else {
     $template->param(
         loop                    => \@loop,
         date                    => format_date($date),
-        daterecieved            => $daterecieved,
+        daterecieved            => $daterecieved->output(),
         name                    => $booksellers[0]->{'name'},
         supplierid              => $supplierid,
         invoice                 => $invoice,
-        daterecieved            => $daterecieved,
     );
 
 }
index c6a1fe0..f26ef08 100755 (executable)
@@ -72,7 +72,7 @@ my $count = scalar @booksellers;
 my $invoice=$input->param('invoice') || '';
 my $freight=$input->param('freight');
 my $gst=$input->param('gst');
-my $datereceived=format_date_in_iso($input->param('datereceived')) || format_date(join "-",Date::Calc::Today());
+my $datereceived=C4::Dates->new($input->param('datereceived'),'iso') || C4::Dates->new();
 my $code=$input->param('code');
 
 my ($template, $loggedinuser, $cookie)
@@ -83,7 +83,7 @@ my ($template, $loggedinuser, $cookie)
                  flagsrequired => {acquisition => 1},
                  debug => 1,
 });
-my @parcelitems=GetParcel($supplierid,$invoice,$datereceived);
+my @parcelitems=GetParcel($supplierid,$invoice,$datereceived->output('iso'));
 my $countlines = scalar @parcelitems;
 
 my $totalprice=0;
@@ -94,8 +94,9 @@ my $tototal;
 my $toggle;
 my @loop_received = ();
 for (my $i=0;$i<$countlines;$i++){
-    $total=($parcelitems[$i]->{'unitprice'} + $parcelitems[$i]->{'freight'}) * $parcelitems[$i]->{'quantityreceived'};   #weird, are the freight fees counted by book? (pierre)
-    $parcelitems[$i]->{'unitprice'}+=0;
+    #$total=($parcelitems[$i]->{'unitprice'} + $parcelitems[$i]->{'freight'}) * $parcelitems[$i]->{'quantityreceived'};   #weird, are the freight fees counted by book? (pierre)
+    $total=($parcelitems[$i]->{'unitprice'}  ) * $parcelitems[$i]->{'quantityreceived'};   #weird, are the freight fees counted by book? (pierre)
+       $parcelitems[$i]->{'unitprice'}+=0;
     my %line;
     if ($toggle==0){
         $line{color}='#EEEEEE';
@@ -111,10 +112,19 @@ for (my $i=0;$i<$countlines;$i++){
     $line{supplierid} = $supplierid;
     push @loop_received, \%line;
     $totalprice+=$parcelitems[$i]->{'unitprice'};
-    $totalfreight+=$parcelitems[$i]->{'freight'};
+#double FIXME - totalfreight is redefined later.
+
+ # FIXME - each order in a  parcel holds the freight for the whole parcel. This means if you receive a parcel with items from multiple budgets, you'll see the freight charge in each budget..
+     if ( $i > 0 && $totalfreight != $parcelitems[$i]->{'freight'}) {
+               warn "FREIGHT CHARGE MISMATCH!!";
+       }
+       $totalfreight=$parcelitems[$i]->{'freight'};
+    #$totalfreight+=$parcelitems[$i]->{'freight'};
+    $totalfreight=$parcelitems[$i]->{'freight'};
     $totalquantity+=$parcelitems[$i]->{'quantityreceived'};
     $tototal+=$total;
 }
+
 my $pendingorders = GetPendingOrders($supplierid);
 my $countpendings = scalar @$pendingorders;
 
@@ -143,13 +153,13 @@ for (my $i=0;$i<$countpendings;$i++){
     $line{supplierid} = $supplierid;
     push @loop_orders, \%line;
 }
-
+$freight = $totalfreight unless $freight;
 $totalfreight=$freight;
 $tototal=$tototal+$freight;
 
 $template->param(invoice => $invoice,
-                datereceived => $datereceived,
-                formatteddatereceived => format_date($datereceived),
+                datereceived => $datereceived->output('iso'),
+                formatteddatereceived => $datereceived->output(),
                 name => $booksellers[0]->{'name'},
                 supplierid => $supplierid,
                 gst => $gst,
index 4b959fe..6239b71 100755 (executable)
@@ -67,7 +67,7 @@ my $style_doc = $parser->parse_file($xslfile);
 my $stylesheet = $xslt->parse_stylesheet($style_doc);
 my $results = $stylesheet->transform($source);
 my $newxmlrecord = $stylesheet->output_string($results);
-warn $newxmlrecord;
+#warn $newxmlrecord;
 print "Content-type: text/html\n\n";
 print $newxmlrecord;
 
index 0c449aa..0dcf6f9 100644 (file)
@@ -89,7 +89,7 @@
                <table>
                        <tr>
                                <th>Basket</th>
-                               <th>Parcel</th>
+                               <th>Parcel / Invoice</th>
                                <th>Summary</th>
                                <th>Supplier</th>
                                <th>Placed on</th>
 <!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
 </div>
 </div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
index d3ab7b4..da90dc7 100644 (file)
@@ -1,5 +1,6 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
 <title>Koha &rsaquo; Acquisitions &rsaquo; Search Existing Records</title>
+<!-- TMPL_INCLUDE NAME="greybox.inc" -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 </head>
 <body>
 <div class="searchresults">
     <table>
     <tr>
-       <th colspan="2">Summary</th>
+       <th>Summary</th>
+       <th>Publisher</th>
+       <th>Copyright</th>
+       <th colspan="2">&nbsp;</th>
     </tr>
     <!-- TMPL_LOOP NAME="resultsloop" -->
         <tr>
             <td>
-                <p><!-- TMPL_VAR NAME="title" --></p>
-                <p><!-- TMPL_IF name="author" --><!-- TMPL_VAR NAME="author" -->,<!-- /TMPL_IF -->
-                <!-- TMPL_IF name="copyrightdate" --> - <!-- TMPL_VAR NAME="copyrightdate" --><!-- /TMPL_IF --> 
-                <!-- TMPL_IF name="publishercode" --> - <!-- TMPL_VAR name="publishercode" --><!-- /TMPL_IF -->
-                <!-- TMPL_IF name="place" --> ; <!-- TMPL_VAR name="place" --><!-- /TMPL_IF -->
+                <p><span class='title'><!-- TMPL_VAR NAME="title" --></span>
+                <!-- TMPL_IF name="author" -->  by <span class='author'><!-- TMPL_VAR NAME="author" --></span>,<!-- /TMPL_IF --></p>
+                <p><!-- TMPL_IF name="isbn" --> <!-- TMPL_VAR name="isbn" --><!-- /TMPL_IF -->
                 <!-- TMPL_IF name="pages" --> - <!-- TMPL_VAR name="pages" --><!-- /TMPL_IF -->
                 <!-- TMPL_IF name="notes" --> : <!-- TMPL_VAR name="notes" --><!-- /TMPL_IF -->
                 <!-- TMPL_IF name="size" --> ; <!-- TMPL_VAR name="size" --><!-- /TMPL_IF -->
                 </p>
             </td>
             <td>
+                <!-- TMPL_VAR name="publishercode" -->
+                <!-- TMPL_IF name="place" --> ; <!-- TMPL_VAR name="place" --><!-- /TMPL_IF -->
+            </td>
+            <td>
+                <!-- TMPL_VAR NAME="copyrightdate" -->
+            </td>
+        <td>
+        <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">View MARC</a>
+        </td>
+            <td>
             <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" title="order this one !">
                 Order
             </a>
index 3e71a5e..88704ea 100644 (file)
@@ -120,17 +120,17 @@ if (quantity ==0) {
             <input type="hidden" name="<!-- TMPL_VAR NAME="currency" -->" value="<!-- TMPL_VAR NAME="rate" -->" />
         <!-- /TMPL_LOOP -->
         <ol><li>
-            <!-- TMPL_IF name="biblio" -->
+            <!-- TMPL_IF name="biblionumber" -->
                        <span class="label">Title</span>
-                <input type="hidden" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->" /><!-- TMPL_VAR NAME="title" -->
+                <input type="hidden" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->" /> <span class='title'><!-- TMPL_VAR NAME="title" --></span>
             <!-- TMPL_ELSE -->
             <label for="entertitle" class="required">Title: </label>
                 <input type="text" id="entertitle" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
             <!-- /TMPL_IF -->
         </li>
         <li>
-            <!-- TMPL_IF name="biblio" -->
-                       <span class="label">Author: </label>
+            <!-- TMPL_IF name="biblionumber" -->
+                       <span class="label">Author: </span>
                 <input type="hidden" size="20" name="author" id="author" value="<!-- TMPL_VAR NAME="author" -->" /><!-- TMPL_VAR NAME="author" -->
             <!-- TMPL_ELSE -->
             <label for="author">Author: </label>
@@ -138,8 +138,8 @@ if (quantity ==0) {
             <!-- /TMPL_IF -->
         </li>
         <li>
-            <!-- TMPL_IF name="biblio" -->
-                       <span class="label">Publisher: </label>
+            <!-- TMPL_IF name="biblionumber" -->
+                       <span class="label">Publisher: </span>
                 <input type="hidden" size="20" name="publishercode" id="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" /><!-- TMPL_VAR NAME="publishercode" -->
             <!-- TMPL_ELSE -->
             <label for="publishercode"> Publisher: </label>
@@ -147,7 +147,7 @@ if (quantity ==0) {
             <!-- /TMPL_IF -->
         </li>
         <li>
-            <!-- TMPL_IF name="biblio" -->
+            <!-- TMPL_IF name="biblionumber" -->
                        <span class="label">Copyright date: </span>
                 <input type="hidden" size="20" name="copyrightdate" id="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->" /><!-- TMPL_VAR NAME="copyrightdate" -->
             <!-- TMPL_ELSE -->
@@ -156,11 +156,20 @@ if (quantity ==0) {
             <!-- /TMPL_IF -->
         </li>
         <li>
-            <label for="format">Format: </label>
-            <!-- TMPL_VAR NAME="CGIitemtype" -->
+            <!-- TMPL_IF name="biblionumber" -->
+                       <span class="label">Item type: </span>
+                <input type="hidden" size="20" name="itemtype" id="itemtype" value="<!-- TMPL_VAR NAME="itemtype" -->" /><!-- TMPL_VAR NAME="itemtype_desc" -->
+                       <!-- TMPL_ELSE -->
+            <label for="format">Item type: </label>
+            <select name="format" id="format">
+            <!-- TMPL_LOOP name="itypeloop" -->
+                               <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="desc" --></option>
+            <!-- /TMPL_LOOP -->
+            </select>
+                        <!-- /TMPL_IF -->
         </li>
         <li>
-            <!-- TMPL_IF name="biblio" -->
+            <!-- TMPL_IF name="biblionumber" -->
                        <span class="label">ISBN: </span>
                 <input type="hidden" size="20" name="ISBN" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_VAR NAME="isbn" -->
             <!-- TMPL_ELSE -->
@@ -169,16 +178,16 @@ if (quantity ==0) {
             <!-- /TMPL_IF -->
         </li>
         <li>
-            <!-- TMPL_IF name="biblio" -->
+            <!-- TMPL_IF name="biblionumber" -->
                        <span class="label">Series: </span>
-                <input type="hidden" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" /><!-- TMPL_VAR NAME="seriestitle" -->
+                <input type="hidden" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" /><span class='title'><!-- TMPL_VAR NAME="seriestitle" --></span>
             <!-- TMPL_ELSE -->
             <label for="series">Series: </label>
                 <input type="text" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" />
             <!-- /TMPL_IF -->
         </li>
         <li>
-            <label for="branch">Branch: </label>
+            <label for="branch">Library: </label>
             <select name="branch" id="branch">
             <!-- TMPL_LOOP name="branchloop" -->
                 <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
@@ -268,8 +277,12 @@ if (quantity ==0) {
                                <!--/TMPL_IF-->
             </li>
             <li>
+                <label for="purchaseordernumber">Purchase order: </label>
+                <input type="text" id="purchaseordernumber" size="20" name="purchaseordernumber"  value="<!-- TMPL_VAR name="purchaseordernumber" -->" /> 
+            </li>
+            <li>
                 <label for="invoice">Invoice number: </label>
-                <input type="text" id="invoice" size="20" name="invoice"  value="<!-- TMPL_VAR name="invoice" -->" /> (usually empty)
+                <input type="text" id="invoice" size="20" name="invoice"  value="<!-- TMPL_VAR name="invoice" -->" /> (Fill when receiving)
             </li>
             <li>
                 <label for="notes">Notes: </label>
index f959545..9dda33e 100644 (file)
     <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
     <table>
         <tr>
+            <th>Quantity</th>
             <th>Basket/Order</th>
             <th>Summary</th>
             <th>View Record</th>
-                       <th>QTY ordered</th>
-            <th>Est Cost</th>
-            <th>ACTUAL</th>
-            <th>QTY received</th>
+                       <th>Qty ordered</th>
+            <th>Est cost</th>
+            <th>Actual cost</th>
             <th>TOTAL</th>
         </tr>
         <!-- TMPL_LOOP NAME="loop_received" -->
             <tr>
+                <td><a href="orderreceive.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;daterecieved=<!-- TMPL_VAR NAME="datereceived" -->&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="quantityreceived" --></a></td>
                 <td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="basketno" --></a>&nbsp; / &nbsp;<!-- TMPL_VAR NAME="ordernumber" --></td>
                 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
                 <!-- TMPL_IF NAME="isbn" --><br />ISBN: <!-- TMPL_VAR NAME="isbn" --><!--/TMPL_IF-->
@@ -58,7 +59,6 @@
                                <td><!-- TMPL_VAR NAME="quantity" --></td>
                 <td><!-- TMPL_VAR NAME="ecost" --></td>
                 <td><!-- TMPL_VAR NAME="unitprice" --></td>
-                <td><a href="orderreceive.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;daterecieved=<!-- TMPL_VAR NAME="datereceived" -->&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="quantityreceived" --></a></td>
                 <td><!-- TMPL_VAR NAME="total" --></td>
             </tr>
         <!-- /TMPL_LOOP -->
index 80e0203..f7d8e36 100644 (file)
 <form method="post" action="parcels.pl">
     <table class="small">
         <tr>
-            <th>Line</th>
-            <th>Code</th>
-            <th>Date Received</th>
-            <th>Item Count</th>
-            <th>Biblio count</th>
-            <th>Items expected</th>
-        </tr>
-        <tr>
             <th> <input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid" -->" /></th>
-            <th><input type="text" size="20" name="filter" value="<!-- TMPL_VAR NAME="filter" -->" /></th>
+            <th><label for="filter">Invoice / Code:</label><input type="text" size="20" name="filter" value="<!-- TMPL_VAR NAME="filter" -->" /></th>
             <th><label for="datefrom">From:</label><input type="text" size="9" id="datefrom" name="datefrom" value="<!-- TMPL_VAR NAME="datefrom" -->" /> 
                 <p><label for="dateto">To:</label><input type="text" size="9" id="dateto" name="dateto" value="<!-- TMPL_VAR NAME="dateto" -->" /></th>
-            <th>&nbsp;</th>
             <th><label for="orderby">Sort by :</label><select name="orderby" id="orderby">
                 <option value="aqorders.booksellerinvoicenumber"> Code</option>
                 <option value="datereceived"> Date Received</option>
                 </select></th>
             <th><input type="submit" class="button" value="Filter" /></th>
         </tr>
+       </table><br />
+    <table class="small">
+        <tr>
+            <th>Line</th>
+            <th>Date Received</th>
+            <th>Invoice /Parcel Code</th>
+            <th>Item Count</th>
+            <th>Biblio count</th>
+            <th>Items expected</th>
+        </tr>
 <!-- Actual Search Results -->
 <!-- TMPL_LOOP NAME="searchresults" -->
     <tr>
         <!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
             <!-- TMPL_VAR NAME="number" -->
         </td>
-        <!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number"><!-- /TMPL_IF -->
-            <!--TMPL_IF Name="code"--><!--TMPL_VAR Name="code" --><!--/TMPL_IF-->
-        </td>
         <!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number">
         <!-- /TMPL_IF -->
             <a href="/cgi-bin/koha/acqui/parcel.pl?type=intra&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" ESCAPE="URL" -->&amp;datereceived=<!-- TMPL_VAR NAME="raw_datereceived" ESCAPE="URL" --><!--TMPL_IF Name="code"-->&amp;invoice=<!--TMPL_VAR Name="code" ESCAPE="URL" --><!--/TMPL_IF-->">
                 <!-- TMPL_VAR NAME="datereceived" -->
             </a>
         </td>
+        <!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number"><!-- /TMPL_IF -->
+            <!--TMPL_IF Name="code"--><!--TMPL_VAR Name="code" --><!--/TMPL_IF-->
+        </td>
         <!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number">
         <!-- /TMPL_IF -->
             <!-- TMPL_VAR NAME="reccount" -->