Bugzilla – Attachment 18214 Details for
Bug 9824
Hide basket with no expected items in basket list by bookseller
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9824: Followup for removing filter
Bug-9824-Followup-for-removing-filter.patch (text/plain), 3.86 KB, created by
Marcel de Rooy
on 2013-05-17 17:11:42 UTC
(
hide
)
Description:
Bug 9824: Followup for removing filter
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-05-17 17:11:42 UTC
Size:
3.86 KB
patch
obsolete
>From 15238b7f7835c578c43e4ce1fa9460776621d852 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 17 May 2013 19:01:06 +0200 >Subject: [PATCH] Bug 9824: Followup for removing filter >Content-Type: text/plain; charset=utf-8 > >Adds allbaskets parameter to GetBasketsInfosByBookseller. (Only used in booksellers.pl now) >Normally, all 'active' baskets are shown. With allbaskets=1 all baskets :) >In the template I had to rename a loop var supplier to supplier1 to resolve >name conflict between template vars. >In the template I added the string: Cancel filter. >Note that this string is already translated: >#. INPUT type=submit >#: intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt:349 >msgid "Cancel filter" >msgstr "" >Hope this helps. >--- > C4/Acquisition.pm | 12 +++++++----- > acqui/booksellers.pl | 3 ++- > .../prog/en/modules/acqui/booksellers.tt | 5 +++-- > 3 files changed, 12 insertions(+), 8 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 2bbb21c..a570a73 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -578,7 +578,7 @@ Returns in a arrayref of hashref all about booksellers baskets, plus: > =cut > > sub GetBasketsInfosByBookseller { >- my ($supplierid) = @_; >+ my ($supplierid, $allbaskets) = @_; > > return unless $supplierid; > >@@ -595,10 +595,12 @@ sub GetBasketsInfosByBookseller { > ) AS expected_items > FROM aqbasket > LEFT JOIN aqorders ON aqorders.basketno = aqbasket.basketno >- WHERE booksellerid = ? AND ( aqorders.quantity > aqorders.quantityreceived OR quantityreceived IS NULL) >- AND datecancellationprinted IS NULL >- GROUP BY aqbasket.basketno >- }; >+ WHERE booksellerid = ?}; >+ if(!$allbaskets) { >+ $query.=" AND (closedate IS NULL OR (aqorders.quantity > aqorders.quantityreceived AND datecancellationprinted IS NULL))"; >+ } >+ $query.=" GROUP BY aqbasket.basketno"; >+ > my $sth = $dbh->prepare($query); > $sth->execute($supplierid); > return $sth->fetchall_arrayref({}); >diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl >index f6c7b2e..118034b 100755 >--- a/acqui/booksellers.pl >+++ b/acqui/booksellers.pl >@@ -75,6 +75,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > #parameters > my $supplier = $query->param('supplier'); > my $booksellerid = $query->param('booksellerid'); >+my $allbaskets= $query->param('allbaskets')||0; > my @suppliers; > > if ($booksellerid) { >@@ -106,7 +107,7 @@ my $userbranch = $userenv->{branch}; > my $loop_suppliers = []; > > for my $vendor (@suppliers) { >- my $baskets = GetBasketsInfosByBookseller( $vendor->{id} ); >+ my $baskets = GetBasketsInfosByBookseller( $vendor->{id}, $allbaskets ); > > my $loop_basket = []; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >index 9aaf34e..9b38ac5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >@@ -56,12 +56,13 @@ $(document).ready(function() { > [% UNLESS (count == 1) %] > <p>Choose a vendor in the list to jump directly to the right place. > <select id="supplierlist"> >- [% FOREACH supplier IN loop_suppliers %] >- <option value="[% supplier.booksellerid %]">[% supplier.name %]</option> >+ [% FOREACH supplier1 IN loop_suppliers %] >+ <option value="[% supplier1.booksellerid %]">[% supplier1.name %]</option> > [% END %] > </select> > </p> > [% END %] >+ <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&allbaskets=1">Cancel filter</a></p> > <div id="acqui_order_supplierlist"> > [% FOREACH supplier IN loop_suppliers %] > <div class="supplier"> >-- >1.7.7.6
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9824
:
16168
|
16639
|
18168
|
18184
|
18214
|
18215
|
18219
|
18220
|
18221
|
18311
|
18312
|
18313
|
18332
|
18336
|
18348
|
18506