Bugzilla – Attachment 22906 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.60 KB, created by
Jonathan Druart
on 2013-11-13 14:04:48 UTC
(
hide
)
Description:
Bug 11243: Supplier list should distinct canceled items
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-11-13 14:04:48 UTC
Size:
2.60 KB
patch
obsolete
>From 483c12a2f4b8655691ba13c68066bff56c757967 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. >--- > 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 aabc0ed..a9af527 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 3dae586..f5f044c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >@@ -115,7 +115,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.7.10.4
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