Documentation

InventoryStock extends Base
in package

Synchronize inventory stock class.

Table of Contents

$config  : Config
Config.
$controller  : Controller
Controller.
$lastScan  : array<string|int, mixed>
Last scan config data.
$product  : int
Product id.
$storageId  : int
Storage id.
$connector  : Token
Connector.
__construct()  : mixed
Constructor.
findAdditionalData()  : array<string|int, mixed>
Parse additional data.
findProduct()  : int
Find product id by ean.
getFormattedTime()  : string
Return parsed time to magento time zone.
getStockFromProducts()  : array<string|int, mixed>
Get stock from products.
getStockFromStorage()  : array<string|int, mixed>
Get stock from storage.
log()  : void
Add log to db.
parseInventoryData()  : array<string|int, mixed>
Parse inventory data to YetiForce format.
parseShippingData()  : array<string|int, mixed>
Parse shipping data.
process()  : void
Main function.
saveInventoryCrm()  : bool
Save inventory elements.

Properties

$lastScan

Last scan config data.

public array<string|int, mixed> $lastScan = []

Methods

__construct()

Constructor.

public __construct(Controller $controller) : mixed
Parameters
$controller : Controller
Return values
mixed

findAdditionalData()

Parse additional data.

public findAdditionalData(Inventory $mapModel) : array<string|int, mixed>
Parameters
$mapModel : Inventory
Return values
array<string|int, mixed>

findProduct()

Find product id by ean.

public findProduct(string $ean) : int
Parameters
$ean : string
Return values
int

getFormattedTime()

Return parsed time to magento time zone.

public getFormattedTime(string $value) : string
Parameters
$value : string
Return values
string

getStockFromProducts()

Get stock from products.

public getStockFromProducts() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStockFromStorage()

Get stock from storage.

public getStockFromStorage() : array<string|int, mixed>
Return values
array<string|int, mixed>

log()

Add log to db.

public log(string $category[, Throwable|null $ex = null ]) : void
Parameters
$category : string
$ex : Throwable|null = null
Return values
void

parseInventoryData()

Parse inventory data to YetiForce format.

public parseInventoryData(Vtiger_Record_Model $recordModel, array<string|int, mixed> $item, Inventory $mapModel) : array<string|int, mixed>
Parameters
$recordModel : Vtiger_Record_Model
$item : array<string|int, mixed>
$mapModel : Inventory
Return values
array<string|int, mixed>

parseShippingData()

Parse shipping data.

public parseShippingData(Inventory $mapModel) : array<string|int, mixed>
Parameters
$mapModel : Inventory
Return values
array<string|int, mixed>

process()

Main function.

public process() : void
Return values
void

        

Search results