Details

    • Type: Task
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: Accounting Integration
    • Labels:
      None

      Description

      1. Add a new Accounting Relationship option value of 'Discounts Account is' in both
      a) sample data in tarball, and
      b) upgrade script.

      2. On the form to Add New Financial Type Account (civicrm/admin/financial/financialType/accounts?action=add&reset=1&aid=3) and also for editting, fix filtering so that 'Discounts Account is' is associated with Financial Accounts of 'Revenue' type.

      3. When a discounted fee is selected and its purchase is being recorded, an additional entry should be made in civicrm_financial_trxn in the following case:
      3.1.1 the fee label for the discounted fee matches the fee label for the quick config regular fees,
      3.1.2 the financial type associated with the discount fee has a 'Discounts Account is' relationship specified.
      3.2 The values inserted in the new civicrm_financial_trxn record should be:
      i) from_financial_account_id = the 'Discount Account is' associated with the discount price_field_value.financial_type_id
      ii) to_financial_account_id = same as the existing civicrm_financial_trxn.to_financial_account_id (ie A/R or Asset) (NB: was the 'Income Account is' associated with the discount price_field_value.financial_type_id)
      iii) total_amount = regular fee for that label - discount fee for that label
      iv) currency as normally determined
      v) status_id is set to same value as normal civicrm_financial_trxn for the event item purchase
      vi) payment_processor_id and payment_instrument_id should be NULL
      3.3 a civicrm_entity_financial_trxn record connecting the entry above and the civicrm_contribution (NB: was previously civicrm_financial_trxn) to which it applies (same as when recording a payment for a pay later transaction).
      3.4 Check all places where the status of a payment (ie civicrm_financial_trxn) is changed to ensure that the status of the associated discount amount is similarly changed. For example, on IPN callback, and on manual changes, and on partial payments, and on reversals of payments.

      Example
      Using default data, add Discounts as the Discounts Account is to the Event Fees financial type.
      Using default Rain-forest Cup Youth Soccer Tournament Event:
      1. Create a Discount Set. Set the amounts to $100 less than the original, ie $700, $900, $1400. Don't change the labels. Save.
      2. Create a backoffice registration for a contact for Tiny-tots (ages 5-8), ensuring that the Financial Type is Event Fees.
      The results in the database should include the following records:
      civicrm_financial_item: description = 'Tiny-tots (ages 5-8)', amount=700, financial_account_id=4
      existing civicrm_financial_trxn: from_financial_account_id = Null, to_financial_account_id=6, total_amount=700
      NEW civicrm_financial_trxn: from_financial_account_id = 11, to_financial_account_id=6, total_amount = 100

      Further information on the bookkeeping entries can be found at http://en.wikipedia.org/wiki/Sales_(accounting).

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              joemurray Joe Murray
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: