// Fixed #PSCFV-2721
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{l s='Stock valuation:'}</td>
|
||||
<td>{$currency->prefix} {$warehouse_value} {$currency->suffix}</td>
|
||||
<td>{$warehouse_value}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@@ -425,7 +425,7 @@ class WarehouseCore extends ObjectModel
|
||||
public function getStockValue()
|
||||
{
|
||||
$query = new DbQuery();
|
||||
$query->select('SUM(s.`price_te`)');
|
||||
$query->select('SUM(s.`price_te` * s.`physical_quantity`)');
|
||||
$query->from('stock', 's');
|
||||
$query->where('s.`id_warehouse` = '.(int)$this->id);
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ class AdminWarehousesControllerCore extends AdminController
|
||||
'address' => $address,
|
||||
'shops' => $shops,
|
||||
'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(),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user