// Fixed bug when associating Suppliers. Fixed StockCover

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11802 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2011-12-27 16:25:10 +00:00
parent 51377ddf02
commit 5c4e87777d
2 changed files with 16 additions and 9 deletions
@@ -159,7 +159,12 @@ class AdminStockCoverControllerCore extends AdminController
else // infinity
$data['coverage'] = '--';
$data['qty_sold'] = $this->getQuantitySold($data['id_product'], $data['id'], $this->getCurrentCoveragePeriod());
// computes quantity sold
$qty_sold = $this->getQuantitySold($data['id_product'], $data['id'], $this->getCurrentCoveragePeriod());
if (!$qty_sold)
$data['qty_sold'] = '--';
else
$data['qty_sold'] = $qty_sold;
}
echo Tools::jsonEncode(array('data'=> $datas, 'fields_display' => $this->fieldsDisplay));
@@ -236,7 +241,11 @@ class AdminStockCoverControllerCore extends AdminController
$item['coverage'] = '--';
// computes quantity sold
$item['qty_sold'] = $this->getQuantitySold($item['id'], 0, $this->getCurrentCoveragePeriod());
$qty_sold = $this->getQuantitySold($item['id'], 0, $this->getCurrentCoveragePeriod());
if (!$qty_sold)
$item['qty_sold'] = '--';
else
$item['qty_sold'] = $qty_sold;
// removes 'details' action on products without attributes
$this->addRowActionSkipList('details', array($item['id']));