SupplierHandler
This class contains the functions to perform the following:
Retrieve:
api | |
---|---|
package | simPROAPI |
subpackage | Supplier |
author | Nathan Muir, Michael West, Daniel Sanders [add other contributors] |
version | 2011-07-18 |
BranchInsert(int $CompanyID, int $SupplierID, array $SupplierBranchDetails) : bool
<?php
array_keys($SupplierBranchDetails) == array(
"Name",
"PhoneNumber",
"Mobile",
"Fax",
"Email",
"MailAddress",
"MailSuburb",
"MailState",
"MailPostcode",
"MailCountry"
);
?>
int
the company id
int
the supplier to add the branch to.
array
an associative array of supplier branches' information.
bool
BranchRetrieve(int $CompanyID, int $SupplierID) : array
uses | \SupplierHandler::BranchRetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
int
the supplier id, to retrieve Supplier Branchs for
array
BranchRetrieveList(int $CompanyID, array $SupplierIDs) : array
used_by | \SupplierHandler::BranchRetrieve() |
---|
int
the Company ID. In single company builds, this is 0.
array
list of Supplier ID's to retrieve Supplier Branchs for
array
ContactInsert(int $CompanyID, int $SupplierID, array $SupplierContactDetails) : bool
<?php
array_keys($SupplierContactDetails) == array(
"Name",
"Position",
"PhoneNumber",
"Mobile",
"Fax",
"Email"
);
?>
int
the company id
int
the supplier to add the contact to.
array
an associative array of supplier contacts' information.
bool
ContactRetrieve(int $CompanyID, int $SupplierID) : array
uses | \SupplierHandler::ContactRetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
int
the supplier id, to retrieve Supplier Contacts for
array
ContactRetrieveList(int $CompanyID, array $SupplierIDs) : array
used_by | \SupplierHandler::ContactRetrieve() |
---|
int
the Company ID. In single company builds, this is 0.
array
list of Supplier ID's to retrieve Supplier Contacts for
array
Insert(int $CompanyID, array $SupplierDetails) : int
<?php
array_keys($SupplierDetails) == array(
"SupplierName",
"MailAddress",
"MailSuburb",
"MailState",
"MailPostcode",
"MailCountry",
"HomeAddress",
"HomeSuburb",
"HomeState",
"HomePostcode",
"HomeCountry",
"Phone1",
"Fax",
"Email",
"PaymentTerm",
"PaymentTermType",
"Website",
"Notes",
"TaxNumber",
"SupplierAccountNo",
"AccountName",
"BSB",
"AccountNo",
"Tax",
"Currency"
);
?>
int
the company id
array
an associative array of supplier information.
int
Retrieve(int $CompanyID, int $SupplierID) : array
This function retrieves a supplier with a specific ID
uses | \SupplierHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
int
the supplier id
array
RetrieveList(int $CompanyID, array $SupplierIDs) : array
This function retrieves details on the provided list of supplier ids
used_by | \AccPayContactHandler::Retrieve() |
---|---|
used_by | \AccPayContactHandler::RetrieveExport() |
used_by | \AccPayContactHandler::RetrieveAll() |
used_by | \SupplierHandler::Search() |
used_by | \SupplierHandler::Retrieve() |
int
the Company ID. In single company builds, this is 0.
array
list of Supplier ID's to retrieve.
array
Search(int $CompanyID, string $Search = '%', int $Limit = 500, int $Offset = 0) : array
This function retrieve's a list of suppliers who's name matches the search term.
uses | \SupplierHandler::RetrieveList() |
---|---|
used_by | \AccPayContactHandler::Search() |
int
the Company ID. In single company builds, this is 0.
string
The search text for the supplier. Can use % for wildcards.
int
the total number of suppliers to return (0 - 500)
int
how many results to skip, before returning {@link $Limit}
array
TotalCount(int $CompanyID) : array
This function returns the total number of Suppliers that are not archived
used_by | \AccPayContactHandler::TotalCount() |
---|
int
the Company ID. In single company builds, this is 0.
array
Update(int $CompanyID, int $SupplierID, array $SupplierDetails) : bool
<?php
array_keys($SupplierDetails) == array(
"SupplierName",
"MailAddress",
"MailSuburb",
"MailState",
"MailPostcode",
"MailCountry",
"HomeAddress",
"HomeSuburb",
"HomeState",
"HomePostcode",
"HomeCountry",
"Phone1",
"Fax",
"Email",
"PaymentTerm",
"PaymentTermType",
"Website",
"Notes",
"Active",
"TaxNumber",
"SupplierAccountNo",
"AccountName",
"BSB",
"AccountNo",
"Tax",
"Currency"
);
?>
int
the company id
int
The supplier id to update with the supplied information
array
an associative array of supplier information.
bool