<?php

namespace Modules\Invoices\BalancesAuto;

use \App\Mvc\View\Utils\Types\ListingColumn;
use \App\Mvc\View\Utils\Types\ListingColumns;

class View_List extends \App\Mvc\View_Window_PaginatedListing_ListAbstract
{
	/**
	 * Results per page list
	 *
	 * @var array
	 */
	protected $resultsPerPageList = [5, 10, 15, 20, 25, 30, 50, 100];

	/**
	 *
	 * {@inheritDoc}
	 * @see \App\Mvc\View_Window_PaginatedListing_ListAbstract::list_getThDetails()
	 */
	protected function list_getThDetails()
	{

		return ListingColumns::create()
			->append(
				ListingColumn::create('orderDetails')
			)
			->append(
				ListingColumn::create('serviceDetails')
			)
			->append(
				ListingColumn::create('offerDetails')
			)
			->append(
				ListingColumn::create('offerStartDate')->setType('date') // TODO: offerStartDate
			)
			->append(
				ListingColumn::create('serviceResponsible')
			)
			->append(
				ListingColumn::create('invoiceClient')
			)
			->append(
				ListingColumn::create('supplierInvoiceDetails')
			)
			->append(
				ListingColumn::create('netCompany')
			)
			->append(
				ListingColumn::create('score')
					->setSortable('DESC')
			)

		->loadLabels($this->lang['index']['listCols'])
		->loadSettings($this->input['listingParams']->getDynamicColumnsSettings());
	}
}