if (!wf_CheckPost(array('yearsel', 'monthsel'))) { $needYear = curyear(); $needMonth = date("m"); } else { $needYear = $_POST['yearsel']; $needMonth = $_POST['monthsel']; } //setting date filter $date = $needYear . '-' . $needMonth . '-'; if (!empty($corpUsers)) { $rows = $funds->renderCorpsFlowsHeaders($needYear, $needMonth); //contragent filter if (wf_CheckPost(array('agentsel'))) { $agentFilter = $_POST['agentsel']; $allassigns = zb_AgentAssignGetAllData(); $allassignsStrict = zb_AgentAssignStrictGetAllData(); $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]);
/** * 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; }
/** * loads available assigns from database into private prop * * @return void */ protected function loadAllAssignsStrict() { $this->allassignsstrict = zb_AgentAssignStrictGetAllData(); }