$alladdress = zb_AddressGetFulladdresslistCached(); } else { $agentFilter = ''; } foreach ($corpUsers as $eachlogin => $eachcorpid) { $count++; $fees = $funds->getFees($eachlogin); $payments = $funds->getPayments($eachlogin); $paymentscorr = $funds->getPaymentsCorr($eachlogin); $fundsflow = $fees + $payments + $paymentscorr; $dateFunds = $funds->filterByDate($fundsflow, $date); if (!$agentFilter) { $rows .= $funds->renderCorpsFlows($count, $dateFunds, $corpsData, $corpUsers, $allUserContracts, $allUsersCash, $allUserTariffs, $allTariffPrices); } else { @($userAddress = $alladdress[$eachlogin]); $assigned_agent = zb_AgentAssignCheckLoginFast($eachlogin, $allassigns, $userAddress, $allassignsStrict); if ($assigned_agent == $agentFilter) { $rows .= $funds->renderCorpsFlows($count, $dateFunds, $corpsData, $corpUsers, $allUserContracts, $allUsersCash, $allUserTariffs, $allTariffPrices); } } } $rows .= $funds->renderCorpsFlowsTotal(); $report = wf_TableBody($rows, '100%', 0, ''); show_window(__('Report'), $report); } else { show_warning(__('Nothing found')); } } else { show_error(__('No license key available')); } } else {
/** * Returns array of ahent data associated with some user by login/address pair * * @param string $login * @param string $address * @return array */ function zb_AgentAssignedGetDataFast($login, $address) { $allassigns = zb_AgentAssignGetAllData(); $allassignsStrict = zb_AgentAssignStrictGetAllData(); $assigned_agent = zb_AgentAssignCheckLoginFast($login, $allassigns, $address, $allassignsStrict); $result = zb_ContrAhentGetData($assigned_agent); return $result; }
/** * preprocess all users into assigns private prop * * @return void */ protected function assignsPreprocess() { if (!empty($this->users)) { foreach ($this->users as $userid => $eachuser) { $assignedAgentId = zb_AgentAssignCheckLoginFast($eachuser['login'], $this->allassigns, @$this->alladdress[$eachuser['login']], $this->allassignsstrict); if (!empty($assignedAgentId)) { $this->assigns[$eachuser['login']] = $assignedAgentId; } else { $this->assigns[$eachuser['login']] = ''; } } } }