Products_Stocktaking_Model
in package
Model class responsible for products stocktaking import.
Table of Contents
- $eanColumnSeq : int
- EAN/SKU column seq.
- $importKey : string
- Import temp key.
- $parseCsv : Csv
- Parse CSV instance.
- $path : string
- CSV file path.
- $qtyColumnSeq : int
- Qty column seq.
- $storage : int
- Storage id.
- analyzeFile() : array<string|int, mixed>
- Get file columns.
- compare() : array<string|int, mixed>
- Get file columns.
- getStorage() : array<string|int, string>
- Get active storages.
- import() : array<string|int, mixed>
- Import of stock adjustments.
- load() : self
- Load CSV file by request.
- loadByKey() : self
- Load CSV file by session key.
- updateStockInProduct() : array<string|int, mixed>
- Update stock (qtyinstock) in product.
- updateStockInStorage() : array<string|int, int>
- Update stock in storage (IGIN,IIDN).
- buildComment() : string
- Build comment.
- buildInventoryData() : array<string|int, mixed>
- Build inventory items data.
- getProducts() : array<string|int, mixed>
- Get all products stock.
Properties
$eanColumnSeq
EAN/SKU column seq.
private
int
$eanColumnSeq
$importKey
Import temp key.
private
string
$importKey
$parseCsv
Parse CSV instance.
private
Csv
$parseCsv
$path
CSV file path.
private
string
$path
$qtyColumnSeq
Qty column seq.
private
int
$qtyColumnSeq
$storage
Storage id.
private
int
$storage
Methods
analyzeFile()
Get file columns.
public
analyzeFile() : array<string|int, mixed>
Return values
array<string|int, mixed> —compare()
Get file columns.
public
compare(Request $request) : array<string|int, mixed>
Parameters
- $request : Request
Return values
array<string|int, mixed> —getStorage()
Get active storages.
public
static getStorage() : array<string|int, string>
Return values
array<string|int, string> —import()
Import of stock adjustments.
public
import(Request $request) : array<string|int, mixed>
Parameters
- $request : Request
Return values
array<string|int, mixed> —load()
Load CSV file by request.
public
static load(string $filePath) : self
Parameters
- $filePath : string
Return values
self —loadByKey()
Load CSV file by session key.
public
static loadByKey(string $importKey) : self
Parameters
- $importKey : string
Return values
self —updateStockInProduct()
Update stock (qtyinstock) in product.
public
updateStockInProduct() : array<string|int, mixed>
Return values
array<string|int, mixed> —updateStockInStorage()
Update stock in storage (IGIN,IIDN).
public
updateStockInStorage(string $name) : array<string|int, int>
Parameters
- $name : string
Return values
array<string|int, int> —buildComment()
Build comment.
private
buildComment(array<string|int, mixed> $row) : string
Parameters
- $row : array<string|int, mixed>
Return values
string —buildInventoryData()
Build inventory items data.
private
buildInventoryData(array<string|int, mixed> $rows, string $moduleName) : array<string|int, mixed>
Parameters
- $rows : array<string|int, mixed>
- $moduleName : string
Return values
array<string|int, mixed> —getProducts()
Get all products stock.
private
getProducts() : array<string|int, mixed>