Service/Account/Balance/Validate/A/ProcessOneAsset.php
private function getBalances($typeId, $ds)
    {
        $result = [];
        $query = $this->qBalanceOnDate->build();
        $conn = $query->getConnection();
        $bind = [
            QBalanceOnDate::BND_ASSET_TYPE_ID => $typeId,
            QBalanceOnDate::BND_MAX_DATE => $ds
        ];
        $rows = $conn->fetchAll($query, $bind);
        foreach ($rows as $row) {
            $accId = $row[QBalanceOnDate::A_ACC_ID];
            $balance = $row[QBalanceOnDate::A_BALANCE];
            $result[$accId] = $balance;
        }
        return $result;
    }
private function getBalances($typeId, $ds)
    {
        $result = [];
        $query = $this->qBalanceOnDate->build();
        $conn = $query->getConnection();
        $bind = [
            QBalanceOnDate::BND_ASSET_TYPE_ID => $typeId,
            QBalanceOnDate::BND_MAX_DATE => $ds
        ];
        $rows = $conn->fetchAll($query, $bind);
        foreach ($rows as $row) {
            $accId = $row[QBalanceOnDate::A_ACC_ID];
            $balance = $row[QBalanceOnDate::A_BALANCE];
            $result[$accId] = $balance;
        }
        return $result;
    }
Get closing balances on given date ($ds) for given asset ($typeId).

@param int $typeId
@param string $ds
@return array [$accountId => $balance]