UOMHandler

This class contains the functions to perform the following:

  • Retrieve, Insert and Update Units of Measurements (UOMs)

api
package simPROAPI
subpackage Materials
author Edgar Luzardo
version 2013-05-24
uses \global\

 Methods

UOMInsert

Insert(int $CompanyID, array $UOMDetails) : int
Static
<?php
array_keys($UOMDetails) == array(
                                "UOMName",
                                "WholeItemOnly"
                                );
?>

Parameters

$CompanyID

int

the company id

$UOMDetails

array

an associative array of uom information.

Returns

int

UOMRetrieve

Retrieve(mixed $CompanyID, int $UOMID) : array
Static

This function retrieves a uom with a specific ID

uses \UOMHandler::RetrieveList()

Parameters

$CompanyID

mixed

the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.

$UOMID

int

uom id

Returns

array

UOMRetrieveList

RetrieveList(mixed $CompanyID, array $UOMIDs) : array
Static

This function retrieves details on the provided list of uom ids

used_by \UOMHandler::Search()
used_by \UOMHandler::SearchFields()
used_by \UOMHandler::Retrieve()

Parameters

$CompanyID

mixed

the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.

$UOMIDs

array

list of UOM ID's to retrieve.

Returns

array

UOMSearchFields

SearchFields(mixed $CompanyID, array $SearchTerms) : array
Static

This function retrieves a list of UOMs whose set of fields match their associated values

Implemented Search Terms are: WholeItemOnly

uses \UOMHandler::RetrieveList()

Parameters

$CompanyID

mixed

the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.

$SearchTerms

array

an associative array of Search Fields[key] and their search terms [value]

Returns

array

UOMUpdate

Update(int $CompanyID, int $UOMID, array $UOMDetails) : bool
Static
<?php
array_keys($UOMDetails) == array(
                                "UOMName",
                                "WholeItemOnly"
                                );
?>

Parameters

$CompanyID

int

the company id

$UOMID

int

the uom id to update with the supplied information

$UOMDetails

array

an associative array of employee information.

Returns

bool