<?php
namespace Modules\Admin\ExportData\Cashings; class Model extends \App\Mvc\Model_ListingAbstract { public function list_execute(\App\Mvc\View\Listing\Members\Params $listingParams) { $filters = $listingParams->getFilters(); $listObj = new \App\EntityList\ExportDataCashings(); $listObj->setColumns(['docType', 'idOffice', 'clientType', 'idBankAccount', 'currency', 'field', 'value', 'lastUpdateTime']); if ($filters['docType']) { $listObj->setFilter('docType', 'LIKE', $filters['docType']); } if ($filters['idOffice']) { $listObj->setFilter('idOffice', '=', $filters['idOffice']); } if ($filters['clientType']) { $listObj->setFilter('clientType', 'LIKE', $filters['clientType']); } if ($filters['idBankAccount']) { $listObj->setFilter('idBankAccount', '=', $filters['idBankAccount']); } if ($filters['currency']) { $listObj->setFilter('currency', 'LIKE', $filters['currency']); } if ($filters['field']) { $listObj->setFilter('field', 'LIKE', $filters['field']); } if (strlen((string)$filters['value']) != 0) { $listObj->setFilter('value', '=', $filters['value']); } $listObj = $this->entityList_inheritListingParams($listingParams, $listObj); $this->recordsList = $listObj->exportRecords(); $this->totalRecordsCount = $listObj->getRecordsCount(); } }