/** * Get wealthbot.io fee * * @param ClientAccount $clientAccount * @param integer $year * @param integer $quarter * @return float */ public function getCEFee(ClientAccount $clientAccount, $year, $quarter) { $ria = $clientAccount->getClient()->getRia(); $fees = $this->getAdminFee($ria); $period = $this->periodManager->getPeriod($year, $quarter); $value = $this->cashManager->getAccountValueOnDate($clientAccount, $period['endDate']); return $this->calculateFee($value, $fees); }
public function getAccountInformation(ClientAccount $account, $year, $quarter) { $period = $this->periodManager->getPeriod($year, $quarter); $billItem = $this->em->getRepository('WealthbotClientBundle:BillItem')->getByAccountAndPeriod($account, $year, $quarter); $data = array('id' => $account->getId(), 'name' => $account->getOwnerNames(), 'type' => $account->getSystemType(), 'number' => $this->getAccountNumber($account), 'status' => $this->getAccountStatus($account), 'paysFor' => $this->getAccountPaysFor($account), 'averageAccountValue' => $this->getAccountAverageValue($account, $period['startDate'], $period['endDate']), 'daysInPortfolio' => $this->getAccountDaysInPortfolio($account, $period['startDate'], $period['endDate']), 'accountValue' => $this->cashManager->getAccountValueOnDate($account, $period['endDate']), 'billItemStatus' => $this->getBillItemStatus($account, $year, $quarter), 'cash' => $this->cashManager->getAccountCashOnDate($account, $period['endDate']), 'billItemId' => 0, 'feeBilled' => 0, 'feeCollected' => 0); if ($billItem) { $data['billItemId'] = $billItem->getId(); $data['feeBilled'] = $billItem->getFeeBilled(); $data['feeCollected'] = $billItem->getFeeCollected(); } return $data; }