return null;
}
}
-
+
/**
* check if contact is present in financial_item table
*
if (empty($contactIds)) {
return FALSE;
}
-
+
$allowPermDelete = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'allowPermDeleteFinancial');
if (!$allowPermDelete) {
$url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid=$dao->id");
$not_deleted[$dao->id] = "<a href='$url'>$dao->display_name</a>";
}
-
+
$errorStatus = '';
if (is_array($error)) {
$errorStatus = '<ul><li>' . implode('</li><li>', $not_deleted) . '</li></ul>';
}
-
+
$error['_qf_default'] = $errorStatus . ts('This contact(s) can not be permanently deleted because the contact record is linked to one or more live financial transactions. Deleting this contact would result in the loss of financial data.');
- return $error;
+ return $error;
}
}
return FALSE;