Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-7726

Only set {contact.country} address token if country is different to the organization settings country

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.3.5
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      When printing address labels most of the addresses are local and shouldn't really have the country name in them, there is also a significant minority of addresses in other countries though.

      For now i've added a patch to CRM/Utils/Address.php that simply unsets the country tokens value if it is set to "Germany", but this should properly check against the country configured in the organization settings instead ....

      === modified file 'CRM/Utils/Address.php'
      — CRM/Utils/Address.php 2010-11-08 15:09:02 +0000
      +++ CRM/Utils/Address.php 2011-03-07 17:47:45 +0000
      @@ -153,6 +153,9 @@
      'email_greeting' => CRM_Utils_Array::value( 'email_greeting_display', $fields ),
      'postal_greeting' => CRM_Utils_Array::value( 'postal_greeting_display', $fields )
      );
      + if ($replacements['country'] == 'Germany')

      { + $replacements['country'] = ''; + }

      } else {
      $replacements =
      array(

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              hholzgra Hartmut Holzgraefe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: