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

Change Prior Financial Period to a contact setting

    Details

    • Type: Task
    • Status: Done/Fixed
    • Priority: Important
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.16
    • Fix Version/s: 4.7.17
    • Component/s: None
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      User and Admin Doc
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Each contact that is the owner of a financial account gets its own financial period closing, since it has its own books as a separate organization. We need to store the date of the prior financial period end separately for each of these organizations.
      Once prior_financial_period is its own setting, we can take advantage of the ability of civicrm_setting to store settings for each contact. Each will have its own setting. In terms of a UI, we'll have something like:
      Prior Financial Period: Org 1 2016-02-28
      Org 2 2016-03-31
      We'll need to show any org that owns an FA on CiviContribute COmponent Setting form. Default to null as per now.
      There are no unit tests for API for a Setting that is localized to a contact, and I couldn't find one in core with a quick grep.
      $result = civicrm_api3('Setting', 'get', array(
      'sequential' => 1,
      'return' => array("contact_id"),
      'deferred_revenue_enabled' => "",
      ));
      Doesn't seem to return any values for https://github.com/civicrm/civicrm-core/blob/master/xml/schema/Core/Setting.xml#L72 so there may be some effort involved in using API with this field.
      This issue also encompasses changing each place where the Prior Financial Period setting is used to ensure that the correct one is selected and passed when retrieving or setting the setting.

        Attachments

          Activity

            People

            • Assignee:
              edsel Edsel Lopez
              Reporter:
              edsel Edsel Lopez
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: