Logidav Docs

UpdateProductContainersUnitStockValueCommand extends ContainerAwareCommand uses LockableTrait

FinalYes

Class ProductStockValueCommand

Table of Contents

Properties

$currencyService  : CurrencyService|null
$dbConnection  : Connection
$em  : EntityManagerInterface
$manufacturerStockValueService  : ManufacturerStockValueService|null
$productStockValueService  : ProductStockValueService

Methods

__construct()  : mixed
ProductStockValueCommand constructor.
configure()  : mixed
Configure command
execute()  : mixed
getLatestContainerUnitStockValueForProduct()  : float|null
Retrieves the most recent stock value per unit for a product's container
updateProductContainerBuyingPrice()  : bool
Updates the container buying price for a product in the database

Properties

Methods

getLatestContainerUnitStockValueForProduct()

Retrieves the most recent stock value per unit for a product's container

private getLatestContainerUnitStockValueForProduct(int $productId) : float|null
Parameters
$productId : int

The ID of the product to get the container unit stock value for

Return values
float|null

Returns the latest container unit stock value if found, null otherwise

updateProductContainerBuyingPrice()

Updates the container buying price for a product in the database

private updateProductContainerBuyingPrice(int $productId, float $unitValue) : bool
Parameters
$productId : int

The ID of the product to update

$unitValue : float

The new unit value to set

Return values
bool

Returns true if update was successful


        
On this page

Search results