ContractorHandler
This class contains the functions to perform the following:
api | |
---|---|
package | simPROAPI |
subpackage | Staff |
author | Nathan Muir, Michael West, Daniel Sanders [add other contributors] |
version | 2011-08-15 |
uses | \global\StaffHandler |
uses | \global\InvoiceHandler |
used-by | AccPayContactHandler |
AttachmentsRetrieve(int $CompanyID, int $ContractorStaffID) : array
This function retrieves the list of attachemnts for the provided contractor id
uses | \StaffHandler::RetrieveAttachments() |
---|
int
the Company ID. In single company builds, this is 0.
int
The contractor staff member to retrieve attachments for
array
Insert(int $CompanyID, array $ContractorDetails) : int
<?php
array_keys($ContractorDetails) == array(
"CompanyName",
"MailAddress",
"MailSuburb",
"MailState",
"MailPostcode",
"MailCountry",
"Phone1",
"Mobile",
"Fax",
"Email",
"TaxNumber",
"AccountName",
"BSB",
"AccountNo",
"PaymentTerm",
"PaymentTermType",
"Tax"
);
?>
int
the company id
array
an associative array of supplier information.
int
LicencesRetrieve(int $CompanyID, int $ContractorStaffID) : array
This function retrieves licences for the provided employee id
uses | \StaffHandler::RetrieveLicences() |
---|
int
the Company ID. In single company builds, this is 0.
int
The contractor to retrieve licences for
array
LicencesSearch(int $CompanyID, string $Search = '') : array
This function retrieves licences for all employees under a company
int
the Company ID. In single company builds, this is 0.
string
The search string for the licence name.
array
Retrieve(mixed $CompanyID, int $ContractorStaffID) : array
This function retrieves a contractor with a specific ID
uses | \ContractorHandler::RetrieveList() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
int
the contractor's staff id.
array
RetrieveList(mixed $CompanyID, array $ContractorStaffIDs, array $Detail = array()) : array
This function retrieves details on the provided list of contractor ids
used_by | \AccPayContactHandler::Search() |
---|---|
used_by | \AccPayContactHandler::Retrieve() |
used_by | \AccPayContactHandler::RetrieveExport() |
used_by | \AccPayContactHandler::RetrieveAll() |
used_by | \StaffHandler::RetrieveList() |
used_by | \ContractorHandler::Search() |
used_by | \ContractorHandler::SearchFields() |
used_by | \ContractorHandler::RetrieveStaff() |
used_by | \ContractorHandler::Retrieve() |
used_by | \InventoryJournalHandler::RetrieveExport() |
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
array
list of Contractor Staff ID's to retrieve.
array
the specification of which details to return - ("Zones","Departments","Companies","BillRates"). Null/Empty/Empty array will return none.
array
RetrieveStaff(mixed $CompanyID, int $ContractorID) : array
This function retrieves a list of staff under a contractor company.
uses | \ContractorHandler::RetrieveList() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
int
the ContractorID to retreive their staff for.
array
Search(mixed $CompanyID, string $Search = '%', array $Detail = array()) : array
This function retrieve's a list of contractor who's company name matches the search term.
uses | \ContractorHandler::RetrieveList() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
string
The search text for the contractor company name. Can use % for wildcards.
array
the specification of which details to return - ("Zones","Departments","Companies","Billing"). Null/Empty/Empty array will return none.
array
SearchFields(mixed $CompanyID, array $SearchTerms) : array
This function retrieve's a list of contractors who's set of fields match their associated values
Implemented Search Terms are: CompanyName,ContactName,Zone,ZoneName,Export
uses | \ContractorHandler::RetrieveList() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
array
An associative array of Search Fields[key] and their search terms [value]
array
TotalCount(mixed $CompanyID) : int
This function retrieves the total number of contractors in the system
used_by | \AccPayContactHandler::TotalCount() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
int
Update(int $CompanyID, int $ContractorStaffID, array $ContractorDetails) : bool
<?php
array_keys($ContractorDetails) == array(
"CompanyName",
"MailAddress",
"MailSuburb",
"MailState",
"MailPostcode",
"Country",
"Phone1",
"Mobile",
"Fax",
"Email",
"id",
"Active",
"TaxNumber",
"AccountName",
"bsb",
"AccountNo",
"PaymentTerm",
"PaymentTermType"
);
?>
int
the company id
int
The contractor id to update with the supplied information
array
an associative array of contractor information.
bool