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

"New Account Relationship Option Screen" does not show exception

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.14
    • Fix Version/s: 4.7.25
    • Component/s: CiviContribute
    • Labels:
      None
    • Versioning Impact:
      None (no code merged)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      To replicate

      • Administer -> System Settings -> Option Groups
      • Select Account Relationship -> Select Options
      • Add a account relationship, for example Other account relationship
      • Administer -> CiviContribute -> Financial Types
      • Select Accounts at donations
      • Use the Add Account button
      • Select the other account relationship
      • Couple it for example with Banking Fees

      The screen does not return anything back to the user, only the spinning CiviCRM logo.

      In the background the following code is called (CRM\\Financial\\BAO
      FinancialTypeAccount.php line 305)

       public static function validateRelationship($financialTypeAccount) {
          $financialAccountLinks = CRM_Financial_BAO_FinancialAccount::getfinancialAccountRelations();
          $financialAccountType = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialAccount', $financialTypeAccount->financial_account_id, 'financial_account_type_id');
          if (CRM_Utils_Array::value($financialTypeAccount->account_relationship, $financialAccountLinks) != $financialAccountType) {
            $accountRelationships = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_EntityFinancialAccount', 'account_relationship');
            $params = array(
              1 => $accountRelationships[$financialTypeAccount->account_relationship],
            );
            throw new Exception(ts("This financial account cannot have '%1' relationship.", $params));
          }
        }
      

      This code throws an exception. But it never makes it to the screen.

        Attachments

          Activity

            People

            • Assignee:
              jitendra.purohit Jitendra Purohit
              Reporter:
              keikelboom Klaas Eikelboom
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: