|
|
@@ -923,6 +923,8 @@ class ProductClass extends BaseClass
|
|
|
$avCost = bcdiv($lastCost, $lastStock, 2);
|
|
|
}else{
|
|
|
$avCost = 0;
|
|
|
+ $lastStock = 0;
|
|
|
+ $lastCost = 0;
|
|
|
}
|
|
|
$productData->avCost = $avCost;
|
|
|
$productData->totalCost = $lastCost;
|
|
|
@@ -984,6 +986,8 @@ class ProductClass extends BaseClass
|
|
|
$avCost = bcdiv($lastCost, $lastStock, 2);
|
|
|
}else{
|
|
|
$avCost = 0;
|
|
|
+ $lastStock = 0;
|
|
|
+ $lastCost=0;
|
|
|
}
|
|
|
$productData->avCost = $avCost;
|
|
|
$productData->totalCost = $lastCost;
|