Skip to content

Commit

Permalink
'debtor' is now always filled, #128
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbinder committed Jun 29, 2023
1 parent 9e4dc37 commit 9842311
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion common_function.php
Expand Up @@ -1604,7 +1604,14 @@ function replace_emailparameter($text, $user)
$text = preg_replace('/#iban#/', $user->getValue('IBAN'), $text);
$text = preg_replace('/#bic#/', $user->getValue('BIC'), $text);
$text = preg_replace('/#bank#/', $user->getValue('BANK'), $text);
$text = preg_replace('/#debtor#/', $user->getValue('DEBTOR'), $text);
if ($user->getValue('DEBTOR') <> '')
{
$text = preg_replace('/#debtor#/', $user->getValue('DEBTOR'), $text);
}
else
{
$text = preg_replace('/#debtor#/', $user->getValue('FIRST_NAME'). ' '. $user->getValue('LAST_NAME'), $text);
}
$text = preg_replace('/#membership_fee_text#/', $user->getValue('CONTRIBUTORY_TEXT'.$GLOBALS['gCurrentOrgId']), $text);
$text = preg_replace('/#iban_obfuscated#/', obfuscate_iban($user->getValue('IBAN')), $text);

Expand Down

0 comments on commit 9842311

Please sign in to comment.