From 1631c580d3755ceb283b4794682871fd7ced8e29 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Wed, 28 Jun 2017 20:05:52 +0530 Subject: [PATCH] CRM-20783 : Get currency from civi if not included in view fields --- modules/views/civicrm/civicrm_handler_field_money.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/views/civicrm/civicrm_handler_field_money.inc b/modules/views/civicrm/civicrm_handler_field_money.inc index a5a7e7574..715135fcb 100644 --- a/modules/views/civicrm/civicrm_handler_field_money.inc +++ b/modules/views/civicrm/civicrm_handler_field_money.inc @@ -43,7 +43,12 @@ class civicrm_handler_field_money extends views_handler_field { public function render($values) { $value = $this->get_value($values); - $currency = $this->get_value($values, 'currency'); + if (!empty($this->definition['currency field'])) { + $currency = $this->get_value($values, 'currency'); + } + else { + $currency = CRM_Core_Config::singleton()->defaultCurrency; + } switch ($this->options['display_format']) { case 'formatted':