View | Details | Raw Unified | Return to bug 9808
Collapse All | Expand All

(-)a/C4/Acquisition.pm (-3 / +5 lines)
Lines 590-596 sub GetBasketsInfosByBookseller { Link Here
590
    my $dbh = C4::Context->dbh;
590
    my $dbh = C4::Context->dbh;
591
    my $query = qq{
591
    my $query = qq{
592
        SELECT aqbasket.*,
592
        SELECT aqbasket.*,
593
          SUM(aqorders.quantity) AS total_items,
593
         aqbasketgroups.name as basketgroupname,
594
         SUM(aqorders.quantity) AS total_items,
594
          COUNT(DISTINCT aqorders.biblionumber) AS total_biblios,
595
          COUNT(DISTINCT aqorders.biblionumber) AS total_biblios,
595
          SUM(
596
          SUM(
596
            IF(aqorders.datereceived IS NULL
597
            IF(aqorders.datereceived IS NULL
Lines 600-608 sub GetBasketsInfosByBookseller { Link Here
600
          ) AS expected_items
601
          ) AS expected_items
601
        FROM aqbasket
602
        FROM aqbasket
602
          LEFT JOIN aqorders ON aqorders.basketno = aqbasket.basketno
603
          LEFT JOIN aqorders ON aqorders.basketno = aqbasket.basketno
603
        WHERE booksellerid = ?};
604
          LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid = aqbasketgroups.id
605
        WHERE aqbasket.booksellerid = ?};
604
    if(!$allbaskets) {
606
    if(!$allbaskets) {
605
        $query.=" AND (closedate IS NULL OR (aqorders.quantity > aqorders.quantityreceived AND datecancellationprinted IS NULL))";
607
        $query.=" AND (aqbasket.closedate IS NULL OR (aqorders.quantity > aqorders.quantityreceived AND datecancellationprinted IS NULL))";
606
    }
608
    }
607
    $query.=" GROUP BY aqbasket.basketno";
609
    $query.=" GROUP BY aqbasket.basketno";
608
610
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt (-1 / +2 lines)
Lines 97-102 $(document).ready(function() { Link Here
97
                                <tr>
97
                                <tr>
98
                                    <th>No.</th>
98
                                    <th>No.</th>
99
                                    <th>Name</th>
99
                                    <th>Name</th>
100
                                    <th>Basket group</th>
100
                                    <th>Item count</th>
101
                                    <th>Item count</th>
101
                                    <th>Biblio count</th>
102
                                    <th>Biblio count</th>
102
                                    <th>Items expected</th>
103
                                    <th>Items expected</th>
Lines 115-120 $(document).ready(function() { Link Here
115
                                    [% END %]
116
                                    [% END %]
116
                                        <td>[% basket.basketno %]</td>
117
                                        <td>[% basket.basketno %]</td>
117
                                        <td>[% basket.basketname %]</td>
118
                                        <td>[% basket.basketname %]</td>
119
                                        <td>[% basket.basketgroupname %] ([% basket.basketgroupid %])</td>
118
                                        <td>[% basket.total_items %]</td>
120
                                        <td>[% basket.total_items %]</td>
119
                                        <td>[% basket.total_biblios %]</td>
121
                                        <td>[% basket.total_biblios %]</td>
120
                                        <td>[% basket.expected_items %]</td>
122
                                        <td>[% basket.expected_items %]</td>
121
- 

Return to bug 9808