Bugzilla – Attachment 23844 Details for
Bug 11243
Supplier list counts all items, even canceled ones
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11243: Supplier list should distinct canceled items
Bug-11243-Supplier-list-should-distinct-canceled-i.patch (text/plain), 2.70 KB, created by
Chris Cormack
on 2013-12-29 03:08:21 UTC
(
hide
)
Description:
Bug 11243: Supplier list should distinct canceled items
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-12-29 03:08:21 UTC
Size:
2.70 KB
patch
obsolete
>From cb97757a5a4e1c921f7bb7920a89fb7a8c757f70 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 13 Nov 2013 14:57:55 +0100 >Subject: [PATCH] Bug 11243: Supplier list should distinct canceled items > >On the supplier result list, the "Item count" columns contain the sum of >all items ordered for a basket. But if an order is canceled, the item >count is not really meaningful. > >This patch just adds, in parenthesis, the number of items canceled. > >Test plan: >- create a basket and 3 orders with different number of items >- cancel 1 order >- verify on the supplier list that the number of items is correct and > the number of canceled items is correct too. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > C4/Acquisition.pm | 3 +++ > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt | 7 ++++++- > 2 files changed, 9 insertions(+), 1 deletion(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 1bf41cb..c3ed536 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -638,6 +638,9 @@ sub GetBasketsInfosByBookseller { > my $query = qq{ > SELECT aqbasket.*, > SUM(aqorders.quantity) AS total_items, >+ SUM( >+ IF ( aqorders.orderstatus = 'cancelled', aqorders.quantity, 0 ) >+ ) AS total_items_cancelled, > COUNT(DISTINCT aqorders.biblionumber) AS total_biblios, > SUM( > IF(aqorders.datereceived IS NULL >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 3fa12e2..1e90ebf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >@@ -116,7 +116,12 @@ $(document).ready(function() { > [% END %] > <td>[% basket.basketno %]</td> > <td>[% basket.basketname %]</td> >- <td>[% basket.total_items %]</td> >+ <td> >+ [% basket.total_items %] >+ [% IF basket.total_items_cancelled %] >+ ([% basket.total_items_cancelled %] cancelled) >+ [% END %] >+ </td> > <td>[% basket.total_biblios %]</td> > <td>[% basket.expected_items %]</td> > <td> >-- >1.8.5.2
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 11243
:
22906
|
22946
|
23050
|
23051
|
23844
|
23845
|
23846
|
27318
|
27319
|
27320