VirService
in package
Class VirService
Table of Contents
Constants
- SFTP_PATH_Write = 'IN'
Properties
- $container : ContainerInterface
- $configSFtpVir : mixed
- $ediHistoryService : EdiHistoryService
- $entityManager : EntityManagerInterface
- $eventDispatcher : EventDispatcherInterface
- $logService : LogServiceInterface
- $saleLogService : SaleLogService
- $saleProductService : SaleProductService
- $saleProductShipmentService : SaleProductShipmentService
- $saleProductShipmentTrackingService : SaleProductShipmentTrackingService
- $saleService : SaleService
- $sftp : Ftp
- $userService : UserService
Methods
- __construct() : mixed
- addOrderToVir() : mixed
- connectSftp() : false|SFTP
- connectToFtp() : Ftp|false
- connectToSftpVirEndOfJourney() : mixed
- createFileVir() : string
- createSaleProductShipment() : true
- createVirPreExpeditionForSale() : array<string|int, mixed>
- generateVirCsvLigne() : void
- getVirShippingPrice() : float|int
- sendEndOfJourneyEmail() : void
- sendFileEndOfJournyyToSftp() : bool
- createSaleProductShipmentRecord() : SaleProductShipment
- createSaleProductShipmentTrackingRecord() : void
- dispatchSaleProductsAfterTicketPrintedEvent() : void
- dispatchSaleProductsShippedEvent() : void
- finalizeSale() : void
- logShipment() : void
- processShipment() : void
- updateSaleProductStatus() : void
Constants
SFTP_PATH_Write
public
mixed
SFTP_PATH_Write
= 'IN'
Properties
$container
protected
ContainerInterface
$container
$configSFtpVir
private
mixed
$configSFtpVir
$ediHistoryService
private
EdiHistoryService
$ediHistoryService
$entityManager
private
EntityManagerInterface
$entityManager
$eventDispatcher
private
EventDispatcherInterface
$eventDispatcher
$logService
private
LogServiceInterface
$logService
$saleLogService
private
SaleLogService
$saleLogService
$saleProductService
private
SaleProductService
$saleProductService
$saleProductShipmentService
private
SaleProductShipmentService
$saleProductShipmentService
$saleProductShipmentTrackingService
private
SaleProductShipmentTrackingService
$saleProductShipmentTrackingService
$saleService
private
SaleService
$saleService
$sftp
private
Ftp
$sftp
$userService
private
UserService
$userService
Methods
__construct()
public
__construct(EntityManagerInterface $entityManager, ContainerInterface $container, EventDispatcherInterface $eventDispatcher, LogServiceInterface $logService, EdiHistoryService $ediHistoryService) : mixed
Parameters
- $entityManager : EntityManagerInterface
- $container : ContainerInterface
- $eventDispatcher : EventDispatcherInterface
- $logService : LogServiceInterface
- $ediHistoryService : EdiHistoryService
addOrderToVir()
public
addOrderToVir(mixed $exportFile, mixed $order, mixed $nbTotalForOrder, mixed $siret) : mixed
Parameters
- $exportFile : mixed
- $order : mixed
- $nbTotalForOrder : mixed
- $siret : mixed
connectSftp()
public
connectSftp() : false|SFTP
Return values
false|SFTPconnectToFtp()
public
connectToFtp() : Ftp|false
Return values
Ftp|falseconnectToSftpVirEndOfJourney()
public
connectToSftpVirEndOfJourney() : mixed
createFileVir()
public
createFileVir(array<string|int, Sale> $orders, array<string|int, mixed> $shipIds) : string
Parameters
- $orders : array<string|int, Sale>
- $shipIds : array<string|int, mixed>
Return values
stringcreateSaleProductShipment()
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
truecreateVirPreExpeditionForSale()
public
createVirPreExpeditionForSale(mixed $orderId, mixed $orderItemId, mixed $token) : array<string|int, mixed>
Parameters
- $orderId : mixed
- $orderItemId : mixed
- $token : mixed
Tags
Return values
array<string|int, mixed>generateVirCsvLigne()
public
generateVirCsvLigne(mixed $saleProduct, mixed $order, mixed &$packagesTotalV2) : void
Parameters
- $saleProduct : mixed
- $order : mixed
- $packagesTotalV2 : mixed
getVirShippingPrice()
public
getVirShippingPrice(mixed $itemWeight[, int $qty = 1 ]) : float|int
Parameters
- $itemWeight : mixed
- $qty : int = 1
Return values
float|intsendEndOfJourneyEmail()
public
sendEndOfJourneyEmail(string $type[, string $filePath = null ]) : void
Parameters
- $type : string
- $filePath : string = null
-
The path of the file to be attached to the email
sendFileEndOfJournyyToSftp()
public
sendFileEndOfJournyyToSftp(mixed $filePath) : bool
Parameters
- $filePath : mixed
Tags
Return values
boolcreateSaleProductShipmentRecord()
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
logShipment()
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