Array to string conversion (Connection: pgsql, SQL: SELECT 
                    b.id,
                    a.name AS client_name,
                    to_char(b.created_at, 'YYYY-MM-DD HH24:MI:SS') AS mutation_date,
                    b.from_balance,
                    b.amount AS mutation,
                    b.to_balance,
                    b.doc_id,
                    b.doc_type,
                    COALESCE(c.broadcast_to_number, c2.doc_number) AS doc_number
                FROM m_clients a 
                JOIN t_client_balance_cuts b ON a.id = b.client_id
                LEFT JOIN t_client_broadcasts c 
                    ON c.id = b.doc_id AND trim(b.doc_type) = 'Broadcast'
                LEFT JOIN t_client_deposit c2 
                    ON c2.id = b.doc_id AND trim(b.doc_type) = 'Deposit' AND c.broadcast_id IS NULL
                WHERE DATE(b.created_at) BETWEEN :start_date AND :end_date AND a.id=:client_id ORDER BY b.id desc OFFSET 0 LIMIT 10)