public function findVSPForTradeData(TradeData $tradeData)
 {
     $sql = "\n            SELECT 'VSP' as purchase, DATE_FORMAT(l.date,'%m%d%Y') as purchase_date, rq.quantity\n            FROM " . $this->table . " rq\n              LEFT JOIN " . self::TABLE_LOT . " l ON l.id = rq.lot_id\n              LEFT JOIN " . self::TABLE_REBALANCER_ACTION . " ra On ra.id = rq.rebalancer_action_id\n            WHERE ra.job_id = :jobId AND rq.system_client_account_id = :accountId AND rq.security_id = :securityId\n        ";
     $paramaters = array('jobId' => $tradeData->getJobId(), 'accountId' => $tradeData->getAccountId(), 'securityId' => $tradeData->getSecurityId());
     $results = $this->db->query($sql, $paramaters);
     return $results;
 }
Example #2
0
 public function testSetAccountId()
 {
     $this->tradeData->setAccountId(12);
     $this->assertEquals(12, $this->tradeData->getAccountId());
 }