case 'TextArea':
$display = nl2br($display);
break;
+
+ case 'Text':
+ if ($field['data_type'] == 'Money' && isset($value)) {
+ //$value can also be an array(while using IN operator from search builder or api).
+ foreach ((array) $value as $val) {
+ $disp[] = CRM_Utils_Money::format($val);
+ }
+ $display = implode(', ', $disp);
+ }
+ break;
}
return $display;
}
"civicrm_value_testsearchcus_1." . strtolower($type) . "_field_{$customField['id']} BETWEEN \"$from\" AND \"$to\"",
$queryObj->_where[0][0]
);
+ //CRM-18471 - display qill as '$ amount' for money
+ if ($type == 'Money') {
+ $from = "$ $from";
+ $to = "$ $to";
+ }
$this->assertEquals($queryObj->_qill[0][0], "$type field BETWEEN $from, $to");
}
}
$customFieldName = 'custom_' . $customField['id'];
$expectedValue = ($isDate) ? '"20150606235959"' : (($type == 'Money') ? $data : "\"$data\"");
- $expectedQillValue = ($isDate) ? "'June 6th, 2015 11:59 PM'" : $data;
+ $expectedQillValue = ($isDate) ? "'June 6th, 2015 11:59 PM'" : (($type == 'Money') ? "$ $data" : $data);
// Assigning the relevant form value to be within a custom key is normally done in
// build field params. It would be better if it were all done in convertFormValues