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

      0. Rename existing option_value for civicrm_financial_account.financial_account_type_id from 'Cost of Goods Sold' to 'Cost of Sales'. (The more general term covering both traditional Goods as well as Services is more appropriate in our case of tickets, memberships, and donations.) This needs to be done in both:
      a) sample data in tarball, and
      b) if the label is unchanged, in the upgrade script.

      1. Add two new Accounting Relationship option values of 'Cost of Sales Account is' and 'Premiums Inventory 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 'Cost of Sales Premiums Account is' is associated with Financial Accounts of 'Cost of Sales' type and 'Premiums Inventory Account is' is associated with 'Asset' Financial Accounts.

      3. When adding or editing a Premium (civicrm/admin/contribute/managePremiums?action=update&id=1&reset=1) Financial Type should not be required. Add the following help text to the Financial Type field: "Select a Financial Type that has both a 'Cost of Sales Premiums Account' and a 'Premiums Inventory Account' if you want to generate accounting transactions to track the cost of premiums used." Filter the Financial Types to those that have both of these Relationships set up with Financial Accounts.

      4. When a premium with a non-zero civicrm_product.cost is included in a contribution transaction and the civicrm_premium_product.financial_type_id is non-null, create
      a) A civicrm_financial_trxn record as follows:
      i) to_financial_account_id = the 'Cost of Sales Premiums Account' associated with civicrm_premiums_product.financial_type_id
      ii) from_financial_account_id = the 'Premiums Inventory Account' associated with civicrm_premiums_product.financial_type_id
      iii) total_amount = civicrm_product.cost
      iv) currency = civicrm_product.currency
      v) status_id is set to value representing completed.
      b) a civicrm_entity_financial_trxn record connecting the entry above and the civicrm_financial_trxn to which it applies (same as when recording a payment for a pay later transaction).

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: