Skip to content

Instantly share code, notes, and snippets.

View pradpnayak's full-sized avatar
💭
Hacker!

Pradeep Nayak pradpnayak

💭
Hacker!
View GitHub Profile
<?php
class CRM_ActivityDetailReport_Report_Form_Contact_ActivityDetailsWithCaseData extends CRM_Report_Form_Activity {
/**
* Class constructor.
*/
public function __construct() {
parent::__construct();
$this->_columns['civicrm_contact']['filters']['current_user_contact'] = [
@pradpnayak
pradpnayak / extension.php
Last active December 10, 2018 13:19
Add last contribution details on Contri Detail report
<?php
/**
* Implements hook_civicrm_alterReportVar().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_alterReportVar
*/
function contactgeofields_civicrm_alterReportVar($varType, &$var, &$object) {
if ($varType == 'columns') {
$var['civicrm_contribution']['fields']['last_contribution_id'] = [
'title' => ts('Last Contri ID'),
QA Date - 26 June 2018
1. Add Payment method through UI
Expected: Throw error when trying to create payment method with FA as 'Account Receivable'
Actual: Was able to add new payment method with 'Account Receivable' a/c without any error.
2. Update existing Payment method through UI
Expected: Throw error when trying to update payment method with FA as 'Account Receivable'
Actual: Was able to update payment method with 'Account Receivable' a/c without any error.
@pradpnayak
pradpnayak / gist:6a3c10d598634068b8e7cbc16c7322d9
Created April 24, 2018 08:03
Contribution-Invoice Message template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
<table style = "margin-top:2px;padding-left:7px;">
<tr>
<td><img src = "{$resourceBase}/i/civi99.png" height = "34px" width = "99px"></td>
@pradpnayak
pradpnayak / Hook
Last active January 20, 2018 04:34
Hide fields on Online Contribution form
/**
* Implements hook_civicrm_buildForm().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_buildForm
*
*/
function abc_civicrm_buildForm($formName, &$form) {
if (in_array($formName, [
'CRM_Contribute_Form_Contribution_Main',
'CRM_Contribute_Form_Contribution_Confirm',
@@ -52,6 +52,11 @@ public static function get($params) {
return $result;
}
+ /**
+ * Create social user
+ *
+ * @param array $userInfo
+ */