Class InvoiceListGenerator

Class InvoiceListGenerator

InvoiceListGenerator implements InvoiceListGeneratorInterface
Package: Invoice
Category: System
Located at Services/Core/Invoice/InvoiceListGenerator.inc.php

Methods summary

public __construct( CI_DB_query_builder $db, PaymentTitleProvider $paymentTitleProvider )

InvoiceListGenerator constructor.

public getInvoiceListByConditions( array $conditions = [], IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null ) : InvoiceListItemCollection

Returns an invoice list item collection by the given conditions. The other arguments helps to control fetched data.

public filterInvoiceList( array $filterParameters, IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null ) : InvoiceListItemCollection

Filter invoice list items by the provided parameters.

public filterInvoiceListCount( array $filterParameters ) : integer

Get the filtered invoice count.

protected _prepareCollection( array $resultArray ) : InvoiceListItemCollection

Prepares the InvoiceListItemCollection by the passed result array.

protected _createOrderAddressBlockByRow( string $type, array $row ) : OrderAddressBlock

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

protected _createMemoCollectionByCustomersId( integer $customersId ) : CustomerMemoCollection

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

protected _select( void ) :

Execute the select and join methods.

protected _invoicesColumns( void ) : string

Returns a string for the ::_select() method which contains column names of the invoices table.

protected _ordersColumns( void ) : string

Returns a string for the ::_select() method which contains column names of the orders table.

protected _ordersStatusColumns( void ) : string

Returns a string for the ::_select() method which contains column names of the orders_status table.

protected _limit( IntType $startIndex = null, IntType $maxCount = null ) :

Add limit configuration to the database object.

protected _order( StringType $orderBy = null ) :

Set the order by clause of the query.

protected _group( void ) : InvoiceListGenerator

Execute the group by statement.

protected _filter( array $filterParameters, IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null ) : CI_DB_result

Filter the invoice records.

protected _createOrderType( $class, $method ) : OrderPaymentType

Creates and returns payment type instance by the given class and method argument.

Properties summary

protected $db : CI_DB_query_builder

		
protected $defaultLanguageId : integer