Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: civicrm/civicrm-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d7a884fe70a1c94ae04e533ced01c83428de2860
Choose a base ref
..
head repository: civicrm/civicrm-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e5e642dfaebf7e0b633a950d4e7ba004dccf7632
Choose a head ref
Showing with 4 additions and 1 deletion.
  1. +2 −0 CRM/Financial/BAO/Payment.php
  2. +0 −1 CRM/Price/BAO/LineItem.php
  3. +2 −0 tests/phpunit/api/v3/ContributionTest.php
2 changes: 2 additions & 0 deletions CRM/Financial/BAO/Payment.php
Original file line number Diff line number Diff line change
@@ -442,6 +442,8 @@ protected static function getPayableLineItems($params): array {
$ratio = 0;
}
foreach ($lineItems as $lineItemID => $lineItem) {
// Ideally id would be set deeper but for now just add in here.
$lineItem['id'] = $lineItemID;
$lineItems[$lineItemID]['paid'] = self::getAmountOfLineItemPaid($lineItemID);
$lineItems[$lineItemID]['balance'] = $lineItem['subTotal'] - $lineItems[$lineItemID]['paid'];

1 change: 0 additions & 1 deletion CRM/Price/BAO/LineItem.php
Original file line number Diff line number Diff line change
@@ -296,7 +296,6 @@ public static function getLineItems($entityId, $entity = 'participant', $isQuick
'membership_num_terms' => $dao->membership_num_terms,
'tax_amount' => $dao->tax_amount,
'price_set_id' => $dao->price_set_id,
'id' => $dao->id,
];
$taxRates = CRM_Core_PseudoConstant::getTaxRates();
if (isset($lineItems[$dao->id]['financial_type_id']) && array_key_exists($lineItems[$dao->id]['financial_type_id'], $taxRates)) {
2 changes: 2 additions & 0 deletions tests/phpunit/api/v3/ContributionTest.php
Original file line number Diff line number Diff line change
@@ -2146,6 +2146,8 @@ public function testCheckTaxAmount($thousandSeparator) {

/**
* Test repeat contribution successfully creates line item.
*
* @throws \CRM_Core_Exception
*/
public function testRepeatTransaction() {
$originalContribution = $this->setUpRepeatTransaction($recurParams = [], 'single');