SupplierOrderHandler
This class contains the functions to perform the following:
Retrieve:
api | |
---|---|
package | simPROAPI |
subpackage | Supplier |
author | Edgar Luzardo |
version | 2013-07-03 |
Insert(int $CompanyID, array $SupplierOrderDetails) : int
Currently only possible to create Catalogue orders.
<?php
$SupplierOrderDetails =
array(
"OrderStage"=>"Pending"|"Approved"|"Archived",//Required
"IssuedDate"=>"2010-01-01",
"DueDate"=>"2010-01-01",
"SupplierID"=>0,//Required
"SupplierQuoteID"=>0,
"Reference"=>"",
"Notes"=>"",
"StatusID" => 0,
"CustomFields"=>array(
"FieldName"=>value,
),
"StockItems"=>array(
array(
"StockItemID"=>0,//Required
"Quantity"=>0,//Required
"AmountExTax"=>0
"StorageDeviceID"=>0,
"JobNo"=>0,//0=Stock, Null=Order Default
"SectionCostCentreID"=>0//0=Stock, Null=Order Default
),
)
);>
int
the company id
array
an associative array of order information
int
LogSearch(int $CompanyID, int $OrderNo = null, string $StartDate = null, string $EndDate = null, int $StaffID = null, string $Search = '%', int $Limit = 1000, int $Offset = 0) : array
This function retrieves logs from Purchase Orders whether a specific number is supplied or not.
int
The Company ID. In single company builds, this is 0.
int
The Supplier Order Number to retrieve (Optional). Null/Empty will ignore this parameter.
string
Date start (inclusive) to search. Null/Empty will ignore this parameter.
string
Date end (inclusive) to search. Null/Empty will ignore this parameter.
int
The employee ID. Null/Empty will ignore this parameter.
string
The search text for the log message. Can use % for wildcards.
int
the total number of logs to return (0 - 1000)
int
how many results to skip, before returning {@link $Limit}
array
Retrieve(int $CompanyID, int $OrderID) : array
This function retrieves an order with a specific ID
uses | \SupplierOrderHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
int
the order id to retrieve
array
RetrieveApproved(int $CompanyID, string $StartDate = null, string $EndDate = null, array $Detail = null) : array
This function retrieves details of the approved supplier orders for a company
uses | \SupplierOrderHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
string
date start (inclusive) to search for the specified supplier order. Null/Empty will ignore this parameter. {@link http://php.net/manual/en/function.strtotime.php}
string
date end (inclusive) to search for the specified supplier order. Null/Empty will ignore this parameter. {@link http://php.net/manual/en/function.strtotime.php}
array
the detail to be returned about the supplier orders {@see SupplierOrderHandler::RetrieveList}
array
RetrieveList(int $CompanyID, array $SupplierOrderIDs, array $Detail = null) : array
This function retrieves details of the provided list of supplier orders
used_by | \SupplierOrderHandler::Search() |
---|---|
used_by | \SupplierOrderHandler::Retrieve() |
used_by | \SupplierOrderHandler::RetrieveApproved() |
used_by | \SupplierOrderHandler::RetrievePending() |
int
the Company ID. In single company builds, this is 0.
array
list of Supplier Order Numbers to search for.
array
the specification of which details to return - ("Allocations", "OrderReceiptIDs"). Null will return all details, empty array will return none.
array
RetrievePending(int $CompanyID, string $StartDate = null, string $EndDate = null, array $Detail = null) : array
This function retrieves details of the pending supplier orders for a company
uses | \SupplierOrderHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
string
date start (inclusive) to search for the specified supplier order. Null/Empty will ignore this parameter. {@link http://php.net/manual/en/function.strtotime.php}
string
date end (inclusive) to search for the specified supplier order. Null/Empty will ignore this parameter. {@link http://php.net/manual/en/function.strtotime.php}
array
the detail to be returned about the supplier orders {@see SupplierOrderHandler::RetrieveList}
array
Search(int $CompanyID, string $Search = '', string $StartDate = null, string $EndDate = null, array $Detail = null, string $Status = null) : array
This function searches for a list of supplier orders for a company
uses | \SupplierOrderHandler::RetrieveList() |
---|
int
the Company ID. In single company builds, this is 0.
string
the search text for the supplier order number or supplier name. Can use % for wildcards.
string
date start (inclusive) to search for the specified supplier order. Null/Empty will ignore this parameter. {@link http://php.net/manual/en/function.strtotime.php}
string
date end (inclusive) to search for the specified supplier order. Null/Empty will ignore this parameter. {@link http://php.net/manual/en/function.strtotime.php}
array
the detail to be returned about the supplier orders {@see SupplierOrderHandler::RetrieveList}
string
Retrieve based on Purchase Order Status
array
Update(int $CompanyID, int $SupplierOrderID, array $SupplierOrderDetails) : int
<?php
$SupplierOrderDetails =
array(
"OrderStage"=>"Pending"|"Approved"|"Archived",
"IssuedDate"=>"2010-01-01",
"DueDate"=>"2010-01-01",
"SupplierQuoteID"=>0,
"Reference"=>"",
"Notes"=>"",
"StatusID" => 0,
"CustomFields"=>array(
"FieldName"=>value,
),
"ClearItems"=>false,
"StockItems"=>array(
array(
"StockItemID"=>0,//Required
"Quantity"=>0,//Required
"AmountExTax"=>0
"StorageDeviceID"=>0,
"JobNo"=>0,//0=Stock, Null=Order Default
"SectionCostCentreID"=>0//0=Stock, Null=Order Default
),
)
);>
int
the company id
int
the order ID
array
an associative array of order information
int