(bug #4207) receive shipment problem
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Wed, 17 Feb 2010 14:23:22 +0000 (15:23 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 8 Mar 2010 22:07:30 +0000 (23:07 +0100)
this change the way to get pending orders during shipment receive.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
C4/Acquisition.pm

index f84ac7e..3e274fe 100644 (file)
@@ -207,12 +207,13 @@ sub GetPendingOrders {
         LEFT JOIN borrowers ON aqbasket.authorisedby=borrowers.borrowernumber
         WHERE booksellerid=?
             AND datecancellationprinted IS NULL
-            AND (to_days(now())-to_days(closedate) < 180 OR closedate IS NULL)
     ";
     if($closed){
         $strsth .= "
         AND (quantity > quantityreceived OR quantityreceived is NULL) 
         AND closedate IS NOT NULL ";
+    }else{
+        $strsth .= "AND (to_days(now())-to_days(closedate) < 180 OR closedate IS NULL)";
     }
     ## FIXME  Why 180 days ???
     my @query_params = ( $supplierid );