// Fixed #PSCFV-2721
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user