}
else {
if (empty($params['financial_type_id'])) {
- $params['financial_type_id'] = civicrm_api3('Contribution', 'getvalue', array(
- 'id' => $params['id'],
- 'return' => 'financial_type_id',
- ));
+ $params['financial_type_id'] = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution', $params['id'], 'financial_type_id');
}
$op = CRM_Core_Action::UPDATE;
}
}
public function setACL() {
- CRM_Financial_BAO_FinancialType::$_availableFinancialTypes = NULL;
+ CRM_Financial_BAO_FinancialType::$_availableFinancialTypes = array();
+ CRM_Financial_BAO_FinancialType::$_statusACLFt = array();
$params = array(
'domain_id' => 1,
'contribution_invoice_settings' => array('acl_financial_type' => 1),
);
$contribution = $this->callAPIFailure('Contribution', 'create', $params);
- $config->userPermissionClass->permissions[3] = 'edit contributions of type Donation';
+ $config->userPermissionClass->permissions[] = 'edit contributions of type Donation';
$contribution = $this->callAPISuccess('Contribution', 'create', $params);
$this->assertEquals($contribution['values'][$contribution['id']]['total_amount'], 200.00);