Bugzilla – Attachment 21953 Details for
Bug 9808
Show basketgroup information for each basket in basket list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Bug 9808: Show basketgroup information in baskets list on bookseller page
0001-new.patch (text/plain), 3.44 KB, created by
Mathieu Saby
on 2013-10-10 19:23:41 UTC
(
hide
)
Description:
[PATCH] Bug 9808: Show basketgroup information in baskets list on bookseller page
Filename:
MIME Type:
Creator:
Mathieu Saby
Created:
2013-10-10 19:23:41 UTC
Size:
3.44 KB
patch
obsolete
>From d3000c0091ff77095430e9a891e91a6720b2327a Mon Sep 17 00:00:00 2001 >From: Mathieu Saby <mathieu.saby@univ-rennes2.fr> >Date: Thu, 10 Oct 2013 21:18:39 +0200 >Subject: [PATCH] Bug 9808: Show basketgroup information in baskets list on bookseller page >Content-Type: text/plain; charset="utf-8" > >This patch adds a column for basketgroup information in the list of basket displayed for each bookseller. > >To test : >1. display the list of baskets of a bookseller, with some baskets included in basketgroups, and some other not >2. check a new column "Basket group" appears >3. If the basket belongs to a basket group, the following information must be displayed in new column : "Basketgroupname (basketgroupnumber)" >4. If the basket does not belong to a basket group, the new column must be void > >--- > C4/Acquisition.pm | 8 +++++--- > .../prog/en/modules/acqui/booksellers.tt | 2 ++ > 2 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index ed9c215..1dca2e2 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -590,7 +590,8 @@ sub GetBasketsInfosByBookseller { > my $dbh = C4::Context->dbh; > my $query = qq{ > SELECT aqbasket.*, >- SUM(aqorders.quantity) AS total_items, >+ aqbasketgroups.name as basketgroupname, >+ SUM(aqorders.quantity) AS total_items, > COUNT(DISTINCT aqorders.biblionumber) AS total_biblios, > SUM( > IF(aqorders.datereceived IS NULL >@@ -600,9 +601,10 @@ sub GetBasketsInfosByBookseller { > ) AS expected_items > FROM aqbasket > LEFT JOIN aqorders ON aqorders.basketno = aqbasket.basketno >- WHERE booksellerid = ?}; >+ LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid = aqbasketgroups.id >+ WHERE aqbasket.booksellerid = ?}; > if(!$allbaskets) { >- $query.=" AND (closedate IS NULL OR (aqorders.quantity > aqorders.quantityreceived AND datecancellationprinted IS NULL))"; >+ $query.=" AND (aqbasket.closedate IS NULL OR (aqorders.quantity > aqorders.quantityreceived AND datecancellationprinted IS NULL))"; > } > $query.=" GROUP BY aqbasket.basketno"; > >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 3dae586..6234d8f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >@@ -97,6 +97,7 @@ $(document).ready(function() { > <tr> > <th>No.</th> > <th>Name</th> >+ <th>Basket group</th> > <th>Item count</th> > <th>Biblio count</th> > <th>Items expected</th> >@@ -115,6 +116,7 @@ $(document).ready(function() { > [% END %] > <td>[% basket.basketno %]</td> > <td>[% basket.basketname %]</td> >+ <td>[% basket.basketgroupname %] ([% basket.basketgroupid %])</td> > <td>[% basket.total_items %]</td> > <td>[% basket.total_biblios %]</td> > <td>[% basket.expected_items %]</td> >-- >1.7.9.5 >
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 9808
: 21953