SdenService
in package
Class SdenService
Table of Contents
Properties
- $container : ContainerInterface
- $entityManager : EntityManagerInterface
- $logService : LogServiceInterface
- $productService : ProductService
- $saleProductService : SaleProductService|object
- $eventDispatcher : EventDispatcherInterface
- $saleLogService : SaleLogService
- $saleProductShipmentService : SaleProductShipmentService|object
- $saleProductShipmentTrackingService : SaleProductShipmentTrackingService
- $saleService : SaleService|object
- $sdenApi : SdenApi|object
- $userService : UserService
- $zpltoPdfService : ZplToPdfService|object
Methods
- __construct() : mixed
- Sden Service constructor.
- createSaleProductPreShipmentForSden() : bool
- createSaleProductShipment() : true
- generateSaleListEnvoi() : array<string|int, array<string|int, mixed>>|null
- saveSdenEtiquette() : array<string|int, string>
- sendExpeditionToSden() : mixed
- Send Expedition to sden
- createSaleProductShipmentRecord() : SaleProductShipment
- createSaleProductShipmentTrackingRecord() : void
- dispatchSaleProductsAfterTicketPrintedEvent() : void
- dispatchSaleProductsShippedEvent() : void
- finalizeSale() : void
- getRandomString() : string
- logShipment() : void
- processShipment() : void
- updateSaleProductStatus() : void
Properties
$container
protected
ContainerInterface
$container
$entityManager
protected
EntityManagerInterface
$entityManager
$logService
protected
LogServiceInterface
$logService
$productService
protected
ProductService
$productService
$saleProductService
protected
SaleProductService|object
$saleProductService
$eventDispatcher
private
EventDispatcherInterface
$eventDispatcher
$saleLogService
private
SaleLogService
$saleLogService
$saleProductShipmentService
private
SaleProductShipmentService|object
$saleProductShipmentService
$saleProductShipmentTrackingService
private
SaleProductShipmentTrackingService
$saleProductShipmentTrackingService
$saleService
private
SaleService|object
$saleService
$sdenApi
private
SdenApi|object
$sdenApi
$userService
private
UserService
$userService
$zpltoPdfService
private
ZplToPdfService|object
$zpltoPdfService
Methods
__construct()
Sden Service constructor.
public
__construct(ContainerInterface $container, EntityManagerInterface $entityManager, LogServiceInterface $logService, EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $container : ContainerInterface
- $entityManager : EntityManagerInterface
- $logService : LogServiceInterface
- $eventDispatcher : EventDispatcherInterface
createSaleProductPreShipmentForSden()
public
createSaleProductPreShipmentForSden(mixed $spId, mixed $noSuivi, mixed $userId[, mixed $ticketPath = null ][, mixed $sdenOrder = [] ]) : bool
Parameters
- $spId : mixed
- $noSuivi : mixed
- $userId : mixed
- $ticketPath : mixed = null
- $sdenOrder : mixed = []
Return values
boolcreateSaleProductShipment()
public
createSaleProductShipment(array<string|int, int> $saleProductIds[, int|string|null $userId = null ][, bool $logChanges = false ][, bool $notify = true ]) : true
Parameters
- $saleProductIds : array<string|int, int>
- $userId : int|string|null = null
- $logChanges : bool = false
- $notify : bool = true
Tags
Return values
truegenerateSaleListEnvoi()
public
generateSaleListEnvoi(mixed $sales, mixed $items[, array<string|int, mixed> $paletteNumber = [] ][, array<string|int, mixed> $ordersColisNumber = [] ][, null $fromDateTime = null ]) : array<string|int, array<string|int, mixed>>|null
Parameters
- $sales : mixed
- $items : mixed
- $paletteNumber : array<string|int, mixed> = []
- $ordersColisNumber : array<string|int, mixed> = []
- $fromDateTime : null = null
Tags
Return values
array<string|int, array<string|int, mixed>>|nullsaveSdenEtiquette()
public
saveSdenEtiquette(mixed $order) : array<string|int, string>
Parameters
- $order : mixed
Return values
array<string|int, string>sendExpeditionToSden()
Send Expedition to sden
public
sendExpeditionToSden(mixed $data) : mixed
Parameters
- $data : mixed
createSaleProductShipmentRecord()
private
createSaleProductShipmentRecord(SaleProduct $sp, mixed $user, DateTime $now) : SaleProductShipment
Parameters
- $sp : SaleProduct
- $user : mixed
- $now : DateTime
Tags
Return values
SaleProductShipmentcreateSaleProductShipmentTrackingRecord()
private
createSaleProductShipmentTrackingRecord(SaleProduct $sp, DateTime $now, SaleProductShipment $saleProductShipment) : void
Parameters
- $sp : SaleProduct
- $now : DateTime
- $saleProductShipment : SaleProductShipment
dispatchSaleProductsAfterTicketPrintedEvent()
private
dispatchSaleProductsAfterTicketPrintedEvent(SaleProductShipment $saleProductShipment) : void
Parameters
- $saleProductShipment : SaleProductShipment
dispatchSaleProductsShippedEvent()
private
dispatchSaleProductsShippedEvent(array<string|int, mixed> $saleProductIds) : void
Parameters
- $saleProductIds : array<string|int, mixed>
finalizeSale()
private
finalizeSale(Sale $sale, DateTime $now, bool $logChanges, mixed $user) : void
Parameters
- $sale : Sale
- $now : DateTime
- $logChanges : bool
- $user : mixed
Tags
getRandomString()
private
getRandomString(mixed $n) : string
Parameters
- $n : mixed
Return values
stringlogShipment()
private
logShipment(Sale $sale, bool $shipmentId, SaleProduct $sp, mixed $user) : void
Parameters
- $sale : Sale
- $shipmentId : bool
- $sp : SaleProduct
- $user : mixed
Tags
processShipment()
private
processShipment(SaleProduct $sp, Sale $sale, mixed $user, bool $notify) : void
Parameters
- $sp : SaleProduct
- $sale : Sale
- $user : mixed
- $notify : bool
Tags
updateSaleProductStatus()
private
updateSaleProductStatus(SaleProduct $sp, DateTime $now) : void
Parameters
- $sp : SaleProduct
- $now : DateTime