StockHandler

This class contains the functions to perform the following:

- Retrieve Stock

- Insert Stock

api
package simPROAPI
subpackage Inventory
author Nathan Muir
version 2011-07-18
todo complete functionality for each of the prototype functions

 Methods

StockListAll

ListAll(int $CompanyID, int $StorageDeviceID) : array
Static

This function lists all the stock in a particular storage device.

uses \StockHandler::RetrieveList()

Parameters

$CompanyID

int

the Company ID. In single company builds, this is 0.

$StorageDeviceID

int

The Storage Device to search in.

Returns

array

StockListAllDetail

ListAllDetail(int $CompanyID, int $StorageDeviceID) : array
Static

This function lists all the stock in a particular storage device.

uses \StockHandler::RetrieveList()

Parameters

$CompanyID

int

the Company ID. In single company builds, this is 0.

$StorageDeviceID

int

The Storage Device to search in.

Returns

array

StockRetrieve

Retrieve(int $CompanyID, int $StockID, int $StorageDeviceID) : array
StaticNot Implemented

This function retrieves details for a specific storage & stock id

uses \StockHandler::RetrieveList()

Parameters

$CompanyID

int

the Company ID. In single company builds, this is 0.

$StockID

int

the stock item to retrieve the stock level for

$StorageDeviceID

int

the storage device for which the level should be checked.

Returns

array

StockRetrieveList

RetrieveList(int $CompanyID, array $StorageStock) : array
StaticNot Implemented

This function retrieves the stock levels in the associated storage devices.

<?php
$StockStorage = array(
    44 => array(1234,456,234,33421,34343),
    32 => array(234,3434,34,5545,44),
    12 => array(2344324,4234,23,423,423,4)
);
?>
used_by \StockHandler::Search()
used_by \StockHandler::ListAll()
used_by \StockHandler::ListAllDetail()
used_by \StockHandler::SearchStock()
used_by \StockHandler::Retrieve()

Parameters

$CompanyID

int

the Company ID. In single company builds, this is 0.

$StorageStock

array

an associative array of StorageDeviceID to list of stock items.

Returns

array

StockRetrieveLowStockLevels

RetrieveLowStockLevels(int $CompanyID, int $StorageID) : array
Static

This function retrieves low stock level information for the provided Storage Device id

null $companyID

Parameters

$CompanyID

int

$StorageID

int

Returns

array

StockListAll

SearchStock(int $CompanyID, int $StorageDeviceID = 0) : array
StaticNot Implemented

This function lists all the stock in a particular storage device.

uses \StockHandler::RetrieveList()

Parameters

$CompanyID

int

the Company ID. In single company builds, this is 0.

$StorageDeviceID = 0

int

The Storage Device to search in.

Returns

array