@@ -, +, @@ canceled items - 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 +++ .../prog/en/modules/acqui/booksellers.tt | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) --- a/C4/Acquisition.pm +++ a/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 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ -115,7 +115,12 @@ $(document).ready(function() { [% END %] [% basket.basketno %] [% basket.basketname %] - [% basket.total_items %] + + [% basket.total_items %] + [% IF basket.total_items_cancelled %] + ([% basket.total_items_cancelled %] cancelled) + [% END %] + [% basket.total_biblios %] [% basket.expected_items %] --