do {
$creditNoteNum++;
$creditNoteId = CRM_Utils_Array::value('credit_notes_prefix', $prefixValue) . "" . $creditNoteNum;
- $result = civicrm_api3('Contribution', 'getcount', array(
- 'sequential' => 1,
- 'creditnote_id' => $creditNoteId,
- ));
+ $params = array(1 => array($creditNoteId, 'String'));
+ $result = CRM_Core_DAO::singleValueQuery("SELECT count(id) FROM civicrm_contribution WHERE creditnote_id = %1", $params);
} while ($result > 0);
return $creditNoteId;
--- /dev/null
+{* file to handle db changes in 4.6.18 during upgrade *}
+-- CRM-18516 Convert the date fields relating to group caching and acl caching timestamp
+ALTER TABLE civicrm_group CHANGE cache_date cache_date timestamp NULL DEFAULT NULL , CHANGE refresh_date refresh_date timestamp NULL DEFAULT NULL;
+ALTER TABLE civicrm_acl_cache CHANGE modified_date modified_date timestamp NULL DEFAULT NULL;
else {
// do not set defaults to file type fields
if ($('#' + ele).attr('type') != 'file') {
- $('#' + ele ).val(data[ele].value).change();
+ if (ele.split("_").pop() == 'display') {
+ $("[id^='"+ele+"']").val(data[ele].value).change();
+ }
+ else {
+ $('#' + ele ).val(data[ele].value).change();
+ }
}
}
}