Class InvoiceListGenerator
Class InvoiceListGenerator
-
InvoiceListGenerator
implements
InvoiceListGeneratorInterface
Methods summary
public
|
#
__construct( CI_DB_query_builder $db )
InvoiceListGenerator constructor.
InvoiceListGenerator constructor.
Parameters
|
public
InvoiceListItemCollection
|
#
getInvoiceListByConditions( array $conditions = [], IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null )
Returns an invoice list item collection by the given conditions.
The other arguments helps to control fetched data.
Returns an invoice list item collection by the given conditions.
The other arguments helps to control fetched data.
Parameters
- $conditions
- (Optional) Conditions for tht where clause.
- $startIndex
- (Optional) Start index for the limit clause.
- $maxCount
- (Optional) Max count for the limit clause.
- $orderBy
- (Optional) Sort order of fetched data.
Returns
Implementation of
|
protected
InvoiceListItemCollection
|
#
_prepareCollection( array $resultArray )
Prepares the InvoiceListItemCollection by the passed result array.
Prepares the InvoiceListItemCollection by the passed result array.
Parameters
- $resultArray
- Result array with fetched invoice data.
Returns
|
protected
array
|
#
_createOrderStatusArrayByOrderId( integer $orderId )
Creates an order status array by the given order id.
The returned array is associative and contains the
keys orders_status and orders_status_name.
Creates an order status array by the given order id.
The returned array is associative and contains the
keys orders_status and orders_status_name.
Parameters
- $orderId
- orders_id of expected entry.
Returns
array Contains the order status id and name.
|
protected
OrderAddressBlock
|
#
_createOrderAddressBlockByRow( string $type, array $row )
Creates an order address block object by the given type and row_array (looped result of CIDB::result_array())
Creates an order address block object by the given type and row_array (looped result of CIDB::result_array())
Parameters
- $type
- Whether delivery or billing.
- $row
- Array which contain data about an order result row.
Returns
Todo
Equal to OrderListGenerator::_createOrderAddressBlockByRow() method. Maybe outsource in abstract parent.
|
protected
CustomerMemoCollection
|
#
_createMemoCollectionByCustomersId( integer $customersId )
Creates and returns a customer memo collection by the given customers id.
Creates and returns a customer memo collection by the given customers id.
Parameters
- $customersId
- Id of customer.
Returns
Todo
Equal to OrderListGenerator::_createMemoCollectionByCustomersId() method. Maybe outsource in abstract
parent.
|
protected
|
#
_select( )
Execute the select and join methods.
Execute the select and join methods.
Returns
$this|InvoiceListGenerator Returns the instance object for method chaining.
|
protected
|
#
_limit( IntType $startIndex = null, IntType $maxCount = null )
Add limit configuration to the database object.
Add limit configuration to the database object.
Parameters
Returns
$this|InvoiceListGenerator Returns the instance object for method chaining.
Todo
Equal to OrderListGenerator::_limit() method. Maybe outsource in abstract parent.
|
protected
|
#
_order( StringType $orderBy = null )
Set the order by clause of the query.
Set the order by clause of the query.
Parameters
Returns
$this|InvoiceListGenerator Returns the instance object for method chaining.
Todo
Equal to OrderListGenerator::_order() method. Maybe outsource in abstract parent.
|