}
/**
- * check if financial account is referenced by financial item
+ * check if financial account is referenced by financial item.
*
* @param $financialAccountId Integer
*
- * @param $financialAccountTypeID Integer
- *
+ * @param $financialAccountTypeID Integer
+ *
* @return bool
- *
- */
- public static function validateFinancialAccount($financialAccountId, $financialAccountTypeID = NULL) {
- if (!$financialAccountId) {
+ *
+ */
+ public static function validateFinancialAccount($financialAccountId, $financialAccountTypeID = NULL) {
+ if (!$financialAccountId) {
return FALSE;
- }
+ }
$sql = "SELECT f.financial_account_type_id FROM civicrm_financial_account f
INNER JOIN civicrm_financial_item fi ON fi.financial_account_id = f.id
INNER JOIN civicrm_option_value cv ON cv.value = f.financial_account_type_id AND cv.name IN ('Revenue', 'Liability')