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

Create separate financial_trxn records for each field's change

    Details

      Description

      Tasks to address issue:

      1. If more than one of the relevant fields change (ie fields labelled: Finanacial Type, Total Amount, Contribution Status, or Paid By), then each change should create its own appropriate transaction(s) before the next change goes on to create its transaction(s) in the civicrm_financial_trxn table. We should likely change the amount last, and amongst the other changes, let's order them, perhaps, as follows: the account first, the status second, the payment instrument (Paid By) third, and, to repeat, the amount last. All but the Paid By field change are similar to other change transactions we have implemented.

      2. If the Paid By changes, we have to do things differently because we can't tell the external system that a change transaction for the new Paid By relates to the original transaction. In this case, create two financial transaction entries: the first reverses the debit and credit accounts from the original transaction, leaving the other fields unchanged, which cancels completely the original transaction from an accounting point of view; the second is the same as the original transaction except for the change in the Paid By field, which is basically recreating the original transaction with the new Paid By info.

      Original issue description:

      In testing some batch functionality on the demo site (D7 Civi 4.3), a contribution that I had edited appeared twice in the batch selection page, and I was able to attach it to two different batches.

      Steps to reproduce:

      1) Create a contribution and leave pay method blank.
      2) Create a second contribution and set pay method to check.
      3) Edit the first contribution and set pay method to cash.
      4) Create a new batch.
      5) At this point, the edited contribution is listed twice in the contributions that can be added to the batch: http://screencast.com/t/sfj9l1XtW
      6) Added the two contribution listings with payment method indicated to batch and closed.
      7) Created a new batch - the original contribution listing (the one from before I edited the payment method) was still listed and I was able to add it to my new batch.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dgg David Greenberg
                Reporter:
                lcarter Lesley A. Carter
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 7 hours
                  1d 7h