[-] MO mailalerts : infinite coverage (-1) is taken into account when sending coverage e-mails

#PNM-1563
#PNM-1597
This commit is contained in:
Fabio Chelly
2013-07-19 17:36:51 +02:00
parent 95122e8849
commit 5825dda836
+1 -2
View File
@@ -540,8 +540,7 @@ class MailAlerts extends Module
$coverage = StockManagerFactory::getManager()->getProductCoverage($id_product, $id_product_attribute, $warning_coverage, $id_warehouse);
// if we need to send a notification
if ($product->active == 1 &&
($coverage < $warning_coverage) && !empty($this->_merchant_mails) &&
if ($product->active == 1 && $coverage !== -1 && ($coverage < $warning_coverage) && !empty($this->_merchant_mails) &&
Configuration::getGlobalValue('MA_MERCHANT_COVERAGE'))
{
$id_lang = (int)Context::getContext()->language->id;