UI test/review

This commit is contained in:
Bernd Bestel
2020-11-08 15:09:10 +01:00
parent 7d237867b5
commit d82fd09fba
80 changed files with 233 additions and 226 deletions

View File

@@ -549,8 +549,16 @@ class StockService extends BaseService
$lastPrice = $productLastPurchased->price;
$lastQuFactorPurchaseToStock = $productLastPurchased->qu_factor_purchase_to_stock;
$lastShoppingLocation = $productLastPurchased->shopping_location_id;
$avgPrice = $this->getDatabase()->products_average_price()->where('product_id', $productId)->fetch()->price;
$oldestPrice = $this->getDatabase()->products_oldest_stock_unit_price()->where('product_id', $productId)->fetch()->price;
$avgPriceRow = $this->getDatabase()->products_average_price()->where('product_id', $productId)->fetch();
if ($avgPriceRow)
{
$avgPrice = $avgPriceRow->price;
}
$oldestPriceRow = $this->getDatabase()->products_oldest_stock_unit_price()->where('product_id', $productId)->fetch();
if ($oldestPriceRow)
{
$oldestPrice = $avgPriceRow->price;
}
}
$product = $this->getDatabase()->products($productId);