// improve hasInvoice method

This commit is contained in:
aFolletete committed 2011-12-12 15:57:11 +00:00
1 parent ff0f55c8bc
commit 2ffa2ea399
1 file changed
+7 -3
+7 -3
View File
@@ -1589,10 +1589,14 @@ class OrderCore extends ObjectModel
*/ */
public function hasInvoice() public function hasInvoice()
{ {
return Db::getInstance()->getValue(' if (Db::getInstance()->getRow('
SELECT COUNT(*) SELECT *
FROM `'._DB_PREFIX_.'order_invoice` FROM `'._DB_PREFIX_.'order_invoice`
WHERE `id_order` = '.(int)$this->id); WHERE `id_order` = '.(int)$this->id.'
LIMIT 1')
)
return true;
return false;
} }
} }