<?php
 if ($R['clientInvoicesList']) { $reqFilters=$R['client']; $S['balanceInvoices']['client']['invoiceStartDate']=$reqFilters['invoiceStartDate']; $S['balanceInvoices']['client']['invoiceEndDate']=$reqFilters['invoiceEndDate']; $S['balanceInvoices']['client']['invoiceNumber']=$reqFilters['invoiceNumber']; $S['balanceInvoices']['client']['invoiceIdOfficeUser']=$reqFilters['invoiceIdOfficeUser']; $S['balanceInvoices']['client']['typeInvoiceOfficeUserName']=$reqFilters['typeInvoiceOfficeUserName']; $S['balanceInvoices']['client']['idReservation']=$reqFilters['idReservation']; $S['balanceInvoices']['client']['clientType']=$reqFilters['clientType']; $S['balanceInvoices']['client']['idCorporate']=$reqFilters['idCorporate']; $S['balanceInvoices']['client']['typeCorporateName']=$reqFilters['typeCorporateName']; $S['balanceInvoices']['client']['idCustomer']=$reqFilters['idCustomer']; $S['balanceInvoices']['client']['typeCustomerName']=$reqFilters['typeCustomerName']; $S['balanceInvoices']['client']['serviceCode']=$reqFilters['serviceCode']; $S['balanceInvoices']['client']['dueStartDate']=$reqFilters['dueStartDate']; $S['balanceInvoices']['client']['dueEndDate']=$reqFilters['dueEndDate']; $S['balanceInvoices']['client']['cashedStatus']=$reqFilters['cashedStatus']; $S['balanceInvoices']['client']['showReversedInvoices']=$reqFilters['showReversedInvoices']; $S['balanceInvoices']['client']['idMiceProject']=$reqFilters['idMiceProject']; $S['balanceInvoices']['client']['typeMiceProjectName']=$reqFilters['typeMiceProjectName']; $S['balanceInvoices']['client']['text']=$reqFilters['text']; } if (!$S['balanceInvoices']['client']['mode']) $S['balanceInvoices']['client']['mode']="invoices"; if (isset($R['currentPage'])) $S['balanceInvoices']['client']['currentPage']=$R['currentPage']; if ( $R['resultsPerPage'] and in_array($R['resultsPerPage'], $CFG['balanceInvoices']['listing']['client']['resultsPerPageSelector'])!==false ) { if ($S['balanceInvoices']['client']['resultsPerPage']!=$R['resultsPerPage']) { \DB::startTransaction(); \App\EntityPreference\User::getInstance()->blnClInvListRpp=$R['resultsPerPage']; \DB::commitTransaction(); $S['balanceInvoices']['client']['resultsPerPage']=$R['resultsPerPage']; $S['balanceInvoices']['client']['currentPage']=0; } } if (!$S['balanceInvoices']['client']['currentPage'] or $S['balanceInvoices']['client']['currentPage']<0) $S['balanceInvoices']['client']['currentPage']=0; if(!$S['balanceInvoices']['client']['resultsPerPage']) { $userPref=\App\EntityPreference\User::getInstance()->blnClInvListRpp; if (!$userPref) $S['balanceInvoices']['client']['resultsPerPage']=$CFG['balanceInvoices']['listing']['client']['resultsPerPageDefault']; else $S['balanceInvoices']['client']['resultsPerPage']=$userPref; } ?>