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

Refund (should) report line-item fin types and values (w/sign reversed)

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      User and Admin Doc
    • Funding Source:
      Needs Funding
    • Verified?:
      No
    • Overview:
      This change relates to Refunds for a paid event or other contribution, where the original price came from a price-set and was paid for online.
    • How it works currently:
      Hide
      Currently if you submit a Refund for a live/completed payment where there is a charge for the event, plus say, a service charge, and a donation, the 'refund' is processed with the total refund assigned in both line items, and the financial type assigned to both, from the original contribution. For example, an event costs $20 (event fee) plus $2 (service fee) - the amount shows -$22 in both lines for event and service fee.
      Show
      Currently if you submit a Refund for a live/completed payment where there is a charge for the event, plus say, a service charge, and a donation, the 'refund' is processed with the total refund assigned in both line items, and the financial type assigned to both, from the original contribution. For example, an event costs $20 (event fee) plus $2 (service fee) - the amount shows -$22 in both lines for event and service fee.
    • How it should work:
      Hide
      Don't replace the financial type if there is one already in the line item - the total amount should just be the original amount with the sign reversed, e.g. event fee $20, svc fee $2 should have a refund of event fee -$20, svc fee -$2.
      Verify in contribution report or in database query.
      Show
      Don't replace the financial type if there is one already in the line item - the total amount should just be the original amount with the sign reversed, e.g. event fee $20, svc fee $2 should have a refund of event fee -$20, svc fee -$2. Verify in contribution report or in database query.

      Description

      In CiviContribute - I submitted a refund for an event where the price-set used contains an event fee and a service fee, with 2 different financial types.  The Refund 'contribution' record showed the total amount for both line items, and the financial type as event fee for both. For the whole priceset the fin. type is event fee, but within the price-set there can be an event fee, a service fee, or a donation.  

      The modifications I made to CRM/Contribute/BAO/Contribution.php will 1) retain the financial type of the line item within the refund, and 2) show the amounts per line-item (with the sign reversed). I inserted lines 3645-57 and modified function getFinancialItemAmountFromParams, line 5336 - 38

        Attachments

          Activity

            People

            • Assignee:
              zorgalina Zorga Lina
              Reporter:
              zorgalina Zorga Lina
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated: