mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Print stock entry labels also on inventory when adding products (closes #1713)
This commit is contained in:
@@ -855,7 +855,7 @@ class StockService extends BaseService
|
||||
return $this->getDatabase()->stock()->where('id', $entryId)->fetch();
|
||||
}
|
||||
|
||||
public function InventoryProduct(int $productId, float $newAmount, $bestBeforeDate, $locationId = null, $price = null, $shoppingLocationId = null, $purchasedDate = null)
|
||||
public function InventoryProduct(int $productId, float $newAmount, $bestBeforeDate, $locationId = null, $price = null, $shoppingLocationId = null, $purchasedDate = null, $stockLabelType = 0)
|
||||
{
|
||||
if (!$this->ProductExists($productId))
|
||||
{
|
||||
@@ -902,7 +902,7 @@ class StockService extends BaseService
|
||||
$bookingAmount = $newAmount;
|
||||
}
|
||||
|
||||
return $this->AddProduct($productId, $bookingAmount, $bestBeforeDate, self::TRANSACTION_TYPE_INVENTORY_CORRECTION, $purchasedDate, $price, $locationId, $shoppingLocationId);
|
||||
return $this->AddProduct($productId, $bookingAmount, $bestBeforeDate, self::TRANSACTION_TYPE_INVENTORY_CORRECTION, $purchasedDate, $price, $locationId, $shoppingLocationId, $unusedTransactionId, $stockLabelType);
|
||||
}
|
||||
elseif ($newAmount < $productDetails->stock_amount + $containerWeight)
|
||||
{
|
||||
|
Reference in New Issue
Block a user