fix: orderByBarcode - return order object only if found
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Fri, 8 Jan 2010 18:21:57 +0000 (18:21 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Fri, 8 Jan 2010 18:21:57 +0000 (18:21 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@410 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

www/inc/wext/order.php

index d2cc241..0033bd3 100644 (file)
@@ -156,7 +156,7 @@ class WOOrder extends WOOrderAbstract
                if(count($res)<1)
                        $res=$db->select("voucher","orderid","voucherid=".$db->escapeString($trans->getbarcode()));
                //find order
-               if(count($res)>=0)
+               if(count($res)>0)
                        $trans->setorder(WOOrder::fromTableorder(WTorder::getFromDB($res[0]["orderid"])));
        }