// stock management : Supplier order is now supply order, employee and product is now historized for sttock movements and supply order

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10121 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dSevere
2011-11-14 18:58:02 +00:00
parent 35150997c7
commit 5719c43481
20 changed files with 656 additions and 570 deletions
+5 -1
View File
@@ -72,6 +72,8 @@ class StockManagerCore implements StockManagerInterface
'last_wa' => null,
'current_wa' => null,
'id_employee' => $context->employee->id,
'employee_firstname' => $context->employee->firstname,
'employee_lastname' => $context->employee->lastname,
'sign' => 1
);
@@ -257,6 +259,8 @@ class StockManagerCore implements StockManagerInterface
'last_wa' => $stock->price_te,
'current_wa' => $stock->price_te,
'id_employee' => $context->employee->id,
'employee_firstname' => $context->employee->firstname,
'employee_lastname' => $context->employee->lastname,
'sign' => -1
);
$stock_params = array(
@@ -583,7 +587,7 @@ class StockManagerCore implements StockManagerInterface
*/
protected function calculateWA($stock, $quantity, $price_te)
{
return ((($stock->physical_quantity * $stock->price_te) + ($quantity * $price_te)) / ($stock->physical_quantity + $quantity));
return (float)Tools::ps_round(((($stock->physical_quantity * $stock->price_te) + ($quantity * $price_te)) / ($stock->physical_quantity + $quantity)), 6);
}
/**