Commit bd51e5fe authored by Gregory Roussac's avatar Gregory Roussac

[-] CORE : #PSCSX-4331, double payment when invoices disabled

parent 09564125
......@@ -1912,8 +1912,8 @@ class OrderCore extends ObjectModel
if ($res = (int)Db::getInstance()->getvalue('
SELECT `id_order_invoice`
FROM `'._DB_PREFIX_.'order_invoice`
WHERE `id_order` = '.(int)$this->id.'
AND `number` > 0'));
WHERE `id_order` = '.(int)$this->id.
(Configuration::get('PS_INVOICE') ? ' AND `number` > 0' : '')))
return $res;
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment