InvoiceListGenerator

Implements \InvoiceListGeneratorInterface

Class InvoiceListGenerator

category

System

package

Invoice

Methods

InvoiceListGenerator constructor.

__construct(\CI_DB_query_builder $db) 

Arguments

$db

\CI_DB_query_builder

Creates and returns a customer memo collection by the given customers id.

_createMemoCollectionByCustomersId(integer $customersId) : \CustomerMemoCollection
Todo

Equal to OrderListGenerator::_createMemoCollectionByCustomersId() method. Maybe outsource in abstract parent.

Arguments

$customersId

integer

Id of customer.

Response

\CustomerMemoCollection

Creates an order address block object by the given type and row_array (looped result of CIDB::result_array())

_createOrderAddressBlockByRow(string $type, array $row) : \OrderAddressBlock
Todo

Equal to OrderListGenerator::_createOrderAddressBlockByRow() method. Maybe outsource in abstract parent.

Arguments

$type

string

Whether delivery or billing.

$row

array

Array which contain data about an order result row.

Response

\OrderAddressBlock

Creates an order status array by the given order id.

_createOrderStatusArrayByOrderId(integer $orderId) : array

The returned array is associative and contains the keys orders_status and orders_status_name.

Arguments

$orderId

integer

orders_id of expected entry.

Response

array

Contains the order status id and name.

Add limit configuration to the database object.

_limit(\IntType $startIndex = null, \IntType $maxCount = null) : $this|\InvoiceListGenerator
Todo

Equal to OrderListGenerator::_limit() method. Maybe outsource in abstract parent.

Arguments

$startIndex

\IntType

$maxCount

\IntType

Response

$this|\InvoiceListGenerator

Returns the instance object for method chaining.

Set the order by clause of the query.

_order(\StringType $orderBy = null) : $this|\InvoiceListGenerator
Todo

Equal to OrderListGenerator::_order() method. Maybe outsource in abstract parent.

Arguments

$orderBy

\StringType

Response

$this|\InvoiceListGenerator

Returns the instance object for method chaining.

Prepares the InvoiceListItemCollection by the passed result array.

_prepareCollection(array $resultArray) : \InvoiceListItemCollection

Arguments

$resultArray

array

Result array with fetched invoice data.

Response

\InvoiceListItemCollection

Execute the select and join methods.

_select() : $this|\InvoiceListGenerator

Response

$this|\InvoiceListGenerator

Returns the instance object for method chaining.

Returns an invoice list item collection by the given conditions.

getInvoiceListByConditions(array $conditions = array(), \IntType|null $startIndex = null, \IntType|null $maxCount = null, \StringType|null $orderBy = null) : \InvoiceListItemCollection

The other arguments helps to control fetched data.

Arguments

$conditions

array

(Optional) Conditions for tht where clause.

$startIndex

\IntType|null

(Optional) Start index for the limit clause.

$maxCount

\IntType|null

(Optional) Max count for the limit clause.

$orderBy

\StringType|null

(Optional) Sort order of fetched data.

Response

\InvoiceListItemCollection

Properties

db

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder