PrebuildHandler
This class contains the functions to perform the following:
api | |
---|---|
package | simPROAPI |
subpackage | Materials |
author | Nathan Muir |
version | 2011-07-18 |
Insert(int $CompanyID, array $PrebuildDetails) : int
<?php
$PrebuildDetails = array(
"PrebuildType" => "Standard"|"SetPrice",
"PrebuildGroupID" => 0,
"PrebuildSubGroupID" => 0,
"Name" => "",
"PartNo" => "",
"Notes" => "",
"MaterialCost" => 0,
"MaterialMarkup" => 0,
"EstimatedTime" => 0,
"LabourRateID" => 0,
"LabourMarkup" => 0,
"Price" => 0,
"StockItems" => array(0 => array("StockItemID" => 0, "Qty" => 0, "FitTimeID" => 0),
"CustomFields" => array(Name => Value)
);
?>
int
the Company ID. In single company builds, this is 0.
array
associate array of prebuild data
int
Retrieve(int $CompanyID, int $PrebuildID) : array
This function retrieves details for a specific details id
uses | \PrebuildHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
int
the Prebuild Group id to retrieve details for
array
RetrieveList(int $CompanyID, array $PrebuildIDs) : array
This function retrieves details on the provided list of Prebuild Item ids
used_by | \PrebuildHandler::Search() |
---|---|
used_by | \PrebuildHandler::SearchExact() |
used_by | \PrebuildHandler::Retrieve() |
int
the Company ID. In single company builds, this is 0.
array
the Prebuild Item ids to retrieve details for
array
Search(int $CompanyID, string $SearchText = "", int $PrebuildGroupID = null, int $PrebuildSubGroupID = null, int $Limit = 1000, int $Offset = 0) : array
This function searches the prebuilds for item with a name. Use % for wildcards
uses | \PrebuildHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
string
the text to search the name and part no for
int
the prebuild group to search in
int
the sub group to search in
int
how many results to return
int
how many results to skip, before returning {@link $Limit}
array
SearchExact(int $CompanyID, string $Search, int $PrebuildGroupID = null, int $PrebuildSubGroupID = null) : array
This function searches the prebuild for item which matches exactly the name or part no
uses | \PrebuildHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
string
the text to match the name, prebuild no, or search terms for
int
the prebuild group to search in
int
the sub group to search in
array