[Koha-cvs] koha acqui/addorder.pl acqui/basket.pl acqui/bo... [rel_3_0]
Henri-Damien LAURENT
laurenthdl at alinto.com
Wed Dec 20 18:15:46 CET 2006
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_3_0
Changes by: Henri-Damien LAURENT <hdl> 06/12/20 17:15:45
Modified files:
acqui : addorder.pl basket.pl booksellers.pl
finishreceive.pl neworderbiblio.pl
neworderempty.pl
C4 : Acquisition.pm
koha-tmpl/intranet-tmpl/prog/en/acqui: basket.tmpl
booksellers.tmpl
neworderbiblio.tmpl
supplier.tmpl
Log message:
BugFixing : ordering should work well now provided zebraop is commented.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/addorder.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.33.2.2&r2=1.33.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/basket.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.34.2.1&r2=1.34.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/booksellers.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.2.2.3&r2=1.2.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/finishreceive.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.20.2.7&r2=1.20.2.8
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/neworderbiblio.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.4&r2=1.1.2.5
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/neworderempty.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.3&r2=1.1.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Acquisition.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.43.2.4&r2=1.43.2.5
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/basket.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.7.2.3&r2=1.7.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/booksellers.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.1&r2=1.1.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/neworderbiblio.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.2.2.2&r2=1.2.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/supplier.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.2.2.4&r2=1.2.2.5
Patches:
Index: acqui/addorder.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/addorder.pl,v
retrieving revision 1.33.2.2
retrieving revision 1.33.2.3
diff -u -b -r1.33.2.2 -r1.33.2.3
--- acqui/addorder.pl 18 Dec 2006 17:44:06 -0000 1.33.2.2
+++ acqui/addorder.pl 20 Dec 2006 17:15:45 -0000 1.33.2.3
@@ -315,4 +315,4 @@
$bibnum = $input->param('biblio');
DelOrder( $bibnum, $ordnum );
}
-print $input->redirect("basket.pl?basket=$basketno");
+print $input->redirect("basket.pl?basketno=$basketno");
Index: acqui/basket.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/basket.pl,v
retrieving revision 1.34.2.1
retrieving revision 1.34.2.2
diff -u -b -r1.34.2.1 -r1.34.2.2
--- acqui/basket.pl 18 Dec 2006 16:35:17 -0000 1.34.2.1
+++ acqui/basket.pl 20 Dec 2006 17:15:45 -0000 1.34.2.2
@@ -20,7 +20,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: basket.pl,v 1.34.2.1 2006/12/18 16:35:17 toins Exp $
+# $Id: basket.pl,v 1.34.2.2 2006/12/20 17:15:45 hdl Exp $
use strict;
use C4::Auth;
@@ -137,6 +137,7 @@
$sub_total += $line_total;
$qty_total += $results[$i]->{'quantity'};
my %line;
+ %line=%{$results[$i]};
if ( $toggle == 0 ) {
$line{color} = '#EEEEEE';
$toggle = 1;
@@ -145,22 +146,11 @@
$line{color} = 'white';
$toggle = 0;
}
- $line{ordernumber} = $results[$i]->{'ordernumber'};
- $line{publishercode} = $results[$i]->{'publishercode'};
- $line{isbn} = $results[$i]->{'isbn'};
- $line{booksellerid} = $results[$i]->{'booksellerid'};
$line{basketno} = $basketno;
- $line{title} = $results[$i]->{'title'};
- $line{notes} = $results[$i]->{'notes'};
- $line{author} = $results[$i]->{'author'};
$line{i} = $i;
- $line{rrp} = sprintf( "%.2f", $results[$i]->{'rrp'} );
- $line{ecost} = sprintf( "%.2f", $results[$i]->{'ecost'} );
- $line{quantity} = $results[$i]->{'quantity'};
- $line{quantityrecieved} = $results[$i]->{'quantityreceived'};
+ $line{rrp} = sprintf( "%.2f", $line{'rrp'} );
+ $line{ecost} = sprintf( "%.2f", $line{'ecost'} );
$line{line_total} = sprintf( "%.2f", $line_total );
- $line{biblionumber} = $results[$i]->{'biblionumber'};
- $line{bookfundid} = $results[$i]->{'bookfundid'};
$line{odd} = $i % 2;
push @books_loop, \%line;
}
Index: acqui/booksellers.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/booksellers.pl,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -u -b -r1.2.2.3 -r1.2.2.4
--- acqui/booksellers.pl 18 Dec 2006 16:35:17 -0000 1.2.2.3
+++ acqui/booksellers.pl 20 Dec 2006 17:15:45 -0000 1.2.2.4
@@ -20,7 +20,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: booksellers.pl,v 1.2.2.3 2006/12/18 16:35:17 toins Exp $
+# $Id: booksellers.pl,v 1.2.2.4 2006/12/20 17:15:45 hdl Exp $
=head1 NAME
@@ -85,7 +85,7 @@
# check if we have to "close" a basket before building page
my $op = $query->param('op');
-my $basket = $query->param('basket');
+my $basket = $query->param('basketno');
if ( $op eq 'close' ) {
CloseBasket($basket);
}
Index: acqui/finishreceive.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/finishreceive.pl,v
retrieving revision 1.20.2.7
retrieving revision 1.20.2.8
diff -u -b -r1.20.2.7 -r1.20.2.8
--- acqui/finishreceive.pl 18 Dec 2006 17:44:06 -0000 1.20.2.7
+++ acqui/finishreceive.pl 20 Dec 2006 17:15:45 -0000 1.20.2.8
@@ -177,10 +177,8 @@
$biblioitemnumber = &newbiblioitem($biblioitemhash);
#lets do a lookup on aqorders, with ordnum, then insert biblioitem fiels with new biblioitem number
-
&ModOrderBiblioNumber($biblioitemnumber,$ordnum, $biblionumber);
-
- else {
+ } else {
&modbiblio($bibliohash);
&modbibitem($biblioitemhash);
}
@@ -194,7 +192,7 @@
if ( $quantity != 0 ) {
# save the quantity recieved.
- receiveorder( $biblionumber, $ordnum, $quantrec, $user, $cost,
+ ModReceiveOrder( $biblionumber, $ordnum, $quantrec, $user, $cost,
$invoiceno, $freightperitem, $bookfund, $replacement );
# create items if the user has entered barcodes
@@ -251,7 +249,7 @@
$invoiceno =~
s/\&/\%26/g; # swapping pesky & with url friendly hex codes.
print $input->redirect(
- "/cgi-bin/koha/acqui/receive.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst&quantity=$quantity"
+ "/cgi-bin/koha/acqui/parcels.pl?code=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst&quantity=$quantity"
);
}
}
Index: acqui/neworderbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/Attic/neworderbiblio.pl,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -b -r1.1.2.4 -r1.1.2.5
--- acqui/neworderbiblio.pl 18 Dec 2006 16:35:17 -0000 1.1.2.4
+++ acqui/neworderbiblio.pl 20 Dec 2006 17:15:45 -0000 1.1.2.5
@@ -109,20 +109,15 @@
my $biblio = MARCmarc2koha(C4::Context->dbh,$marcrecord,'');
#build the hash for the template.
+ %resultsloop=%$biblio;
$resultsloop{highlight} = ($i % 2)?(1):(0);
- $resultsloop{title} = $biblio->{'title'};
- $resultsloop{subtitle} = $biblio->{'subtitle'};
- $resultsloop{biblionumber} = $biblio->{'biblionumber'};
- $resultsloop{author} = $biblio->{'author'};
- $resultsloop{publishercode} = $biblio->{'publishercode'};
- $resultsloop{publicationyear} = $biblio->{'publicationyear'};
push @results, \%resultsloop;
}
$template->param(
basketno => $basketno,
- bookselname => $booksellerid,
+ booksellerid => $booksellerid,
resultsloop => \@results,
total => $hits,
query => $query,
Index: acqui/neworderempty.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui/neworderempty.pl,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -b -r1.1.2.3 -r1.1.2.4
--- acqui/neworderempty.pl 18 Dec 2006 17:44:06 -0000 1.1.2.3
+++ acqui/neworderempty.pl 20 Dec 2006 17:15:45 -0000 1.1.2.4
@@ -102,14 +102,14 @@
# $ordnum=newordernum;
if ( $biblio && !$suggestionid ) {
- $data = bibdata($biblio);
+ $data = GetBiblioData($biblio);
}
# 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);
+ $data = GetBiblioData($biblio);
}
else {
$data = GetSuggestion($suggestionid);
@@ -122,7 +122,7 @@
}
}
else { #modify order
- $data = GetSingleOrder($ordnum);
+ $data = GetOrder($ordnum);
$biblio = $data->{'biblionumber'};
#get basketno and suppleirno. too!
my $data2 = GetBasket( $data->{'basketno'} );
Index: C4/Acquisition.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisition.pm,v
retrieving revision 1.43.2.4
retrieving revision 1.43.2.5
diff -u -b -r1.43.2.4 -r1.43.2.5
--- C4/Acquisition.pm 7 Dec 2006 16:45:43 -0000 1.43.2.4
+++ C4/Acquisition.pm 20 Dec 2006 17:15:45 -0000 1.43.2.5
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Acquisition.pm,v 1.43.2.4 2006/12/07 16:45:43 toins Exp $
+# $Id: Acquisition.pm,v 1.43.2.5 2006/12/20 17:15:45 hdl Exp $
use strict;
require Exporter;
@@ -30,7 +30,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.43.2.4 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.43.2.5 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
# used in receiveorder subroutine
# to provide library specific handling
@@ -221,6 +221,7 @@
AND datecancellationprinted IS NULL
AND (to_days(now())-to_days(closedate) < 180 OR closedate IS NULL)
";
+ ## FIXME Why 180 days ???
if ( C4::Context->preference("IndependantBranches") ) {
my $userenv = C4::Context->userenv;
if ( ($userenv) && ( $userenv->{flags} != 1 ) ) {
@@ -269,11 +270,13 @@
SELECT aqorderbreakdown.*,
biblio.*,biblioitems.*,
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
WHERE basketno=?
AND (datecancellationprinted IS NULL OR datecancellationprinted='0000-00-00')
";
@@ -284,7 +287,7 @@
$sth->execute($basketno);
my @results;
- # print $query;
+ warn $query;
while ( my $data = $sth->fetchrow_hashref ) {
push @results, $data;
}
@@ -942,7 +945,7 @@
# warn " $dbdriver";
if ( $dbdriver eq "mysql" ) {
$strsth = "
- SELECT aqbasket.basketno,
+ SELECT aqbasket.basketno,aqorders.ordernumber,
DATE(aqbasket.closedate) AS orderdate,
aqorders.quantity - IFNULL(aqorders.quantityreceived,0) AS quantity,
aqorders.rrp AS unitpricesupplier,
Index: koha-tmpl/intranet-tmpl/prog/en/acqui/basket.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/basket.tmpl,v
retrieving revision 1.7.2.3
retrieving revision 1.7.2.4
diff -u -b -r1.7.2.3 -r1.7.2.4
--- koha-tmpl/intranet-tmpl/prog/en/acqui/basket.tmpl 2 Nov 2006 17:41:37 -0000 1.7.2.3
+++ koha-tmpl/intranet-tmpl/prog/en/acqui/basket.tmpl 20 Dec 2006 17:15:45 -0000 1.7.2.4
@@ -3,20 +3,21 @@
<!-- TMPL_INCLUDE NAME="menus.inc" -->
<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
- <h1><!-- TMPL_UNLESS name="basketno" -->New <!-- /TMPL_UNLESS -->Shopping Basket <!-- TMPL_VAR NAME="basketno" --> for <a href="supplier.pl?id=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="name" --></a></h1>
+ <h1><!-- TMPL_UNLESS name="basketno" -->New <!-- /TMPL_UNLESS -->Shopping Basket <!-- TMPL_VAR NAME="basketno" --> for <a href="supplier.pl?supplierid=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="name" --></a></h1>
<div id="acqui_basket_summary">
<h2>Basket Details</h2>
- <p><label>Basket number</label><!-- TMPL_VAR NAME="basketno" --> </p>
- <p><label>Managed by</label><!-- TMPL_VAR NAME="authorisedbyname" --> </p>
- <p><label>Open on</label><!-- TMPL_VAR NAME="creationdate" --> </p>
- <p><label>For</label>Supplier Id <!-- TMPL_VAR NAME="booksellerid" --> </p>
- <p><label>Invoice number</label><!-- TMPL_VAR NAME="booksellerinvoicenumber" --> </p>
- <!-- TMPL_IF name="closedate" --><p><label>Closed On:</label> <!-- TMPL_VAR name="closedate" --></p><!-- /TMPL_IF -->
+ <p><label>Basket number </label> <!-- TMPL_VAR NAME="basketno" --> </p>
+ <p><label>Managed by </label> <!-- TMPL_VAR NAME="authorisedbyname" --> </p>
+ <p><label>Open on </label> <!-- TMPL_VAR NAME="creationdate" --> </p>
+ <p><label>For </label> Supplier Id <!-- TMPL_VAR NAME="booksellerid" --> </p>
+ <p><label>Invoice number </label><!-- TMPL_VAR NAME="booksellerinvoicenumber" --> </p>
+ <!-- TMPL_IF name="closedate" --><p><label>Closed On: </label> <!-- TMPL_VAR name="closedate" --></p><!-- /TMPL_IF -->
</table>
<!-- TMPL_UNLESS name="closedate" -->
<form action="/cgi-bin/koha/acqui/booksellers.pl" method="get">
<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
<input type="hidden" name="supplier" value="<!-- TMPL_VAR name="booksellerid" -->" />
+ <input type="hidden" name="op" value="close" />
<input type="submit" value="Close this Basket" />
</form>
<!-- /TMPL_UNLESS -->
@@ -71,7 +72,7 @@
<td><!-- TMPL_VAR NAME="ecost" --></td>
<td><!-- TMPL_VAR NAME="quantity" --></td>
<td><!-- TMPL_VAR NAME="line_total" --></td>
- <td><!-- TMPL_VAR NAME="bookfundid" --></td>
+ <td><!-- TMPL_VAR NAME="bookfundname" --></td>
<!-- TMPL_IF name="active" -->
<!-- TMPL_UNLESS name="closedate" -->
<td>
@@ -96,7 +97,13 @@
<th><!-- TMPL_VAR NAME="sub_total_est" --></th>
<th><!-- TMPL_VAR NAME="sub_total" --></td>
<th><!-- TMPL_VAR name="qty_total" --></th>
+ <!-- TMPL_IF name="active" -->
+ <!-- TMPL_IF name="closedate" -->
<td colspan="2" rowspan="3"> </td>
+ <!-- TMPL_ELSE -->
+ <td colspan="3" rowspan="3"> </td>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
</tr>
<tr>
Index: koha-tmpl/intranet-tmpl/prog/en/acqui/booksellers.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/booksellers.tmpl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- koha-tmpl/intranet-tmpl/prog/en/acqui/booksellers.tmpl 1 Nov 2006 21:21:31 -0000 1.1.2.1
+++ koha-tmpl/intranet-tmpl/prog/en/acqui/booksellers.tmpl 20 Dec 2006 17:15:45 -0000 1.1.2.2
@@ -46,12 +46,12 @@
<td>
<!-- TMPL_IF name="closedate" -->
closed on <!-- TMPL_VAR NAME="closedate" -->
- <a href="/cgi-bin/koha/acqui/basket.pl?basket=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
+ <a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
<!-- TMPL_ELSE -->
<!-- TMPL_IF name="active" -->
- <a href="/cgi-bin/koha/acqui/basket.pl?basket=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">modify</a>
+ <a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">modify</a>
<!-- TMPL_ELSE -->
- <a href="/cgi-bin/koha/acqui/basket.pl?basket=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
+ <a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</td>
Index: koha-tmpl/intranet-tmpl/prog/en/acqui/neworderbiblio.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/Attic/neworderbiblio.tmpl,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -u -b -r1.2.2.2 -r1.2.2.3
--- koha-tmpl/intranet-tmpl/prog/en/acqui/neworderbiblio.tmpl 30 Oct 2006 11:24:07 -0000 1.2.2.2
+++ koha-tmpl/intranet-tmpl/prog/en/acqui/neworderbiblio.tmpl 20 Dec 2006 17:15:45 -0000 1.2.2.3
@@ -36,7 +36,7 @@
<!-- TMPL_LOOP NAME="resultsloop" -->
<tr>
<td>
- <a href="/cgi-bin/koha/acqui/addorder.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" title="order this one !">
+ <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->&biblio=<!-- TMPL_VAR NAME="biblionumber" -->" title="order this one !">
<!-- TMPL_VAR NAME="title" -->
</a>
<br />
Index: koha-tmpl/intranet-tmpl/prog/en/acqui/supplier.tmpl
===================================================================
RCS file: /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/prog/en/acqui/supplier.tmpl,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -u -b -r1.2.2.4 -r1.2.2.5
--- koha-tmpl/intranet-tmpl/prog/en/acqui/supplier.tmpl 14 Dec 2006 15:41:54 -0000 1.2.2.4
+++ koha-tmpl/intranet-tmpl/prog/en/acqui/supplier.tmpl 20 Dec 2006 17:15:45 -0000 1.2.2.5
@@ -134,7 +134,7 @@
<a href="supplier.pl?supplierid=<!--TMPL_VAR Name="id"-->&op=enter">
Edit Supplier
</a>
- <a href="order.pl?supplier=<!--TMPL_VAR Name="name"-->">
+ <a href="parcel.pl?supplierid=<!--TMPL_VAR Name="id"-->">
Manage Orders
</a>
<a href="/cgi-bin/koha/acqui/orderreceive.pl?supplierid=<!--TMPL_VAR Name="id"-->">
More information about the Koha-cvs
mailing list