From aa708232fe172e8a346ad1b30aee28eb250655e0 Mon Sep 17 00:00:00 2001
From: Paul Poulain
Date: Tue, 23 Jun 2009 15:06:51 +0200
Subject: [PATCH] partial fix for mantis #1498
---
C4/Acquisition.pm | 6 +-
acqui/uncertainprice.pl | 5 +-
.../prog/en/includes/acquisitions-toolbar.inc | 6 +-
.../prog/en/modules/acqui/basket.tmpl | 6 +-
.../prog/en/modules/acqui/uncertainprice.tmpl | 88 +++++++++----------
5 files changed, 62 insertions(+), 49 deletions(-)
diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm
index ca98ec4f34..43024b3a7c 100644
--- a/C4/Acquisition.pm
+++ b/C4/Acquisition.pm
@@ -651,7 +651,7 @@ Results are ordered from most to least recent.
=cut
sub GetPendingOrders {
- my ($supplierid,$grouped,$owner) = @_;
+ my ($supplierid,$grouped,$owner,$basketno) = @_;
my $dbh = C4::Context->dbh;
my $strsth = "
SELECT ".($grouped?"count(*),":"")."aqbasket.basketno,
@@ -680,6 +680,10 @@ sub GetPendingOrders {
$strsth .= " AND aqbasket.authorisedby=? ";
push @query_params, $userenv->{'number'};
}
+ if ($basketno) {
+ $strsth .= " AND aqbasket.basketno=? ";
+ push @query_params, $basketno;
+ }
$strsth .= " group by aqbasket.basketno" if $grouped;
$strsth .= " order by aqbasket.basketno";
diff --git a/acqui/uncertainprice.pl b/acqui/uncertainprice.pl
index e897498a91..f50a1b74c2 100755
--- a/acqui/uncertainprice.pl
+++ b/acqui/uncertainprice.pl
@@ -67,12 +67,13 @@ my ($template, $loggedinuser, $cookie)
});
my $booksellerid = $input->param('booksellerid');
+my $basketno = $input->param('basketno');
my $op = $input->param('op');
my $owner = $input->param('owner') || 0 ; # flag to see only "my" orders, or everyone orders
my $bookseller = &GetBookSellerFromId($booksellerid);
#show all orders that have uncertain price for the bookseller
-my $pendingorders = &GetPendingOrders($booksellerid,0,$owner);
+my $pendingorders = &GetPendingOrders($booksellerid,0,$owner,$basketno);
my @orders;
foreach my $order (@{$pendingorders}) {
@@ -83,6 +84,8 @@ foreach my $order (@{$pendingorders}) {
$order->{'bibpublicationyear'} = $bibdata->{'publicationyear'};
$order->{'bibtitle'} = $bibdata->{'title'};
$order->{'bibauthor'} = $bibdata->{'author'};
+ $order->{'surname'} = $order->{'surname'};
+ $order->{'firstname'} = $order->{'firstname'};
my $order_as_from_db=GetOrder($order->{ordernumber});
$order->{'quantity'} = $order_as_from_db->{'quantity'};
$order->{'listprice'} = $order_as_from_db->{'listprice'};
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc
index 5b77b9307c..28cfd1aaa1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc
@@ -19,7 +19,11 @@
{ text: _("Baskets"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid="},
{ text: _("Basket grouping"), url: "/cgi-bin/koha/acqui/basketgroup.pl?booksellerid="},
{ text: _("Receive shipments"), url: "/cgi-bin/koha/acqui/parcels.pl?supplierid=" },
- { text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=&owner=1"}
+
+ { text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=&basketno=&owner=1"}
+
+ { text: _("Uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=&owner=1"}
+
]
new YAHOO.widget.Button("newbasket");
new YAHOO.widget.Button("editsupplier");
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
index 555c2946a3..1bef2906e0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
@@ -69,7 +69,11 @@
?op=del_basket&basketno=&booksellerid=" class="button" id="delbasketbutton">Delete this basket
- &owner=1" class="button" id="uncertpricesbutton">Uncertain prices
+
+ &basketno=&owner=1" class="button" id="uncertpricesbutton">Uncertain prices
+
+ &owner=1" class="button" id="uncertpricesbutton">Uncertain prices
+
Close this basket
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tmpl
index 582aba6005..d9ad59cf98 100755
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tmpl
@@ -23,48 +23,27 @@ function check(form) {
?booksellerid=">
Orders with uncertain prices for vendor "> &op=enter">(edit)
-
- ">View everyone orders
-
- &owner=1">View only my orders
-
Contact information
- Postal address:
-
-
- Address 1:
-
-
-
- Address 2:
-
-
-
- Address 3:
-
-
-
- Address 4:
-
-
- Telephone:
-
- Fax:
+
Address:
+
+
+
+
+
+ ">
+
+ Phone:
+ / Fax:
- Web:
- ">
- - Contact:
- - Name:
- - Position:
- - Telephone:
-
- - Alternate phone:
-
- - e-mail:
-
- - notes:
-
+ - Contact:
+
-
+
+
+
+
+
+
Notes:
@@ -74,25 +53,44 @@ function check(form) {
+