0

I have run into an issue and I'm not sure if it's a bug or if i'm not understanding how Civi is using the Financial Accounts.

I have created a new account relationship called "Fund" in the option groups. I created a Financial Account called "General Fund" as an Asset (EQUITY) account type. I attempted to assign the Financial Account "General Fund" with a relationship of Fund to the Financial Type Donation. Civi just sits and spins when I click on assign account and never actually adds the account to the Financial Type.

The reason I'm doing this is so that an extension that I'm having written can pull that info from Civi to import into my accounting software.

Edit: I was able to replicate this on my site and the demo.

I'm running 4.7.11 and Drupal 7. The demo is running 4.7.13

EDIT I checked the database just to see if there was something different with the financial type and account that I created. I did notice that in the civicrm_option_value table that the row for the account relationship I created the column component_id was blank and all the others were set to 2. I changed the one I entered to 2 (it didn't make a difference).

I tried adding the account to the type manually in the database and it shows up in the UI. I can't edit it through the UI but it's there.

3

This was due to the exception thrown on an AJAX pop. A fix has been raised for it at https://github.com/civicrm/civicrm-core/pull/10651.

Hopefully it will be a part of 4.7.23 release.

0

I am afraid that CiviCRM on this side is less flexible as it seems. Here is a fragment of the file FinancialAccount.php Line 282.

$Links = array(
  'Expense Account is' => 'Expenses',
  'Accounts Receivable Account is' => 'Asset',
  'Income Account is' => 'Revenue',
  'Asset Account is' => 'Asset',
  'Cost of Sales Account is' => 'Cost of Sales',
  'Premiums Inventory Account is' => 'Asset',
  'Discounts Account is' => 'Revenue',
  'Sales Tax Account is' => 'Liability',
  'Deferred Revenue Account is' => 'Liability',
  'Refunds to' => 'Liability',
);

It shows that the code makes strong assumptions about the defined account relationships. You can add your custom account relationship in this place, and you then you can use the screen to connect it to financial types. But I think it is safer to figure out how your extension can work within the existing financial schemes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.