Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11514 Upgrade needs to create financial_trxn, financial_item, entity_financial_item records for existing contributions / line_items
  3. CRM-11522

Upgrade needs to copy accounting codes from contribution type to new Income Accounts AND handle additional contribution types

    Details

    • Type: Sub-task
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: Accounting Integration
    • Labels:
      None

      Description

      Currently the upgrade is dropping the accounting code column after renaming contribution_type table to financial_type and then writing hard-coded accounting codes into the financial accounts. This means that existing sites will lose any accounting codes they've set up.

      Also, it looks like the data migration sql following this comment (-- CRM-11127) currently at line 584 is hard-coded to except only the default contribution types (Donation, Event Fee ...). Many sites will modify or add contribution types.

      Modify upgrade SQL:
      1. Don't drop financial_type.accounting_code after rename of tables
      2. Modify the code starting on line 585 to handle all Income Accounts that might be created (1 for each financial_type).
      2.1 Copy accounting_code from financial_type rows.
      2.2 Skip pluralizing the account.name (e.g. we were changing Donation to Donations - but we don't really know what the contribution type name will be and they may be in a different language).
      2.3 Set the description generically - 'Default account for ' . $financial_type_name;

        Attachments

          Activity

            People

            • Assignee:
              deepak Deepak Srivastava
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: