*
* Generated from xml/schema/CRM/Batch/EntityBatch.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:bdeffe170df7314f5643fcd266b2ba16)
+ * (GenCodeChecksum:db880689cbebab222e9decece8487c1d)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'EntityBatch',
'bao' => 'CRM_Batch_BAO_EntityBatch',
'FKClassName' => 'CRM_Batch_DAO_Batch',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_batch',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
$types = explode(',', $options);
$labels = array();
foreach ($types as $value) {
- if ($labelValue = CRM_Core_PseudoConstant::getLabel($baoName, $fieldName, $value)) {
- $labels[$value] = $labelValue;
- }
- else {
- $labels[$value] = CRM_Core_DAO::getFieldValue($baoName, $value, $fieldName);
- }
+ $labels[$value] = CRM_Core_PseudoConstant::getLabel($baoName, $fieldName, $value);
}
return implode(', ', array_filter($labels));
}
'batch_id' => array(
'name' => 'batch_id',
'title' => ts('Batch Title'),
- 'dbAlias' => 'GROUP_CONCAT(batch_civireport.batch_id SEPARATOR ",")',
+ 'dbAlias' => 'GROUP_CONCAT(DISTINCT batch_civireport.batch_id
+ ORDER BY batch_civireport.batch_id SEPARATOR ",")',
),
),
'filters' => array(
}
// convert batch id to batch title
- if (!empty($row['civicrm_batch_batch_id'])) {
- $rows[$rowNum]['civicrm_batch_batch_id'] = $this->getLabels($row['civicrm_batch_batch_id'], 'CRM_Batch_BAO_Batch', 'title');
+ if (!empty($row['civicrm_batch_batch_id']) && !in_array('Subtotal', $rows[$rowNum])) {
+ $rows[$rowNum]['civicrm_batch_batch_id'] = $this->getLabels($row['civicrm_batch_batch_id'], 'CRM_Batch_BAO_EntityBatch', 'batch_id');
$entryFound = TRUE;
}
<type>int unsigned</type>
<required>true</required>
<comment>FK to civicrm_batch</comment>
+ <pseudoconstant>
+ <table>civicrm_batch</table>
+ <keyColumn>id</keyColumn>
+ <labelColumn>title</labelColumn>
+ </pseudoconstant>
<add>3.3</add>
</field>
<foreignKey>