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
Conversation
(Standard links)
|
@@ -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'] ?? ''); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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
I got a bit glazed reading through all of those but I think I checked every line. Defiitely more consistent |
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