Skip to content

Commit

Permalink
FOSFA-231: Set correct financial type when creating membership using …
Browse files Browse the repository at this point in the history
…price set with single line item

Applying: civicrm#28152
  • Loading branch information
omarabuhussein authored and shahrukh-compuco committed Jun 24, 2024
1 parent 097c6cc commit 522d690
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CRM/Member/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,15 @@ protected function setPriceSetParameters(array $formValues): array {
$this->order = new CRM_Financial_BAO_Order();
$this->order->setForm($this);
$this->order->setPriceSelectionFromUnfilteredInput($formValues);

if (isset($formValues['total_amount'])) {
$this->order->setOverrideTotalAmount((float) $formValues['total_amount']);
}
$this->order->setOverrideFinancialTypeID((int) $formValues['financial_type_id']);

if (empty($formValues['price_set_id'])) {
$this->order->setOverrideFinancialTypeID((int) $formValues['financial_type_id']);
}

return $formValues;
}

Expand Down

0 comments on commit 522d690

Please sign in to comment.