<?php
 include("_config/addCfg.php"); include("_includes/addInc.php"); $OK=1; include("clientServicesList_updateFilters.php"); include("clientServicesList_testFilters.php"); if (isset($R['destroyBalance'])) { $S['manualBalance']['idServices']=array(); } if ($OK) { include("clientServicesList_generateSQL.php"); } if ($OK) { include("clientServicesList_addExtraInfo.php"); } if ($OK and $CFG['manualBalances']['allowBulkMode'] and $R['clientServicesSelectAll']) { include("clientServicesList_selectAll.php"); } if (is_array($S['manualBalance']['idServices'])) { reset($S['manualBalance']['idServices']); $selectedService=key($S['manualBalance']['idServices']); } if (!$selectedService) $selectedService=0; $smarty->assign("openAndCloseFilterOnResults", $CFG['balanceInvoices']['filterBehaviour']['client']['openAndCloseFilterOnResults']); $smarty->assign("expandFilters", $expandFilters); $smarty->assign("pages", array( 'short'=> true, 'currentPage'=> $filters['currentPage'], 'countResults'=> $countResults, 'resultsPerPage'=> $filters['resultsPerPage'], 'resultsPerPageSelector'=>$CFG['balanceInvoices']['listing']['client']['resultsPerPageSelector'], 'ajax'=>$R['ajax'], 'ajaxDiv'=>'clientServicesListDiv', 'ajaxURI'=>'clientServicesList.php', 'loadingMask' =>true, 'onSubmit'=>'window.scroll(0,0);', ) ); $smarty->assign("servicesList", $servicesList); $smarty->assign("selectedRows", $S['manualBalance']['idServices']); $smarty->assign("selectedService", $selectedService); if ($CFG['manualBalances']['allowBulkMode']) $smarty->assign("createBalancesMode", 'bulk'); else $smarty->assign("createBalancesMode", 'simple'); $smarty->assign("clientServicesSelectAll", $R['clientServicesSelectAll']); $smarty->display("clientServicesList.tpl"); ?>