Logidav Docs

AvailabilityLogService
in package
implements AvailabilityLogServiceInterface

Table of Contents

Interfaces

AvailabilityLogServiceInterface
Interface AvailabilityServiceInterface

Properties

$categoryService  : ProductApi|object
$container  : ContainerInterface
$entityManager  : EntityManagerInterface
$logService  : LogServiceInterface
$productApi  : ProductApi|object
$productService  : ProductService
$mailerService  : MailerService|object

Methods

__construct()  : mixed
QueueService constructor.
afterSaleProductChangedProduct()  : mixed
afterSaleProductCreated()  : mixed
afterSaleProductQtyUpdate()  : mixed
afterSaleProductUpdatedFromSale()  : mixed
checkAndChangeProductAvailability()  : mixed
Check and change product availability
getRepo()  : AvailabilityLogRepository
logAvailabilityChange()  : AvailabilityLog
Logging availability
processSaleProduct()  : mixed
Checking product quantity and if the product has a quantity less than or equals to 2 we check if we have a container arrival if so we set the product availability to the next container arrival date and the minimum quantity to dispatch this change is set dynamically by category
save()  : AvailabilityLog
Save The Entity
sendStockAlert()  : bool
Send stock alert if product qty is above the threshold

Properties

Methods

__construct()

QueueService constructor.

public __construct(ContainerInterface $container, EntityManagerInterface $entityManager, LogServiceInterface $logService) : mixed
Parameters
$container : ContainerInterface
$entityManager : EntityManagerInterface
$logService : LogServiceInterface

checkAndChangeProductAvailability()

Check and change product availability

public checkAndChangeProductAvailability(Product $product, SaleProduct $saleProduct) : mixed
Parameters
$product : Product
$saleProduct : SaleProduct
Tags
throws
ConnectionException
throws
DBALException
throws
Exception

logAvailabilityChange()

Logging availability

public logAvailabilityChange(Product $product, mixed $oldAvailability, mixed $availability[, string $message = 'Mise à jour automatique de la date dispo' ][, null $user = null ]) : AvailabilityLog
Parameters
$product : Product
$oldAvailability : mixed
$availability : mixed
$message : string = 'Mise à jour automatique de la date dispo'
$user : null = null
Return values
AvailabilityLog

processSaleProduct()

Checking product quantity and if the product has a quantity less than or equals to 2 we check if we have a container arrival if so we set the product availability to the next container arrival date and the minimum quantity to dispatch this change is set dynamically by category

public processSaleProduct(mixed $saleProduct) : mixed
Parameters
$saleProduct : mixed
Tags
throws
DBALException
throws
Exception

sendStockAlert()

Send stock alert if product qty is above the threshold

private sendStockAlert(mixed $product, mixed $thresholdQty, mixed $newProductAvailability) : bool
Parameters
$product : mixed
$thresholdQty : mixed
$newProductAvailability : mixed
Return values
bool

        
On this page

Search results