);
// Financial Type
if (!empty($dao->financial_type_id)) {
- $premiums[$dao->id]['financial_type'] = CRM_Core_PseudoConstant::getLabel('CRM_Financial_BAO_FinancialType', 'financial_type', $dao->financial_type_id);
+ $premiums[$dao->id]['financial_type'] = CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_Product', 'financial_type_id', $dao->financial_type_id);
}
}
$this->assign('rows', $premiums);
);
// Financial Type
if (!empty($premiumsProductDao->financial_type_id)) {
- $premiums[$productDAO->id]['financial_type'] = CRM_Core_PseudoConstant::getLabel('CRM_Financial_BAO_FinancialType', 'financial_type', $premiumsProductDao->financial_type_id);
+ $premiums[$productDAO->id]['financial_type'] = CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_Product', 'financial_type_id', $premiumsProductDao->financial_type_id);
}
}
}
*
* Generated from xml/schema/CRM/Financial/FinancialType.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:2313c49e821b4a909bf3c54e72576e9b)
+ * (GenCodeChecksum:760550280aaa0da48232ebdfb11170f9)
*/
/**
'type' => 'Text',
'label' => ts("Name"),
],
- 'pseudoconstant' => [
- 'table' => 'civicrm_financial_type',
- 'keyColumn' => 'id',
- 'labelColumn' => 'name',
- ]
],
'description' => [
'name' => 'description',
function _civicrm_api3_financial_type_create_spec(&$params) {
$params['name']['api.required'] = 1;
- $params['name']['type'] = CRM_Utils_Type::T_STRING;
- unset($params['name']['pseudoconstant']);
}
/**
// create financial type with custom field
$financialType = $this->callAPISuccess('FinancialType', 'create', array_merge($params, $customFields));
+ $this->callAPISuccessGetSingle('FinancialType', ['name' => $financialTypeName]);
// get financial type to check custom field value
$expectedResult = array_filter(array_merge($params, $customFields), function($var) {
return (!is_null($var) && $var != '');
});
- $result = $this->callAPISuccessGetSingle('FinancialType', [
+ $this->callAPISuccessGetSingle('FinancialType', [
'id' => $financialType['id'],
], $expectedResult);
$expectedResult = array_filter(array_merge($params, $customFields), function($var) {
return (!is_null($var) && $var != '');
});
- $result = $this->callAPISuccessGetSingle('FinancialType', [
+ $this->callAPISuccessGetSingle('FinancialType', [
'id' => $financialType['id'],
], $expectedResult);
}
<label>Name</label>
</html>
<add>1.3</add>
- <pseudoconstant>
- <table>civicrm_financial_type</table>
- <keyColumn>id</keyColumn>
- <labelColumn>name</labelColumn>
- </pseudoconstant>
</field>
<field>
<name>accounting_code</name>