[Koha-cvs] koha acqui/receive.pl koha-tmpl/intranet-tmpl/d... [rel_2_2]
Henri-Damien LAURENT
laurenthdl at alinto.com
Tue Feb 21 17:07:27 CET 2006
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: Henri-Damien LAURENT <hdl at savannah.gnu.org> 06/02/21 16:07:27
Modified files:
acqui : receive.pl
koha-tmpl/intranet-tmpl/default/en/acqui: recieveorder.tmpl
recieve.tmpl
Log message:
Finishing basket reception.
So Now we should be through a first draft of parcel management.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/acqui/receive.pl.diff?only_with_tag=rel_2_2&tr1=1.13.2.3&tr2=1.13.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl.diff?only_with_tag=rel_2_2&tr1=1.10.2.1&tr2=1.10.2.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl.diff?only_with_tag=rel_2_2&tr1=1.12.2.1&tr2=1.12.2.2&r1=text&r2=text
Patches:
Index: koha/acqui/receive.pl
diff -u koha/acqui/receive.pl:1.13.2.3 koha/acqui/receive.pl:1.13.2.4
--- koha/acqui/receive.pl:1.13.2.3 Sun Feb 5 21:59:21 2006
+++ koha/acqui/receive.pl Tue Feb 21 16:07:27 2006
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: receive.pl,v 1.13.2.3 2006/02/05 21:59:21 kados Exp $
+# $Id: receive.pl,v 1.13.2.4 2006/02/21 16:07:27 hdl Exp $
#script to recieve orders
#written by chris at katipo.co.nz 24/2/2000
@@ -39,7 +39,7 @@
my $invoice=$input->param('invoice');
my $freight=$input->param('freight');
my $gst=$input->param('gst');
-my $date=localtime(time);
+my $date=$input->param('datereceived');
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "acqui/recieve.tmpl",
@@ -50,21 +50,48 @@
debug => 1,
});
-my @results;
-($count, at results)=invoice($invoice);
-if ($invoice eq ''){
- ($count, at results)=getallorders($supplierid);
-}
+my ($countlines, at parcelitems)=getparcelinformation($supplierid,$invoice,$date);
my $totalprice=0;
my $totalfreight=0;
my $totalquantity=0;
my $total;
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;
+ my %line;
+ if ($toggle==0){
+ $line{color}='#EEEEEE';
+ $toggle=1;
+ } else {
+ $line{color}='white';
+ $toggle=0;
+ }
+ $line{basketno} = $parcelitems[$i]->{'basketno'};
+ $line{isbn} = $parcelitems[$i]->{'isbn'};
+ $line{ordernumber} = $parcelitems[$i]->{'ordernumber'};
+ $line{biblionumber} = $parcelitems[$i]->{'biblionumber'};
+ $line{invoice} = $invoice;
+ $line{gst} = $gst;
+ $line{title} = $parcelitems[$i]->{'title'};
+ $line{author} = $parcelitems[$i]->{'author'};
+ $line{unitprice} = $parcelitems[$i]->{'unitprice'};
+ $line{ecost} = $parcelitems[$i]->{'ecost'};
+ $line{quantityrecieved} = $parcelitems[$i]->{'quantityreceived'};
+ $line{quantity} = $parcelitems[$i]->{'quantity'};
+ $line{total} = $total;
+ $line{supplierid} = $supplierid;
+ push @loop_received, \%line;
+ $totalprice+=$parcelitems[$i]->{'unitprice'};
+ $totalfreight+=$parcelitems[$i]->{'freight'};
+ $totalquantity+=$parcelitems[$i]->{'quantityreceived'};
+ $tototal+=$total;
+}
+my ($countpendings, at pendingorders)=getallorders($supplierid);
my @loop_orders = ();
-for (my$i=0;$i<$count;$i++){
- $total=($results[$i]->{'unitprice'} + $results[$i]->{'freight'}) * $results[$i]->{'quantityreceived'}; #weird, are the freight fees counted by book? (pierre)
- $results[$i]->{'unitprice'}+=0;
+for (my $i=0;$i<$countpendings;$i++){
my %line;
if ($toggle==0){
$line{color}='#EEEEEE';
@@ -73,23 +100,21 @@
$line{color}='white';
$toggle=0;
}
- $line{basketno} = $results[$i]->{'basketno'};
- $line{isbn} = $results[$i]->{'isbn'};
- $line{ordernumber} = $results[$i]->{'ordernumber'};
- $line{biblionumber} = $results[$i]->{'biblionumber'};
+ $line{basketno} = $pendingorders[$i]->{'basketno'};
+ $line{isbn} = $pendingorders[$i]->{'isbn'};
+ $line{ordernumber} = $pendingorders[$i]->{'ordernumber'};
+ $line{biblionumber} = $pendingorders[$i]->{'biblionumber'};
$line{invoice} = $invoice;
$line{gst} = $gst;
- $line{title} = $results[$i]->{'title'};
- $line{author} = $results[$i]->{'author'};
- $line{unitprice} = $results[$i]->{'unitprice'};
- $line{quantityrecieved} = $results[$i]->{'quantityreceived'};
+ $line{title} = $pendingorders[$i]->{'title'};
+ $line{author} = $pendingorders[$i]->{'author'};
+ $line{unitprice} = $pendingorders[$i]->{'unitprice'};
+ $line{ecost} = $pendingorders[$i]->{'ecost'};
+ $line{quantityrecieved} = $pendingorders[$i]->{'quantityreceived'};
+ $line{quantity} = $pendingorders[$i]->{'quantity'};
$line{total} = $total;
$line{supplierid} = $supplierid;
push @loop_orders, \%line;
- $totalprice+=$results[$i]->{'unitprice'};
- $totalfreight+=$results[$i]->{'freight'};
- $totalquantity+=$results[$i]->{'quantityreceived'};
- $tototal+=$total;
}
$totalfreight=$freight;
@@ -102,7 +127,9 @@
gst => $gst,
freight => $freight,
invoice => $invoice,
- count => $count,
+ countreceived => $countlines,
+ loop_received => \@loop_received,
+ countpending => $countpendings,
loop_orders => \@loop_orders,
totalprice => $totalprice,
totalfreight => $totalfreight,
Index: koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl
diff -u koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl:1.12.2.1 koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl:1.12.2.2
--- koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl:1.12.2.1 Tue Apr 5 09:45:14 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieve.tmpl Tue Feb 21 16:07:27 2006
@@ -2,11 +2,7 @@
<div id="mainbloc">
<h1 class="acquisition">
- <!-- TMPL_IF name="invoice" -->
Receipt Summary for <i><!-- TMPL_VAR NAME="name" --></i> Invoice <i><!-- TMPL_VAR NAME="invoice" --></i>
- <!-- TMPL_ELSE -->
- orders not yet recieved for <!-- TMPL_VAR NAME="name" -->
- <!-- /TMPL_IF -->
</h1>
<div id="bloc25">
@@ -16,37 +12,33 @@
</div>
<div id="bloc25">
- <form action="/cgi-bin/koha/acqui/acquire.pl">
- <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" -->">
-
- <b>Search ISBN or Title:</b> <input type="text" size="25" name="recieve">
- </form>
+ <h2 class="acquisition"> Items in parcel</h2>
<p>
- <form action="" method="get" name="orderform">
-
+ <!-- TMPL_VAR NAME="countreceived" --> biblio received
+ </p>
<table>
<tr>
<th class="acquisition">BASKET</th>
<th class="acquisition">ISBN</th>
<th class="acquisition">TITLE</th>
<th class="acquisition">AUTHOR</th>
- <th class="acquisition">ACTUAL</th>
+ <th class="acquisition">Est. cost</th>
+ <th class="acquisition">Qty ordered</th>
<th class="acquisition">P&P</th>
+ <th class="acquisition">ACTUAL</th>
<th class="acquisition">QTY</th>
<th class="acquisition">TOTAL</th>
</tr>
- <!-- TMPL_VAR NAME="count" -->
- <!-- TMPL_LOOP NAME="loop_orders" -->
+ <!-- TMPL_LOOP NAME="loop_received" -->
<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" -->&biblio=<!-- TMPL_VAR NAME="biblionumber" -->&invoice=<!-- TMPL_VAR NAME="invoice" -->&gst=<!-- TMPL_VAR NAME="gst" -->&freight=<!-- TMPL_VAR NAME="freight" -->&supplierid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="title" --></a></td>
+ <td><a href="acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&biblio=<!-- TMPL_VAR NAME="biblionumber" -->&invoice=<!-- TMPL_VAR NAME="invoice" -->&gst=<!-- TMPL_VAR NAME="gst" -->&freight=<!-- TMPL_VAR NAME="freight" -->&supplierid=<!-- TMPL_VAR NAME="supplierid" -->&catview=yes"><!-- TMPL_VAR NAME="title" --></a></td>
<td><!-- TMPL_VAR NAME="author" --></td>
- <td><!-- TMPL_VAR NAME="unitprice" --></td>
+ <td><!-- TMPL_VAR NAME="ecost" --></td>
+ <td><!-- TMPL_VAR NAME="quantity" --></td>
<td></td>
+ <td><!-- TMPL_VAR NAME="unitprice" --></td>
<td><!-- TMPL_VAR NAME="quantityrecieved" --></td>
<td><!-- TMPL_VAR NAME="total" --></td>
</tr>
@@ -55,14 +47,16 @@
<th class="acquisition"></th>
<th class="acquisition"></th>
<th class="acquisition"></th>
- <th class="acquisition">SUBTOTALS</th>
- <th class="acquisition"><!-- TMPL_VAR NAME="totalprice" --></th>
- <th class="acquisition"><!-- TMPL_VAR NAME="totalfreight" --></th>
- <th class="acquisition"><!-- TMPL_VAR NAME="totalquantity" --></th>
+ <th class="acquisition"></th>
+ <th class="acquisition"></th>
+ <th class="acquisition"></th>
+ <th class="acquisition"></th>
+ <th class="acquisition"></th>
+ <th class="acquisition"></th>
<th class="acquisition"><!-- TMPL_VAR NAME="tototal" --></th>
</tr>
<tr>
- <td colspan="5" rowspan=2 bgcolor="#ffdf61">
+ <td colspan="7" rowspan=2 bgcolor="#ffdf61">
<b>HELP</b>
<p>The total at the bottom of the page should be within a few cents of the total for the invoice.</p>
</td>
@@ -75,5 +69,37 @@
</tr>
</table>
</div>
+
+ <div id="bloc25">
+ <h2 class="acquisition"> Pending orders </h2>
+ <form action="/cgi-bin/koha/acqui/acquire.pl">
+ <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" -->">
+
+ <b>Search ISBN or Title:</b> <input type="text" size="25" name="recieve">
+ </form>
+ <p>
+ <form action="" method="get" name="orderform">
+
+ <table>
+ <tr>
+ <th class="acquisition">BASKET</th>
+ <th class="acquisition">ISBN</th>
+ <th class="acquisition">TITLE</th>
+ <th class="acquisition">AUTHOR</th>
+ </tr>
+ <!-- TMPL_VAR NAME="countpending" -->
+ <!-- TMPL_LOOP NAME="loop_orders" -->
+ <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" -->&biblio=<!-- TMPL_VAR NAME="biblionumber" -->&invoice=<!-- TMPL_VAR NAME="invoice" -->&gst=<!-- TMPL_VAR NAME="gst" -->&freight=<!-- TMPL_VAR NAME="freight" -->&supplierid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="title" --></a></td>
+ <td><!-- TMPL_VAR NAME="author" --></td>
+ </tr>
+ <!-- /TMPL_LOOP -->
+ </table>
+ </div>
</div>
<!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->
Index: koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl
diff -u koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl:1.10.2.1 koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl:1.10.2.2
--- koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl:1.10.2.1 Tue Feb 14 17:07:24 2006
+++ koha/koha-tmpl/intranet-tmpl/default/en/acqui/recieveorder.tmpl Tue Feb 21 16:07:27 2006
@@ -53,7 +53,7 @@
<!-- TMPL_LOOP NAME="searchresults" -->
<tr>
<td <!-- TMPL_IF NAME="even" -->class="hilighted"<!-- /TMPL_IF -->>
- <a href="/cgi-bin/koha/acqui/receive.pl?type=intra&supplierid=<!-- TMPL_VAR NAME="supplierid" ESCAPE=URL -->&datereceived=<!-- TMPL_VAR NAME="datereceived" ESCAPE=URL -->"<!--TMPL_IF Name="code"-->&code=<!--TMPL_VAR Name="Code" ESCAPE=URL --><!--/TMPL_IF-->>
+ <a href="/cgi-bin/koha/acqui/receive.pl?type=intra&supplierid=<!-- TMPL_VAR NAME="supplierid" ESCAPE=URL -->&datereceived=<!-- TMPL_VAR NAME="datereceived" ESCAPE=URL --><!--TMPL_IF Name="code"-->&code=<!--TMPL_VAR Name="code" ESCAPE=URL --><!--/TMPL_IF-->">
<!-- TMPL_VAR NAME="number" -->
</a>
</td>
More information about the Koha-cvs
mailing list