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

Line Item value incorrectly set to $1 from batch entry under some circumstances

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.5
    • Fix Version/s: 4.4.11, 4.5
    • Component/s: None
    • Labels:
      None

      Description

      This affects people who were using price sets prior to 4.2 who do batch data entry. There is a place where the $priceFieldID is used in lieu of the price field value ID. For most customers both are 1 for the default price set.

      I have a test that proves the problem

      /**

      • Test Contribution Import
        */
        function testProcessContribution()
        Unknown macro: { $this->offsetDefaultPriceSet(); $form = new CRM_Batch_Form_Entry(); $params = $this->getContributionData(); $this->assertTrue($form->testProcessContribution($params)); $result = $this->callAPISuccess('contribution', 'get', array('return' => 'total_amount')); $this->assertEquals(2, $result['count']); foreach($result['values'] as $contribution) { $this-> assertEquals($this->callAPISuccess('line_item', 'getvalue', array( 'contribution_id' => $contribution['id'], 'return' => 'line_total', )), $contribution['total_amount']); } }

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: