Bug 14535: Update the supplier filter too
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 6 Feb 2017 09:29:44 +0000 (10:29 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Fri, 21 Apr 2017 10:06:30 +0000 (12:06 +0200)
The combobox on the left side of late orders is filled by sub
GetBooksellersWithLateOrders. The same change as in the first patch
must be made here to include suppliers with late orders without a
price.

Bonus: Sort the list.

Test plan:
[1] Run t/db_dependent/Bookseller.t.
[2] Go to late orders. Use the filter on suppliers.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b76eac9ca2c32a5db51b9b8ca32a2cf4fa6397b5)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 92ddd4bbc7f3f40241202ae19750e93d5ee2d30b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

C4/Bookseller.pm
acqui/lateorders.pl

index e37eab7..b565907 100644 (file)
@@ -77,8 +77,6 @@ sub GetBooksellersWithLateOrders {
             OR datereceived IS NULL
             OR aqorders.quantityreceived < aqorders.quantity
             )
-            AND aqorders.rrp <> 0
-            AND aqorders.ecost <> 0
             AND aqorders.quantity - COALESCE(aqorders.quantityreceived,0) <> 0
             AND aqbasket.closedate IS NOT NULL
     ";
index bf45e30..2aeedff 100755 (executable)
@@ -135,7 +135,7 @@ push @parameters, $estimateddeliverydateto_dt
 my %supplierlist = GetBooksellersWithLateOrders(@parameters);
 
 my (@sloopy);  # supplier loop
-foreach (keys %supplierlist){
+foreach( sort { $supplierlist{$a} cmp $supplierlist{$b} } keys %supplierlist ) {
        push @sloopy, (($booksellerid and $booksellerid eq $_ )            ?
                                        {id=>$_, name=>$supplierlist{$_}, selected=>1} :
                                        {id=>$_, name=>$supplierlist{$_}} )            ;