1

CiviCRM 4.7.29

"Events - Registration Confirmation and Receipt (on-line)" email has empty data for Price, Sub-total, tax and total.

But, if I re-send receipt later via contribution action 'Receipts - print or email', all values are correct.

Here is the custom template code, please help!

{assign var=pretax value=$totalAmount/1.20}
{assign var=tax value=$totalAmount-$pretax}

<table width="500" style="border: 1px solid #000; margin: 1em 0em 1em; border-collapse: collapse;">
<tr>
<th {$headerStyle}>Description of Item</th><th {$headerStyle}>Price (excl. VAT)</th><th {$headerStyle}>Total Price (incl. VAT @ 20%)</th>
</tr>
<tr>
<td {$valueStyle}>
{$event.event_title}<br />
       {$event.event_start_date|date_format:"%A"} {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|date_format:"%A"} {$event.event_end_date|crmDate}{/if}{/if}
</td>
<td {$valueStyle}>
{$pretax|crmMoney}
</td>
<td {$valueStyle}>
{$totalAmount|crmMoney}
</td>
</table>
<table width="500" style="border-collapse: collapse;">
<tr>
<td>Sub Total<br />(excl. VAT)</td>
<td>{$pretax|crmMoney}</td>
</tr>
<tr>
<td>VAT @ 20%</td>
<td>{$tax|crmMoney}</td>
</tr>
<tr>
<td><strong>Total</strong></td>
<td><strong>{$totalAmount|crmMoney}</strong></td>
<td><strong> {if !$params.is_pay_later}<font color="red">PAID</font>{/if}</strong></td>
</tr>
</table> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.