Merge pull request #10157 from eileenmcnaughton/iida3
[civicrm-core.git] / CRM / Financial / BAO / FinancialTypeAccount.php
index a023d233cd1966dc549aafa23b0e736db9dba9c5..92b8aa8d6199e39f2ca84770126e0e5c122222e9 100644 (file)
@@ -151,34 +151,6 @@ class CRM_Financial_BAO_FinancialTypeAccount extends CRM_Financial_DAO_EntityFin
     CRM_Core_Session::setStatus(ts('Unbalanced transactions may be created if you delete the account of type: %1.', array(1 => $relationValues[$financialType->account_relationship])));
   }
 
-  /**
-   * Get Financial Account Name.
-   *
-   * @param int $entityId
-   *
-   * @param string $entityTable
-   *
-   * @param string $columnName
-   *   Column to fetch.
-   *
-   * @return null|string
-   */
-  public static function getFinancialAccount($entityId, $entityTable, $columnName = 'name') {
-    $join = $columnName == 'name' ? 'LEFT JOIN civicrm_financial_account ON civicrm_entity_financial_account.financial_account_id = civicrm_financial_account.id' : NULL;
-    $query = "
-SELECT {$columnName}
-FROM civicrm_entity_financial_account
-{$join}
-WHERE entity_table = %1
-AND entity_id = %2";
-
-    $params = array(
-      1 => array($entityTable, 'String'),
-      2 => array($entityId, 'Integer'),
-    );
-    return CRM_Core_DAO::singleValueQuery($query, $params);
-  }
-
   /**
    * Financial Account for payment instrument.
    *