- if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() && !empty($params['check_permissions'])) {
- CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($types, CRM_Core_Action::DELETE);
- if (empty($params['financial_type_id'])) {
- $params['financial_type_id'] = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_LineItem', $params['id'], 'financial_type_id');
- }
- if (!in_array($params['financial_type_id'], array_keys($types))) {
- throw new API_Exception('You do not have permission to delete this line item');
- }
- }