this change the way to get pending orders during shipment receive.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
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 );