Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REF: Consistent variables names in formRule for CRM/Event/Form/Register #25045

Merged
merged 2 commits into from Nov 24, 2022

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Nov 24, 2022

Overview

Follow on from #25044 (merge after #25044)

Before

Variables in formRule not consistent with names in Event/Form/Register

After

Variables in formRule consistent with names in Event/Form/Register

Technical Details

Comments

@civibot
Copy link

civibot bot commented Nov 24, 2022

(Standard links)

@civibot civibot bot added the master label Nov 24, 2022
@@ -226,7 +226,7 @@ public function buildQuickForm() {
}

$this->_amount[$k]['label'] = preg_replace('//', '', $v['amount_level']) . ' - ' . $append;
$this->_part[$k]['info'] = CRM_Utils_Array::value('first_name', $v) . ' ' . CRM_Utils_Array::value('last_name', $v);
$this->_part[$k]['info'] = ($v['first_name'] ?? '') . ' ' . ($v['last_name'] ?? '');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah right $v - gotta love those descriptive variables

@@ -662,7 +660,7 @@ public function postProcess() {
if (isset($line['tax_amount']) && isset($line['tax_rate'])) {
$totalTaxAmount = $line['tax_amount'] + $totalTaxAmount;
if (isset($dataArray[$line['tax_rate']])) {
$dataArray[$line['tax_rate']] = $dataArray[$line['tax_rate']] + CRM_Utils_Array::value('tax_amount', $line);
$dataArray[$line['tax_rate']] = $dataArray[$line['tax_rate']] + ($line['tax_amount'] ?? 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this one is an actual change - although not in a bad way

@@ -955,13 +953,7 @@ private function processContribution(
}

if (Civi::settings()->get('deferred_revenue_enabled')) {
$eventStartDate = CRM_Utils_Array::value(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - I've clearly hit the glazes stage - had to stare at this for a bit to realise it is right

@eileenmcnaughton
Copy link
Contributor

I got a bit glazed reading through all of those but I think I checked every line. Defiitely more consistent

@eileenmcnaughton eileenmcnaughton merged commit 53dda89 into civicrm:master Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants