// Fixed #PSCFV-2721

This commit is contained in:
bMancone
2012-06-07 10:22:08 +00:00
parent 0839cddc50
commit d26a3ee057
3 changed files with 3 additions and 3 deletions
@@ -69,7 +69,7 @@
</tr> </tr>
<tr> <tr>
<td>{l s='Stock valuation:'}</td> <td>{l s='Stock valuation:'}</td>
<td>{$currency->prefix} {$warehouse_value} {$currency->suffix}</td> <td>{$warehouse_value}</td>
</tr> </tr>
</table> </table>
</fieldset> </fieldset>
+1 -1
View File
@@ -425,7 +425,7 @@ class WarehouseCore extends ObjectModel
public function getStockValue() public function getStockValue()
{ {
$query = new DbQuery(); $query = new DbQuery();
$query->select('SUM(s.`price_te`)'); $query->select('SUM(s.`price_te` * s.`physical_quantity`)');
$query->from('stock', 's'); $query->from('stock', 's');
$query->where('s.`id_warehouse` = '.(int)$this->id); $query->where('s.`id_warehouse` = '.(int)$this->id);
@@ -413,7 +413,7 @@ class AdminWarehousesControllerCore extends AdminController
'address' => $address, 'address' => $address,
'shops' => $shops, 'shops' => $shops,
'warehouse_num_products' => $warehouse->getNumberOfProducts(), 'warehouse_num_products' => $warehouse->getNumberOfProducts(),
'warehouse_value' => Tools::ps_round($warehouse->getStockValue(), 2), 'warehouse_value' => Tools::displayPrice(Tools::ps_round($warehouse->getStockValue(), 2), $currency),
'warehouse_quantities' => $warehouse->getQuantitiesofProducts(), 'warehouse_quantities' => $warehouse->getQuantitiesofProducts(),
); );