Merge branch '5.69' of github.com:civicrm/civicrm-core
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 19 Dec 2023 05:21:42 +0000 (18:21 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 19 Dec 2023 05:21:42 +0000 (18:21 +1300)
1  2 
CRM/Financial/BAO/Order.php
tests/phpunit/CRM/Contribute/Form/Contribution/ConfirmTest.php

index 8fd948e8ee6c6e52208b3aa0ddbe86b798698962,ec85b13fec0c9470fe371a95ecfd8d3ae296eccc..36529e0f687d556395b2c6088b6e5e67ae732aeb
@@@ -954,9 -954,10 +954,10 @@@ class CRM_Financial_BAO_Order 
        elseif ($taxRate) {
          $lineItem['tax_amount'] = ($taxRate / 100) * $lineItem['line_total'];
        }
 -      $lineItem['membership_type_id'] = $lineItem['membership_type_id'] ?? NULL;
 +      $lineItem['membership_type_id'] ??= NULL;
        if ($lineItem['membership_type_id']) {
          $lineItem['entity_table'] = 'civicrm_membership';
+         $lineItem['membership_num_terms'] = $lineItem['membership_num_terms'] ?:1;
        }
        $lineItem['title'] = $this->getLineItemTitle($lineItem);
        $lineItem['tax_rate'] = $taxRate = $this->getTaxRate((int) $lineItem['financial_type_id']);