First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,57 @@
{php}
$dir = SMARTY_DIR . '/../../CRM/Upgrade/4.6.alpha1.msg_template/message_templates';
$templates = array();
foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
$parts = explode('_', basename($filename, '.tpl'));
$templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
}
$this->assign('templates', $templates);
{/php}
{foreach from=$templates item=tpl}
{fetch assign=content file=$tpl.filename}
SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
{/foreach}
{php}
$ovNames = array(
'contribution' => array(
'contribution_invoice_receipt' => ts('Contribution Invoice Receipt', array('escape' => 'sql')),
),
);
$this->assign('ovNames', $ovNames);
$this->assign('dir', $dir);
{/php}
{foreach from=$ovNames key=name item=ignore}
SELECT @tpl_ogid_{$name} := MAX(id) FROM civicrm_option_group WHERE name = 'msg_tpl_workflow_{$name}';
{/foreach}
INSERT INTO civicrm_option_value
(option_group_id, name, {localize field='label'}label{/localize}, value, weight) VALUES
{foreach from=$ovNames key=gName item=ovs name=for_groups}
{foreach from=$ovs key=vName item=label name=for_values}
(@tpl_ogid_{$gName}, '{$vName}', {localize}'{$label}'{/localize}, {$smarty.foreach.for_values.iteration}, {$smarty.foreach.for_values.iteration}) {if $smarty.foreach.for_groups.last and $smarty.foreach.for_values.last};{else},{/if}
{/foreach}
{/foreach}
{foreach from=$ovNames key=gName item=ovs}
{foreach from=$ovs key=vName item=label}
SELECT @tpl_ovid_{$vName} := MAX(id) FROM civicrm_option_value WHERE option_group_id = @tpl_ogid_{$gName} AND name = '{$vName}';
{/foreach}
{/foreach}
INSERT INTO civicrm_msg_template
(msg_title, msg_subject, msg_text, msg_html, workflow_id, is_default, is_reserved) VALUES
{foreach from=$ovNames key=gName item=ovs name=for_groups}
{foreach from=$ovs key=vName item=title name=for_values}
{fetch assign=subject file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/4.6.alpha1.msg_template/message_templates/`$vName`_subject.tpl"}
{fetch assign=text file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/4.6.alpha1.msg_template/message_templates/`$vName`_text.tpl"}
{fetch assign=html file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/4.6.alpha1.msg_template/message_templates/`$vName`_html.tpl"}
('{$title}', '{$subject|escape:"quotes"}', '{$text|escape:"quotes"}', '{$html|escape:"quotes"}', @tpl_ovid_{$vName}, 1, 0),
('{$title}', '{$subject|escape:"quotes"}', '{$text|escape:"quotes"}', '{$html|escape:"quotes"}', @tpl_ovid_{$vName}, 0, 1) {if $smarty.foreach.for_groups.last and $smarty.foreach.for_values.last};{else},{/if}
{/foreach}
{/foreach}

View file

@ -0,0 +1,434 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
<table style = "margin-top:2px;padding-left:7px;">
<tr>
<td><img src = "{$resourceBase}/i/civi99.png" height = "34px" width = "99px"></td>
</tr>
</table>
<center>
<table style = "padding-right:19px;font-family: Arial, Verdana, sans-serif;" width = "500" height = "100" border = "0" cellpadding = "2" cellspacing = "1">
<tr>
<td style = "padding-left:15px;" ><b><font size = "4" align = "center">INVOICE</font></b></td>
<td colspan = "1"></td>
<td style = "padding-left:70px;"><b><font size = "1" align = "center" >Invoice Date:</font></b></td>
<td><font size = "1" align = "right">{$domain_organization}</font></td>
</tr>
<tr>
{if $organization_name}
<td style = "padding-left:17px;"><font size = "1" align = "center" >{$display_name} ({$organization_name})</font></td>
{else}
<td style = "padding-left:15px;"><font size = "1" align = "center" >{$display_name}</font></td>
{/if}
<td colspan = "1"></td>
<td style = "padding-left:70px;"><font size = "1" align = "right">{$invoice_date}</font></td>
<td><font size = "1" align = "right">
{if $domain_street_address }
{$domain_street_address}
{/if}
{if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if}</font></td>
</tr>
<tr>
<td style = "padding-left:17px;"><font size = "1" align = "center">{$street_address} {$supplemental_address_1}</font></td>
<td colspan = "1"></td>
<td style = "padding-left:70px;"><b><font size = "1" align = "right">Invoice Number:</font></b></td>
<td ><font size = "1" align = "right">{if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if}
{if $domain_state }{$domain_state}{/if}</font></td>
</tr>
<tr>
<td style = "padding-left:17px;"><font size = "1" align = "center">{$supplemental_address_2} {$stateProvinceAbbreviation}</font></td>
<td colspan="1"></td>
<td style = "padding-left:70px;"><font size = "1" align = "right">{$invoice_id}</font></td>
<td><font size = "1" align = "right">{if $domain_city}
{$domain_city}
{/if}
{if $domain_postal_code }
{$domain_postal_code}
{/if}
</font></td>
</tr>
<tr>
<td style = "padding-left:17px;"><font size = "1" align = "right">{$city} {$postal_code}</font></td>
<td colspan="1"></td>
<td height = "10" style = "padding-left:70px;"><b><font size = "1"align = "right">Reference:</font></b></td>
<td><font size = "1" align = "right"> {if $domain_country}
{$domain_country}
{/if}</font></td>
</tr>
<tr>
<td></td>
<td></td>
<td style = "padding-left:70px;"><font size = "1"align = "right">{$source}</font></td>
<td><font size = "1" align = "right"> {if $domain_phone}{$domain_phone}{/if}</font> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td><font size = "1" align = "right"> {if $domain_email}
{$domain_email}
{/if}</font> </td>
</tr>
</table>
<table style = "margin-top:75px;font-family: Arial, Verdana, sans-serif" width = "590" border = "0"cellpadding = "-5" cellspacing = "19" id = "desc">
<tr>
<td colspan = "2" {$valueStyle}>
<table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
<tr>
<th style = "padding-right:34px;text-align:left;font-weight:bold;width:200px;"><font size = "1">Description</font></th>
<th style = "padding-left:34px;text-align:right;font-weight:bold;" ><font size = "1">Quantity</font></th>
<th style = "padding-left:34px;text-align:right;font-weight:bold;"><font size = "1">Unit Price</font></th>
<th style = "padding-left:34px;text-align:right;font-weight:bold;width:20px;"><font size = "1">{$taxTerm} </font></th>
<th style = "padding-left:34px;text-align:right;font-weight:bold;"><font size = "1">Amount {$defaultCurrency}</font></th>
</tr>
{foreach from=$lineItem item=value key=priceset name=taxpricevalue}
{if $smarty.foreach.taxpricevalue.index eq 0}
<tr><td colspan = "5" ><hr size="3" style = "color:#000;"></hr></td></tr>
{else}
<tr><td colspan = "5" style = "color:#F5F5F5;"><hr></hr></td></tr>
{/if}
<tr>
<td style="text-align:left;" ><font size = "1">
{if $value.html_type eq 'Text'}{$value.label}{else}{$value.field_title} - {$value.label}{/if} {if $value.description}<div>{$value.description|truncate:30:"..."}</div>{/if}
</font></td>
<td style = "padding-left:34px;text-align:right;"><font size = "1"> {$value.qty}</font></td>
<td style = "padding-left:34px;text-align:right;"><font size = "1"> {$value.unit_price|crmMoney:$currency}</font></td>
{if $value.tax_amount != ''}
<td style = "padding-left:34px;text-align:right;width:20px;"><font size = "1"> {$value.tax_rate}%</font></td>
{else}
<td style = "padding-left:34px;text-align:right;width:20px;"><font size = "1">No {$taxTerm}</font></td>
{/if}
<td style = "padding-left:34px;text-align:right;"><font size = "1">{$value.subTotal|crmMoney:$currency}</font></td>
</tr>
{/foreach}
<tr><td colspan = "5" style = "color:#F5F5F5;"><hr></hr></td></tr>
<tr>
<td colspan = "3"></td>
<td style = "padding-left:20px;text-align:right;"><font size = "1">Sub Total</font></td>
<td style = "padding-left:34px;text-align:right;"><font size = "1"> {$subTotal|crmMoney:$currency}</font></td>
</tr>
{foreach from = $dataArray item = value key = priceset}
<tr>
<td colspan = "3"></td>
{if $priceset}
<td style = "padding-left:20px;text-align:right;"><font size = "1"> TOTAL {$taxTerm} {$priceset}%</font></td>
<td style = "padding-left:34px;text-align:right"><font size = "1" align = "right">{$value|crmMoney:$currency}</font> </td>
{elseif $priceset == 0}
<td style = "padding-left:20px;text-align:right;"><font size = "1">TOTAL NO {$taxTerm}</font></td>
<td style = "padding-left:34px;text-align:right"><font size = "1" align = "right">{$value|crmMoney:$currency}</font> </td>
</tr>
{/if}
{/foreach}
<tr>
<td colspan = "3"></td>
<td colspan = "2"><hr></hr></td>
</tr>
<tr>
<td colspan = "3"></td>
<td style = "padding-left:20px;text-align:right;"><b><font size = "1">TOTAL {$defaultCurrency}</font></b></td>
<td style = "padding-left:34px;text-align:right;"><font size = "1">{$amount|crmMoney:$currency}</font></td>
</tr>
{if $is_pay_later == 0}
<tr>
<td colspan = "3"></td>
<td style = "padding-left:20px;text-align:right;"><font size = "1">
{if $contribution_status_id == $refundedStatusId}
LESS Amount Credited
{else}
LESS Amount Paid
{/if}
</font></td>
<td style = "padding-left:34px;text-align:right;"><font size = "1">{$amount|crmMoney:$currency}</font></td>
</tr>
<tr>
<td colspan = "3"></td>
<td colspan = "2" ><hr></hr></td>
</tr>
<tr>
<td colspan = "3"></td>
<td style = "padding-left:20px;text-align:right;"><b><font size = "1">AMOUNT DUE: </font></b></td>
<td style = "padding-left:34px;text-align:right;"><b><font size = "1">{$amountDue|crmMoney:$currency}</font></b></td> <td style = "padding-left:34px;"><font size = "1" align = "right"></fonts></td>
</tr>
{/if}
<br/><br/><br/>
<tr>
<td colspan = "3"></td>
</tr>
<tr>
<td><b><font size = "1" align = "center">DUE DATE: {$dueDate}</font></b></td>
<td colspan = "3"></td>
</tr>
</table>
</td>
</tr>
</table>
<table style = "margin-top:5px;padding-right:45px;">
<tr>
<td><img src = "{$resourceBase}/i/contribute/cut_line.png" height = "15" width = "630"></td>
</tr>
</table>
<table style = "margin-top:6px;padding-right:20px;font-family: Arial, Verdana, sans-serif" width = "480" border = "0"cellpadding = "-5" cellspacing="19" id = "desc">
<tr>
<td width="60%"><b><font size = "4" align = "right">PAYMENT ADVICE</font></b> <br/><br/> <font size = "1" align = "right"><b>To: </b> <div style="width:17em;word-wrap:break-word;">
{$domain_organization} <br />
{$domain_street_address} {$domain_supplemental_address_1} <br />
{$domain_supplemental_address_2} {$domain_state} <br />
{$domain_city} {$domain_postal_code} <br />
{$domain_country} <br />
{$domain_phone} <br />
{$domain_email}</div>
</font><br/><br/><font size="1" align="right">{$notes}</font>
</td>
<td width="40%">
<table cellpadding = "-10" cellspacing = "22" align="right" >
<tr>
<td colspan = "2"></td>
<td><font size = "1" align = "right" style="font-weight:bold;">Customer: </font></td>
<td ><font size = "1" align = "right">{$display_name}</font></td>
</tr>
<tr>
<td colspan = "2"></td>
<td><font size = "1" align = "right" style="font-weight:bold;">Invoice Number: </font></td>
<td><font size = "1" align = "right">{$invoice_id}</font></td>
</tr>
<tr><td colspan = "5"style = "color:#F5F5F5;"><hr></hr></td></tr>
{if $is_pay_later == 1}
<tr>
<td colspan = "2"></td>
<td><font size = "1" align = "right" style="font-weight:bold;">Amount Due:</font></td>
<td><font size = "1" align = "right" style="font-weight:bold;">{$amount|crmMoney:$currency}</font></td>
</tr>
{else}
<tr>
<td colspan = "2"></td>
<td><font size = "1" align = "right" style="font-weight:bold;">Amount Due: </font></td>
<td><font size = "1" align = "right" style="font-weight:bold;">{$amountDue|crmMoney:$currency}</font></td>
</tr>
{/if}
<tr>
<td colspan = "2"></td>
<td><font size = "1" align = "right" style="font-weight:bold;">Due Date: </font></td>
<td><font size = "1" align = "right">{$dueDate}</font></td>
</tr>
<tr>
<td colspan = "5" style = "color:#F5F5F5;"><hr></hr></td>
</tr>
</table>
</td>
</tr>
</table>
{if $contribution_status_id == $refundedStatusId}
<table style = "margin-top:2px;padding-left:7px;page-break-before: always;">
<tr>
<td><img src = "{$resourceBase}/i/civi99.png" height = "34px" width = "99px"></td>
</tr>
</table>
<center>
<table style = "padding-right:19px;font-family: Arial, Verdana, sans-serif" width = "500" height = "100" border = "0" cellpadding = "2" cellspacing = "1">
<tr>
<td style = "padding-left:15px;" ><b><font size = "4" align = "center">CREDIT NOTE</font></b></td>
<td colspan = "1"></td>
<td style = "padding-left:70px;"><b><font size = "1" align = "right">Date:</font></b></td>
<td><font size = "1" align = "right">{$domain_organization}</font></td>
</tr>
<tr>
{if $organization_name}
<td style = "padding-left:17px;"><font size = "1" align = "center">{$display_name} ({$organization_name})</font></td>
{else}
<td style = "padding-left:17px;"><font size = "1" align = "center">{$display_name}</font></td>
{/if}
<td colspan = "1"></td>
<td style = "padding-left:70px;"><font size = "1" align = "right">{$invoice_date}</font></td>
<td ><font size = "1" align = "right">
{if $domain_street_address }
{$domain_street_address}
{/if}
{if $domain_supplemental_address_1 }
{$domain_supplemental_address_1}
{/if}</font></td>
</tr>
<tr>
<td style = "padding-left:17px;"><font size = "1" align = "center">{$street_address} {$supplemental_address_1}</font></td>
<td colspan = "1"></td>
<td style = "padding-left:70px;"><b><font size = "1" align = "right">Credit Note Number:</font></b></td>
<td><font size = "1" align = "right">{if $domain_supplemental_address_2 }
{$domain_supplemental_address_2}
{/if}
{if $domain_state }
{$domain_state}
{/if}
</font></td>
</tr>
<tr>
<td style = "padding-left:17px;"><font size = "1" align = "center">{$supplemental_address_2} {$stateProvinceAbbreviation}</font></td>
<td colspan="1"></td>
<td style = "padding-left:70px;"><font size = "1" align = "right">{$creditnote_id}</font></td>
<td ><font size = "1" align = "right">{if $domain_city}
{$domain_city}
{/if}
{if $domain_postal_code }
{$domain_postal_code}
{/if}
</font></td>
</tr>
<tr>
<td style = "padding-left:17px;"><font size = "1" align = "right">{$city} {$postal_code}</font></td>
<td colspan="1"></td>
<td height = "10" style = "padding-left:70px;"><b><font size = "1"align = "right">Reference:</font></b></td>
<td><font size = "1" align = "right"> {if $domain_country}
{$domain_country}
{/if}</font></td>
</tr>
<tr>
<td></td>
<td></td>
<td style = "padding-left:70px;"><font size = "1"align = "right">{$source}</font></td>
<td><font size = "1" align = "right"> {if $domain_phone}
{$domain_phone}
{/if}</font> </td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td><font size = "1" align = "right"> {if $domain_email}
{$domain_email}
{/if}</font> </td>
</tr>
</table>
<table style = "margin-top:75px;font-family: Arial, Verdana, sans-serif" width = "590" border = "0"cellpadding = "-5" cellspacing = "19" id = "desc">
<tr>
<td colspan = "2" {$valueStyle}>
<table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
<tr>
<th style = "padding-right:28px;text-align:left;font-weight:bold;width:200px;"><font size = "1">Description</font></th>
<th style = "padding-left:28px;text-align:right;font-weight:bold;"><font size = "1">Quantity</font></th>
<th style = "padding-left:28px;text-align:right;font-weight:bold;"><font size = "1">Unit Price</font></th>
<th style = "padding-left:28px;text-align:right;font-weight:bold;"><font size = "1">{$taxTerm} </font></th>
<th style = "padding-left:28px;text-align:right;font-weight:bold;"><font size = "1">Amount {$defaultCurrency}</font></th>
</tr>
{foreach from=$lineItem item=value key=priceset name=pricevalue}
{if $smarty.foreach.pricevalue.index eq 0}
<tr><td colspan = "5" ><hr size="3" style = "color:#000;"></hr></td></tr>
{else}
<tr><td colspan = "5" style = "color:#F5F5F5;"><hr></hr></td></tr>
{/if}
<tr>
<td style ="text-align:left;" ><font size = "1">
{if $value.html_type eq 'Text'}{$value.label}{else}{$value.field_title} - {$value.label}{/if} {if $value.description}<div>{$value.description|truncate:30:"..."}</div>{/if}
</font></td>
<td style = "padding-left:28px;text-align:right;"><font size = "1"> {$value.qty}</font></td>
<td style = "padding-left:28px;text-align:right;"><font size = "1"> {$value.unit_price|crmMoney:$currency}</font></td>
{if $value.tax_amount != ''}
<td style = "padding-left:28px;text-align:right;"><font size = "1"> {$value.tax_rate}%</font></td>
{else}
<td style = "padding-left:28px;text-align:right"><font size = "1" >No {$taxTerm}</font></td>
{/if}
<td style = "padding-left:28px;text-align:right;"><font size = "1" >{$value.subTotal|crmMoney:$currency}</font></td>
</tr>
{/foreach}
<tr><td colspan = "5" style = "color:#F5F5F5;"><hr></hr></td></tr>
<tr>
<td colspan = "3"></td>
<td style = "padding-left:28px;text-align:right;"><font size = "1">Sub Total</font></td>
<td style = "padding-left:28px;text-align:right;"><font size = "1"> {$subTotal|crmMoney:$currency}</font></td>
</tr>
{foreach from = $dataArray item = value key = priceset}
<tr>
<td colspan = "3"></td>
{if $priceset}
<td style = "padding-left:28px;text-align:right;"><font size = "1"> TOTAL {$taxTerm} {$priceset}%</font></td>
<td style = "padding-left:28px;text-align:right;"><font size = "1" align = "right">{$value|crmMoney:$currency}</font> </td>
{elseif $priceset == 0}
<td style = "padding-left:28px;text-align:right;"><font size = "1">TOTAL NO {$taxTerm}</font></td>
<td style = "padding-left:28px;text-align:right;"><font size = "1" align = "right">{$value|crmMoney:$currency}</font> </td>
</tr>
{/if}
{/foreach}
<tr>
<td colspan = "3"></td>
<td colspan = "2"><hr></hr></td>
</tr>
<tr>
<td colspan = "3"></td>
<td style = "padding-left:28px;text-align:right;"><b><font size = "1">TOTAL {$defaultCurrency}</font></b></td>
<td style = "padding-left:28px;text-align:right;"><font size = "1">{$amount|crmMoney:$currency}</font></td>
</tr>
{if $is_pay_later == 0}
<tr>
<td colspan = "3"></td>
<td style = "padding-left:28px;text-align:right;"><font size = "1" >LESS Credit to invoice(s)</font></td>
<td style = "padding-left:28px;text-align:right;"><font size = "1">{$amount|crmMoney:$currency}</font></td>
</tr>
<tr>
<td colspan = "3"></td>
<td colspan = "2" ><hr></hr></td>
</tr>
<tr>
<td colspan = "3"></td>
<td style = "padding-left:28px;text-align:right;"><b><font size = "1">REMAINING CREDIT</font></b></td>
<td style = "padding-left:28px;text-align:right;"><b><font size = "1">{$amountDue|crmMoney:$currency}</font></b></td>
<td style = "padding-left:28px;"><font size = "1" align = "right"></fonts></td>
</tr>
{/if}
<br/><br/><br/>
<tr>
<td colspan = "3"></td>
</tr>
<tr>
<td></td>
<td colspan = "3"></td>
</tr>
</table>
</td>
</tr>
</table>
<table style = "margin-top:5px;padding-right:45px;">
<tr>
<td><img src = "{$resourceBase}/i/contribute/cut_line.png" height = "15" width = "630"></td>
</tr>
</table>
<table style = "margin-top:6px;padding-right:20px;font-family: Arial, Verdana, sans-serif" width = "507" border = "0"cellpadding = "-5" cellspacing="19" id = "desc">
<tr>
<td width="60%"><font size = "4" align = "right"><b>CREDIT ADVICE</b><br/><br /><div style="font-size:10px;max-width:300px;">Please do not pay on this advice. Deduct the amount of this Credit Note
from your next payment to us</div><br/></font></td>
<td width="40%">
<table align="right" >
<tr>
<td colspan = "2"></td>
<td><font size = "1" align = "right" style="font-weight:bold;">Customer: </font></td>
<td><font size = "1" align = "right" >{$display_name}</font></td>
</tr>
<tr>
<td colspan = "2"></td>
<td><font size = "1" align = "right" style="font-weight:bold;">Credit Note#: </font></td>
<td><font size = "1" align = "right">{$creditnote_id}</font></td>
</tr>
<tr><td colspan = "5"style = "color:#F5F5F5;"><hr></hr></td></tr>
<tr>
<td colspan = "2"></td>
<td><font size = "1" align = "right" style="font-weight:bold;">Credit Amount:</font></td>
<td width='50px'><font size = "1" align = "right" style="font-weight:bold;">{$amount|crmMoney:$currency}</font></td>
</tr>
</table>
</td>
</tr>
</table>
{/if}
</center>
</body>
</html>

View file

@ -0,0 +1,11 @@
{if $title}
{if $component}
{if $component == 'event'}
{ts 1=$title}Event Registration Invoice: %1{/ts}
{else}
{ts 1=$title}Contribution Invoice: %1{/ts}
{/if}
{/if}
{else}
{ts}Invoice{/ts}
{/if}

View file

@ -0,0 +1,319 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
<center>
<table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
<!-- BEGIN HEADER -->
<!-- You can add table row(s) here with logo or other header elements -->
<!-- END HEADER -->
<!-- BEGIN CONTENT -->
<tr>
<td>
{if $formValues.receipt_text}
<p>{$formValues.receipt_text|htmlize}</p>
{else}
<p>{ts}Thank you for your support.{/ts}</p>
{/if}
<p>{ts}Please print this receipt for your records.{/ts}</p>
</td>
</tr>
<tr>
<td>
<table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
<tr>
<th {$headerStyle}>
{ts}Contribution Information{/ts}
</th>
</tr>
<tr>
<td {$labelStyle}>
{ts}Financial Type{/ts}
</td>
<td {$valueStyle}>
{$formValues.contributionType_name}
</td>
</tr>
{if $lineItem and !$is_quick_config}
{foreach from=$lineItem item=value key=priceset}
<tr>
<td colspan="2" {$valueStyle}>
<table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
<tr>
<th>{ts}Item{/ts}</th>
<th>{ts}Qty{/ts}</th>
<th>{ts}Each{/ts}</th>
{if $getTaxDetails}
<th>{ts}Subtotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
{/if}
<th>{ts}Total{/ts}</th>
</tr>
{foreach from=$value item=line}
<tr>
<td>
{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
</td>
<td>
{$line.qty}
</td>
<td>
{$line.unit_price|crmMoney:$currency}
</td>
{if $getTaxDetails}
<td>
{$line.unit_price*$line.qty|crmMoney:$currency}
</td>
{if $line.tax_rate != "" || $line.tax_amount != ""}
<td>
{$line.tax_rate|string_format:"%.2f"}%
</td>
<td>
{$line.tax_amount|crmMoney:$currency}
</td>
{else}
<td></td>
<td></td>
{/if}
{/if}
<td>
{$line.line_total+$line.tax_amount|crmMoney:$currency}
</td>
</tr>
{/foreach}
</table>
</td>
</tr>
{/foreach}
{/if}
{if $getTaxDetails && $dataArray}
<tr>
<td {$labelStyle}>
{ts} Amount before Tax : {/ts}
</td>
<td {$valueStyle}>
{$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
</td>
</tr>
{foreach from=$dataArray item=value key=priceset}
<tr>
{if $priceset || $priceset == 0 || $value != ''}
<td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{else}
<td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{/if}
</tr>
{/foreach}
{/if}
{if isset($totalTaxAmount) && $totalTaxAmount !== 'null'}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}
</td>
<td {$valueStyle}>
{$totalTaxAmount|crmMoney:$currency}
</td>
</tr>
{/if}
<tr>
<td {$labelStyle}>
{ts}Total Amount{/ts}
</td>
<td {$valueStyle}>
{$formValues.total_amount|crmMoney:$currency}
</td>
</tr>
{if $receive_date}
<tr>
<td {$labelStyle}>
{ts}Received Date{/ts}
</td>
<td {$valueStyle}>
{$receive_date|truncate:10:''|crmDate}
</td>
</tr>
{/if}
{if $receipt_date}
<tr>
<td {$labelStyle}>
{ts}Receipt Date{/ts}
</td>
<td {$valueStyle}>
{$receipt_date|truncate:10:''|crmDate}
</td>
</tr>
{/if}
{if $formValues.paidBy and !$formValues.hidden_CreditCard}
<tr>
<td {$labelStyle}>
{ts}Paid By{/ts}
</td>
<td {$valueStyle}>
{$formValues.paidBy}
</td>
</tr>
{if $formValues.check_number}
<tr>
<td {$labelStyle}>
{ts}Check Number{/ts}
</td>
<td {$valueStyle}>
{$formValues.check_number}
</td>
</tr>
{/if}
{/if}
{if $formValues.trxn_id}
<tr>
<td {$labelStyle}>
{ts}Transaction ID{/ts}
</td>
<td {$valueStyle}>
{$formValues.trxn_id}
</td>
</tr>
{/if}
{if $ccContribution}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$billingName}<br />
{$address|nl2br}
</td>
</tr>
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$credit_card_type}<br />
{$credit_card_number}<br />
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
</td>
</tr>
{/if}
{if $softCreditTypes and $softCredits}
{foreach from=$softCreditTypes item=softCreditType key=n}
<tr>
<th {$headerStyle}>
{$softCreditType}
</th>
</tr>
{foreach from=$softCredits.$n item=value key=label}
<tr>
<td {$labelStyle}>
{$label}
</td>
<td {$valueStyle}>
{$value}
</td>
</tr>
{/foreach}
{/foreach}
{/if}
{if $customGroup}
{foreach from=$customGroup item=value key=customName}
<tr>
<th {$headerStyle}>
{$customName}
</th>
</tr>
{foreach from=$value item=v key=n}
<tr>
<td {$labelStyle}>
{$n}
</td>
<td {$valueStyle}>
{$v}
</td>
</tr>
{/foreach}
{/foreach}
{/if}
{if $formValues.product_name}
<tr>
<th {$headerStyle}>
{ts}Premium Information{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$labelStyle}>
{$formValues.product_name}
</td>
</tr>
{if $formValues.product_option}
<tr>
<td {$labelStyle}>
{ts}Option{/ts}
</td>
<td {$valueStyle}>
{$formValues.product_option}
</td>
</tr>
{/if}
{if $formValues.product_sku}
<tr>
<td {$labelStyle}>
{ts}SKU{/ts}
</td>
<td {$valueStyle}>
{$formValues.product_sku}
</td>
</tr>
{/if}
{if $fulfilled_date}
<tr>
<td {$labelStyle}>
{ts}Sent{/ts}
</td>
<td {$valueStyle}>
{$fulfilled_date|truncate:10:''|crmDate}
</td>
</tr>
{/if}
{/if}
</table>
</td>
</tr>
</table>
</center>
</body>
</html>

View file

@ -0,0 +1,118 @@
{if $formValues.receipt_text}
{$formValues.receipt_text}
{else}{ts}Thank you for your support.{/ts}{/if}
{ts}Please print this receipt for your records.{/ts}
===========================================================
{ts}Contribution Information{/ts}
===========================================================
{ts}Financial Type{/ts}: {$formValues.contributionType_name}
{if $lineItem}
{foreach from=$lineItem item=value key=priceset}
---------------------------------------------------------
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
{capture assign=ts_each}{ts}Each{/ts}{/capture}
{if $getTaxDetails}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{/if}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $getTaxDetails} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
----------------------------------------------------------
{foreach from=$value item=line}
{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if $getTaxDetails}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
{/foreach}
{/foreach}
{/if}
{if $getTaxDetails && $dataArray}
{ts}Amount before Tax{/ts} : {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{if $priceset || $priceset == 0 || $value != ''}
{$taxTerm} {$priceset|string_format:"%.2f"}% : {$value|crmMoney:$currency}
{else}
{ts}No{/ts} {$taxTerm} : {$value|crmMoney:$currency}
{/if}
{/foreach}
{/if}
{if isset($totalTaxAmount) && $totalTaxAmount !== 'null'}
{ts}Total Tax Amount{/ts} : {$totalTaxAmount|crmMoney:$currency}
{/if}
{ts}Total Amount{/ts} : {$formValues.total_amount|crmMoney:$currency}
{if $receive_date}
{ts}Received Date{/ts}: {$receive_date|truncate:10:''|crmDate}
{/if}
{if $receipt_date}
{ts}Receipt Date{/ts}: {$receipt_date|truncate:10:''|crmDate}
{/if}
{if $formValues.paidBy and !$formValues.hidden_CreditCard}
{ts}Paid By{/ts}: {$formValues.paidBy}
{if $formValues.check_number}
{ts}Check Number{/ts}: {$formValues.check_number}
{/if}
{/if}
{if $formValues.trxn_id}
{ts}Transaction ID{/ts}: {$formValues.trxn_id}
{/if}
{if $ccContribution}
===========================================================
{ts}Billing Name and Address{/ts}
===========================================================
{$billingName}
{$address}
===========================================================
{ts}Credit Card Information{/ts}
===========================================================
{$credit_card_type}
{$credit_card_number}
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
{/if}
{if $customGroup}
{foreach from=$customGroup item=value key=customName}
===========================================================
{$customName}
===========================================================
{foreach from=$value item=v key=n}
{$n}: {$v}
{/foreach}
{/foreach}
{/if}
{if $softCreditTypes and $softCredits}
{foreach from=$softCreditTypes item=softCreditType key=n}
===========================================================
{$softCreditType}
===========================================================
{foreach from=$softCredits.$n item=value key=label}
{$label}: {$value}
{/foreach}
{/foreach}
{/if}
{if $formValues.product_name}
===========================================================
{ts}Premium Information{/ts}
===========================================================
{$formValues.product_name}
{if $formValues.product_option}
{ts}Option{/ts}: {$formValues.product_option}
{/if}
{if $formValues.product_sku}
{ts}SKU{/ts}: {$formValues.product_sku}
{/if}
{if $fulfilled_date}
{ts}Sent{/ts}: {$fulfilled_date|crmDate}
{/if}
{/if}

View file

@ -0,0 +1,473 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
<center>
<table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
<!-- BEGIN HEADER -->
<!-- You can add table row(s) here with logo or other header elements -->
<!-- END HEADER -->
<!-- BEGIN CONTENT -->
<tr>
<td>
{if $receipt_text}
<p>{$receipt_text|htmlize}</p>
{/if}
{if $is_pay_later}
<p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
{else}
<p>{ts}Please print this confirmation for your records.{/ts}</p>
{/if}
</td>
</tr>
</table>
<table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
{if $amount}
<tr>
<th {$headerStyle}>
{ts}Contribution Information{/ts}
</th>
</tr>
{if $lineItem and $priceSetID and !$is_quick_config}
{foreach from=$lineItem item=value key=priceset}
<tr>
<td colspan="2" {$valueStyle}>
<table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
<tr>
<th>{ts}Item{/ts}</th>
<th>{ts}Qty{/ts}</th>
<th>{ts}Each{/ts}</th>
{if $dataArray}
<th>{ts}Subtotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
{/if}
<th>{ts}Total{/ts}</th>
</tr>
{foreach from=$value item=line}
<tr>
<td>
{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
</td>
<td>
{$line.qty}
</td>
<td>
{$line.unit_price|crmMoney:$currency}
</td>
{if $getTaxDetails}
<td>
{$line.unit_price*$line.qty|crmMoney:$currency}
</td>
{if $line.tax_rate != "" || $line.tax_amount != ""}
<td>
{$line.tax_rate|string_format:"%.2f"}%
</td>
<td>
{$line.tax_amount|crmMoney:$currency}
</td>
{else}
<td></td>
<td></td>
{/if}
{/if}
<td>
{$line.line_total+$line.tax_amount|crmMoney:$currency}
</td>
</tr>
{/foreach}
</table>
</td>
</tr>
{/foreach}
{if $dataArray}
<tr>
<td {$labelStyle}>
{ts} Amount before Tax : {/ts}
</td>
<td {$valueStyle}>
{$amount-$totalTaxAmount|crmMoney:$currency}
</td>
</tr>
{foreach from=$dataArray item=value key=priceset}
<tr>
{if $priceset || $priceset == 0}
<td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{else}
<td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{/if}
</tr>
{/foreach}
{/if}
{if $totalTaxAmount}
<tr>
<td {$labelStyle}>
{ts}Total Tax{/ts}
</td>
<td {$valueStyle}>
{$totalTaxAmount|crmMoney:$currency}
</td>
</tr>
{/if}
<tr>
<td {$labelStyle}>
{ts}Total Amount{/ts}
</td>
<td {$valueStyle}>
{$amount|crmMoney:$currency}
</td>
</tr>
{else}
{if $totalTaxAmount}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}
</td>
<td {$valueStyle}>
{$totalTaxAmount|crmMoney:$currency}
</td>
</tr>
{/if}
<tr>
<td {$labelStyle}>
{ts}Amount{/ts}
</td>
<td {$valueStyle}>
{$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
</td>
</tr>
{/if}
{/if}
{if $receive_date}
<tr>
<td {$labelStyle}>
{ts}Date{/ts}
</td>
<td {$valueStyle}>
{$receive_date|crmDate}
</td>
</tr>
{/if}
{if $is_monetary and $trxn_id}
<tr>
<td {$labelStyle}>
{ts}Transaction #{/ts}
</td>
<td {$valueStyle}>
{$trxn_id}
</td>
</tr>
{/if}
{if $is_recur}
{if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
<tr>
<td colspan="2" {$labelStyle}>
{ts 1=$cancelSubscriptionUrl}This is a recurring contribution. You can cancel future contributions by <a href="%1">visiting this web page</a>.{/ts}
</td>
{if $updateSubscriptionBillingUrl}
<tr>
</tr>
<td colspan="2" {$labelStyle}>
{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by <a href="%1">visiting this web page</a>.{/ts}
</td>
{/if}
<tr>
</tr>
<td colspan="2" {$labelStyle}>
{ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments for this recurring contribution by <a href="%1">visiting this web page</a>.{/ts}
</td>
</tr>
{/if}
{/if}
{if $honor_block_is_active}
<tr>
<th {$headerStyle}>
{$soft_credit_type}
</th>
</tr>
{foreach from=$honoreeProfile item=value key=label}
<tr>
<td {$labelStyle}>
{$label}
</td>
<td {$valueStyle}>
{$value}
</td>
</tr>
{/foreach}
{elseif $softCreditTypes and $softCredits}
{foreach from=$softCreditTypes item=softCreditType key=n}
<tr>
<th {$headerStyle}>
{$softCreditType}
</th>
</tr>
{foreach from=$softCredits.$n item=value key=label}
<tr>
<td {$labelStyle}>
{$label}
</td>
<td {$valueStyle}>
{$value}
</td>
</tr>
{/foreach}
{/foreach}
{/if}
{if $pcpBlock}
<tr>
<th {$headerStyle}>
{ts}Personal Campaign Page{/ts}
</th>
</tr>
<tr>
<td {$labelStyle}>
{ts}Display In Honor Roll{/ts}
</td>
<td {$valueStyle}>
{if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
</td>
</tr>
{if $pcp_roll_nickname}
<tr>
<td {$labelStyle}>
{ts}Nickname{/ts}
</td>
<td {$valueStyle}>
{$pcp_roll_nickname}
</td>
</tr>
{/if}
{if $pcp_personal_note}
<tr>
<td {$labelStyle}>
{ts}Personal Note{/ts}
</td>
<td {$valueStyle}>
{$pcp_personal_note}
</td>
</tr>
{/if}
{/if}
{if $onBehalfProfile}
<tr>
<th {$headerStyle}>
{$onBehalfProfile_grouptitle}
</th>
</tr>
{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
<tr>
<td {$labelStyle}>
{$onBehalfName}
</td>
<td {$valueStyle}>
{$onBehalfValue}
</td>
</tr>
{/foreach}
{/if}
{if $isShare}
<tr>
<td colspan="2" {$valueStyle}>
{capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contributionPageId`" a=true fe=1 h=1}{/capture}
{include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$contributionUrl title=$title pageURL=$contributionUrl}
</td>
</tr>
{/if}
{if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
{if $is_pay_later && !$isBillingAddressRequiredForPayLater}
<tr>
<th {$headerStyle}>
{ts}Registered Email{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$email}
</td>
</tr>
{elseif $amount GT 0}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$billingName}<br />
{$address|nl2br}<br />
{$email}
</td>
</tr>
{/if}
{/if}
{if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$credit_card_type}<br />
{$credit_card_number}<br />
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
</td>
</tr>
{/if}
{if $selectPremium}
<tr>
<th {$headerStyle}>
{ts}Premium Information{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$labelStyle}>
{$product_name}
</td>
</tr>
{if $option}
<tr>
<td {$labelStyle}>
{ts}Option{/ts}
</td>
<td {$valueStyle}>
{$option}
</td>
</tr>
{/if}
{if $sku}
<tr>
<td {$labelStyle}>
{ts}SKU{/ts}
</td>
<td {$valueStyle}>
{$sku}
</td>
</tr>
{/if}
{if $start_date}
<tr>
<td {$labelStyle}>
{ts}Start Date{/ts}
</td>
<td {$valueStyle}>
{$start_date|crmDate}
</td>
</tr>
{/if}
{if $end_date}
<tr>
<td {$labelStyle}>
{ts}End Date{/ts}
</td>
<td {$valueStyle}>
{$end_date|crmDate}
</td>
</tr>
{/if}
{if $contact_email OR $contact_phone}
<tr>
<td colspan="2" {$valueStyle}>
<p>{ts}For information about this premium, contact:{/ts}</p>
{if $contact_email}
<p>{$contact_email}</p>
{/if}
{if $contact_phone}
<p>{$contact_phone}</p>
{/if}
</td>
</tr>
{/if}
{if $is_deductible AND $price}
<tr>
<td colspan="2" {$valueStyle}>
<p>{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
</td>
</tr>
{/if}
{/if}
{if $customPre}
<tr>
<th {$headerStyle}>
{$customPre_grouptitle}
</th>
</tr>
{foreach from=$customPre item=customValue key=customName}
{if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
<tr>
<td {$labelStyle}>
{$customName}
</td>
<td {$valueStyle}>
{$customValue}
</td>
</tr>
{/if}
{/foreach}
{/if}
{if $customPost}
<tr>
<th {$headerStyle}>
{$customPost_grouptitle}
</th>
</tr>
{foreach from=$customPost item=customValue key=customName}
{if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
<tr>
<td {$labelStyle}>
{$customName}
</td>
<td {$valueStyle}>
{$customValue}
</td>
</tr>
{/if}
{/foreach}
{/if}
</table>
</center>
</body>
</html>

View file

@ -0,0 +1,209 @@
{if $receipt_text}
{$receipt_text}
{/if}
{if $is_pay_later}
===========================================================
{$pay_later_receipt}
===========================================================
{else}
{ts}Please print this receipt for your records.{/ts}
{/if}
{if $amount}
===========================================================
{ts}Contribution Information{/ts}
===========================================================
{if $lineItem and $priceSetID and !$is_quick_config}
{foreach from=$lineItem item=value key=priceset}
---------------------------------------------------------
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
{capture assign=ts_each}{ts}Each{/ts}{/capture}
{if $dataArray}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{/if}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
----------------------------------------------------------
{foreach from=$value item=line}
{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if $dataArray}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}
{/foreach}
{/foreach}
{if $dataArray}
{ts}Amount before Tax{/ts}: {$amount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{if $priceset || $priceset == 0}
{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
{else}
{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
{/if}
{/foreach}
{/if}
{if $totalTaxAmount}
{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
{/if}
{ts}Total Amount{/ts}: {$amount|crmMoney:$currency}
{else}
{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if $amount_level } - {$amount_level} {/if}
{/if}
{/if}
{if $receive_date}
{ts}Date{/ts}: {$receive_date|crmDate}
{/if}
{if $is_monetary and $trxn_id}
{ts}Transaction #{/ts}: {$trxn_id}
{/if}
{if $is_recur and ($contributeMode eq 'notify' or $contributeMode eq 'directIPN')}
{ts}This is a recurring contribution. You can cancel future contributions at:{/ts}
{$cancelSubscriptionUrl}
{if $updateSubscriptionBillingUrl}
{ts}You can update billing details for this recurring contribution at:{/ts}
{$updateSubscriptionBillingUrl}
{/if}
{ts}You can update recurring contribution amount or change the number of installments for this recurring contribution at:{/ts}
{$updateSubscriptionUrl}
{/if}
{if $honor_block_is_active}
===========================================================
{$soft_credit_type}
===========================================================
{foreach from=$honoreeProfile item=value key=label}
{$label}: {$value}
{/foreach}
{elseif $softCreditTypes and $softCredits}
{foreach from=$softCreditTypes item=softCreditType key=n}
===========================================================
{$softCreditType}
===========================================================
{foreach from=$softCredits.$n item=value key=label}
{$label}: {$value}
{/foreach}
{/foreach}
{/if}
{if $pcpBlock}
===========================================================
{ts}Personal Campaign Page{/ts}
===========================================================
{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
{/if}
{if $onBehalfProfile}
===========================================================
{ts}On Behalf Of{/ts}
===========================================================
{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
{$onBehalfName}: {$onBehalfValue}
{/foreach}
{/if}
{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
{if $is_pay_later && !$isBillingAddressRequiredForPayLater}
===========================================================
{ts}Registered Email{/ts}
===========================================================
{$email}
{elseif $amount GT 0}
===========================================================
{ts}Billing Name and Address{/ts}
===========================================================
{$billingName}
{$address}
{$email}
{/if} {* End ! is_pay_later condition. *}
{/if}
{if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
===========================================================
{ts}Credit Card Information{/ts}
===========================================================
{$credit_card_type}
{$credit_card_number}
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
{/if}
{if $selectPremium }
===========================================================
{ts}Premium Information{/ts}
===========================================================
{$product_name}
{if $option}
{ts}Option{/ts}: {$option}
{/if}
{if $sku}
{ts}SKU{/ts}: {$sku}
{/if}
{if $start_date}
{ts}Start Date{/ts}: {$start_date|crmDate}
{/if}
{if $end_date}
{ts}End Date{/ts}: {$end_date|crmDate}
{/if}
{if $contact_email OR $contact_phone}
{ts}For information about this premium, contact:{/ts}
{if $contact_email}
{$contact_email}
{/if}
{if $contact_phone}
{$contact_phone}
{/if}
{/if}
{if $is_deductible AND $price}
{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
{/if}
{if $customPre}
===========================================================
{$customPre_grouptitle}
===========================================================
{foreach from=$customPre item=customValue key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
{$customName}: {$customValue}
{/if}
{/foreach}
{/if}
{if $customPost}
===========================================================
{$customPost_grouptitle}
===========================================================
{foreach from=$customPost item=customValue key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
{$customName}: {$customValue}
{/if}
{/foreach}
{/if}

View file

@ -0,0 +1,526 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
<center>
<table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
<!-- BEGIN HEADER -->
<!-- You can add table row(s) here with logo or other header elements -->
<!-- END HEADER -->
<!-- BEGIN CONTENT -->
<tr>
<td>
{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
<p>{$event.confirm_email_text|htmlize}</p>
{/if}
{if $isOnWaitlist}
<p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
{if $isPrimary}
<p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
{/if}
{elseif $isRequireApproval}
<p>{ts}Your registration has been submitted.{/ts}</p>
{if $isPrimary}
<p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
{/if}
{elseif $is_pay_later}
<p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
{else}
<p>{ts}Please print this confirmation for your records.{/ts}</p>
{/if}
</td>
</tr>
<tr>
<td>
<table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
<tr>
<th {$headerStyle}>
{ts}Event Information and Location{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$event.event_title}<br />
{$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|crmDate}{/if}{/if}
</td>
</tr>
{if $event.participant_role neq 'Attendee' and $defaultRole}
<tr>
<td {$labelStyle}>
{ts}Participant Role{/ts}
</td>
<td {$valueStyle}>
{$event.participant_role}
</td>
</tr>
{/if}
{if $isShowLocation}
<tr>
<td colspan="2" {$valueStyle}>
{if $location.address.1.name}
{$location.address.1.name}<br />
{/if}
{if $location.address.1.street_address}
{$location.address.1.street_address}<br />
{/if}
{if $location.address.1.supplemental_address_1}
{$location.address.1.supplemental_address_1}<br />
{/if}
{if $location.address.1.supplemental_address_2}
{$location.address.1.supplemental_address_2}<br />
{/if}
{if $location.address.1.city}
{$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
{/if}
</td>
</tr>
{/if}
{if $location.phone.1.phone || $location.email.1.email}
<tr>
<td colspan="2" {$labelStyle}>
{ts}Event Contacts:{/ts}
</td>
</tr>
{foreach from=$location.phone item=phone}
{if $phone.phone}
<tr>
<td {$labelStyle}>
{if $phone.phone_type}
{$phone.phone_type_display}
{else}
{ts}Phone{/ts}
{/if}
</td>
<td {$valueStyle}>
{$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
</td>
</tr>
{/if}
{/foreach}
{foreach from=$location.email item=eventEmail}
{if $eventEmail.email}
<tr>
<td {$labelStyle}>
{ts}Email{/ts}
</td>
<td {$valueStyle}>
{$eventEmail.email}
</td>
</tr>
{/if}
{/foreach}
{/if}
{if $event.is_public}
<tr>
<td colspan="2" {$valueStyle}>
{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
<a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
</td>
</tr>
{/if}
{if $email}
<tr>
<th {$headerStyle}>
{ts}Registered Email{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$email}
</td>
</tr>
{/if}
{if $event.is_monetary}
<tr>
<th {$headerStyle}>
{$event.fee_label}
</th>
</tr>
{if $lineItem}
{foreach from=$lineItem item=value key=priceset}
{if $value neq 'skip'}
{if $isPrimary}
{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
<tr>
<td colspan="2" {$labelStyle}>
{ts 1=$priceset+1}Participant %1{/ts}
</td>
</tr>
{/if}
{/if}
<tr>
<td colspan="2" {$valueStyle}>
<table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
<tr>
<th>{ts}Item{/ts}</th>
<th>{ts}Qty{/ts}</th>
<th>{ts}Each{/ts}</th>
{if $dataArray}
<th>{ts}SubTotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
{/if}
<th>{ts}Total{/ts}</th>
{if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
</tr>
{foreach from=$value item=line}
<tr>
<td>
{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
</td>
<td>
{$line.qty}
</td>
<td>
{$line.unit_price|crmMoney}
</td>
{if $dataArray}
<td>
{$line.unit_price*$line.qty|crmMoney}
</td>
{if $line.tax_rate != "" || $line.tax_amount != ""}
<td>
{$line.tax_rate|string_format:"%.2f"}%
</td>
<td>
{$line.tax_amount|crmMoney}
</td>
{else}
<td></td>
<td></td>
{/if}
{/if}
<td>
{$line.line_total+$line.tax_amount|crmMoney}
</td>
{if $pricesetFieldsCount }
<td>
{$line.participant_count}
</td>
{/if}
</tr>
{/foreach}
</table>
</td>
</tr>
{/if}
{/foreach}
{if $dataArray}
<tr>
<td {$labelStyle}>
{ts} Amount Before Tax : {/ts}
</td>
<td {$valueStyle}>
{$totalAmount-$totalTaxAmount|crmMoney}
</td>
</tr>
{foreach from=$dataArray item=value key=priceset}
<tr>
{if $priceset || $priceset == 0}
<td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{else}
<td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{/if}
</tr>
{/foreach}
{/if}
{/if}
{if $amount && !$lineItem}
{foreach from=$amount item=amnt key=level}
<tr>
<td colspan="2" {$valueStyle}>
{$amnt.amount|crmMoney} {$amnt.label}
</td>
</tr>
{/foreach}
{/if}
{if $totalTaxAmount}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}
</td>
<td {$valueStyle}>
{$totalTaxAmount|crmMoney:$currency}
</td>
</tr>
{/if}
{if $isPrimary}
<tr>
<td {$labelStyle}>
{if $balanceAmount}
{ts}Total Paid{/ts}
{else}
{ts}Total Amount{/ts}
{/if}
</td>
<td {$valueStyle}>
{$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
</td>
</tr>
{if $balanceAmount}
<tr>
<td {$labelStyle}>
{ts}Balance{/ts}
</td>
<td {$valueStyle}>
{$balanceAmount|crmMoney}
</td>
</tr>
{/if}
{if $pricesetFieldsCount }
<tr>
<td {$labelStyle}>
{ts}Total Participants{/ts}</td>
<td {$valueStyle}>
{assign var="count" value= 0}
{foreach from=$lineItem item=pcount}
{assign var="lineItemCount" value=0}
{if $pcount neq 'skip'}
{foreach from=$pcount item=p_count}
{assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
{/foreach}
{if $lineItemCount < 1 }
assign var="lineItemCount" value=1}
{/if}
{assign var="count" value=$count+$lineItemCount}
{/if}
{/foreach}
{$count}
</td>
</tr>
{/if}
{if $is_pay_later}
<tr>
<td colspan="2" {$labelStyle}>
{$pay_later_receipt}
</td>
</tr>
{/if}
{if $register_date}
<tr>
<td {$labelStyle}>
{ts}Registration Date{/ts}
</td>
<td {$valueStyle}>
{$register_date|crmDate}
</td>
</tr>
{/if}
{if $receive_date}
<tr>
<td {$labelStyle}>
{ts}Transaction Date{/ts}
</td>
<td {$valueStyle}>
{$receive_date|crmDate}
</td>
</tr>
{/if}
{if $contributionTypeName}
<tr>
<td {$labelStyle}>
{ts}Financial Type{/ts}
</td>
<td {$valueStyle}>
{$contributionTypeName}
</td>
</tr>
{/if}
{if $trxn_id}
<tr>
<td {$labelStyle}>
{ts}Transaction #{/ts}
</td>
<td {$valueStyle}>
{$trxn_id}
</td>
</tr>
{/if}
{if $paidBy}
<tr>
<td {$labelStyle}>
{ts}Paid By{/ts}
</td>
<td {$valueStyle}>
{$paidBy}
</td>
</tr>
{/if}
{if $checkNumber}
<tr>
<td {$labelStyle}>
{ts}Check Number{/ts}
</td>
<td {$valueStyle}>
{$checkNumber}
</td>
</tr>
{/if}
{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$billingName}<br />
{$address|nl2br}
</td>
</tr>
{/if}
{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$credit_card_type}<br />
{$credit_card_number}<br />
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
</td>
</tr>
{/if}
{/if}
{/if} {* End of conditional section for Paid events *}
{if $customPre}
<tr>
<th {$headerStyle}>
{$customPre_grouptitle}
</th>
</tr>
{foreach from=$customPre item=value key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
<tr>
<td {$labelStyle}>
{$customName}
</td>
<td {$valueStyle}>
{$value}
</td>
</tr>
{/if}
{/foreach}
{/if}
{if $customPost}
<tr>
<th {$headerStyle}>
{$customPost_grouptitle}
</th>
</tr>
{foreach from=$customPost item=value key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
<tr>
<td {$labelStyle}>
{$customName}
</td>
<td {$valueStyle}>
{$value}
</td>
</tr>
{/if}
{/foreach}
{/if}
{if $customProfile}
{foreach from=$customProfile item=value key=customName}
<tr>
<th {$headerStyle}>
{ts 1=$customName+1}Participant Information - Participant %1{/ts}
</th>
</tr>
{foreach from=$value item=val key=field}
{if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
<tr>
<td colspan="2" {$labelStyle}>
{if $field eq 'additionalCustomPre'}
{$additionalCustomPre_grouptitle}
{else}
{$additionalCustomPost_grouptitle}
{/if}
</td>
</tr>
{foreach from=$val item=v key=f}
<tr>
<td {$labelStyle}>
{$f}
</td>
<td {$valueStyle}>
{$v}
</td>
</tr>
{/foreach}
{/if}
{/foreach}
{/foreach}
{/if}
{if $customGroup}
{foreach from=$customGroup item=value key=customName}
<tr>
<th {$headerStyle}>
{$customName}
</th>
</tr>
{foreach from=$value item=v key=n}
<tr>
<td {$labelStyle}>
{$n}
</td>
<td {$valueStyle}>
{$v}
</td>
</tr>
{/foreach}
{/foreach}
{/if}
</table>
</td>
</tr>
</table>
</center>
</body>
</html>

View file

@ -0,0 +1,303 @@
{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
{$event.confirm_email_text}
{/if}
{if $isOnWaitlist}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts}You have been added to the WAIT LIST for this event.{/ts}
{if $isPrimary}
{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
{/if}
==========================================================={if $pricesetFieldsCount }===================={/if}
{elseif $isRequireApproval}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts}Your registration has been submitted.{/ts}
{if $isPrimary}
{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
{/if}
==========================================================={if $pricesetFieldsCount }===================={/if}
{elseif $is_pay_later}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$pay_later_receipt}
==========================================================={if $pricesetFieldsCount }===================={/if}
{else}
{ts}Please print this confirmation for your records.{/ts}
{/if}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts}Event Information and Location{/ts}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$event.event_title}
{$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|crmDate}{/if}{/if}
{if $event.participant_role neq 'Attendee' and $defaultRole}
{ts}Participant Role{/ts}: {$event.participant_role}
{/if}
{if $isShowLocation}
{if $location.address.1.name}
{$location.address.1.name}
{/if}
{if $location.address.1.street_address}{$location.address.1.street_address}
{/if}
{if $location.address.1.supplemental_address_1}{$location.address.1.supplemental_address_1}
{/if}
{if $location.address.1.supplemental_address_2}{$location.address.1.supplemental_address_2}
{/if}
{if $location.address.1.city}{$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}
{/if}
{/if}{*End of isShowLocation condition*}
{if $location.phone.1.phone || $location.email.1.email}
{ts}Event Contacts:{/ts}
{foreach from=$location.phone item=phone}
{if $phone.phone}
{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if}
{/foreach}
{foreach from=$location.email item=eventEmail}
{if $eventEmail.email}
{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
{/if}
{if $event.is_public}
{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
{ts}Download iCalendar File:{/ts} {$icalFeed}
{/if}
{if $email}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts}Registered Email{/ts}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$email}
{/if}
{if $event.is_monetary} {* This section for Paid events only.*}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$event.fee_label}
==========================================================={if $pricesetFieldsCount }===================={/if}
{if $lineItem}{foreach from=$lineItem item=value key=priceset}
{if $value neq 'skip'}
{if $isPrimary}
{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
{ts 1=$priceset+1}Participant %1{/ts}
{/if}
{/if}
---------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
{capture assign=ts_each}{ts}Each{/ts}{/capture}
{if $dataArray}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{/if}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
{capture assign=ts_participant_total}{if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if}{/capture}
{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
{foreach from=$value item=line}
{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {$ts_participant_count|string_format:"%10s"}
{/foreach}
{/if}
{/foreach}
{if $dataArray}
{ts}Amount before Tax{/ts}: {$totalAmount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{if $priceset || $priceset == 0}
{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
{else}
{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
{/if}
{/foreach}
{/if}
{/if}
{if $amount && !$lineItem}
{foreach from=$amount item=amnt key=level}{$amnt.amount|crmMoney} {$amnt.label}
{/foreach}
{/if}
{if $totalTaxAmount}
{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
{/if}
{if $isPrimary}
{if $balanceAmount}{ts}Total Paid{/ts}{else}{ts}Total Amount{/ts}{/if}: {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
{if $balanceAmount}
{ts}Balance{/ts}: {$balanceAmount|crmMoney}
{/if}
{if $pricesetFieldsCount }
{assign var="count" value= 0}
{foreach from=$lineItem item=pcount}
{assign var="lineItemCount" value=0}
{if $pcount neq 'skip'}
{foreach from=$pcount item=p_count}
{assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
{/foreach}
{if $lineItemCount < 1 }
{assign var="lineItemCount" value=1}
{/if}
{assign var="count" value=$count+$lineItemCount}
{/if}
{/foreach}
{ts}Total Participants{/ts}: {$count}
{/if}
{if $is_pay_later }
==========================================================={if $pricesetFieldsCount }===================={/if}
{$pay_later_receipt}
==========================================================={if $pricesetFieldsCount }===================={/if}
{/if}
{if $register_date}
{ts}Registration Date{/ts}: {$register_date|crmDate}
{/if}
{if $receive_date}
{ts}Transaction Date{/ts}: {$receive_date|crmDate}
{/if}
{if $contributionTypeName}
{ts}Financial Type{/ts}: {$contributionTypeName}
{/if}
{if $trxn_id}
{ts}Transaction #{/ts}: {$trxn_id}
{/if}
{if $paidBy}
{ts}Paid By{/ts}: {$paidBy}
{/if}
{if $checkNumber}
{ts}Check Number{/ts}: {$checkNumber}
{/if}
{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts}Billing Name and Address{/ts}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$billingName}
{$address}
{/if}
{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
===========================================================
{ts}Credit Card Information{/ts}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$credit_card_type}
{$credit_card_number}
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
{/if}
{/if}
{/if} {* End of conditional section for Paid events *}
{if $customPre}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$customPre_grouptitle}
==========================================================={if $pricesetFieldsCount }===================={/if}
{foreach from=$customPre item=value key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
{$customName}: {$value}
{/if}
{/foreach}
{/if}
{if $customPost}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$customPost_grouptitle}
==========================================================={if $pricesetFieldsCount }===================={/if}
{foreach from=$customPost item=value key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
{$customName}: {$value}
{/if}
{/foreach}
{/if}
{if $customProfile}
{foreach from=$customProfile item=value key=customName}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts 1=$customName+1}Participant Information - Participant %1{/ts}
==========================================================={if $pricesetFieldsCount }===================={/if}
{foreach from=$value item=val key=field}
{if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost' }
{if $field eq 'additionalCustomPre' }
----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
{$additionalCustomPre_grouptitle}
----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
{else}
----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
{$additionalCustomPost_grouptitle}
----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
{/if}
{foreach from=$val item=v key=f}
{$f}: {$v}
{/foreach}
{/if}
{/foreach}
{/foreach}
{/if}
{if $customGroup}
{foreach from=$customGroup item=value key=customName}
=========================================================={if $pricesetFieldsCount }===================={/if}
{$customName}
=========================================================={if $pricesetFieldsCount }===================={/if}
{foreach from=$value item=v key=n}
{$n}: {$v}
{/foreach}
{/foreach}
{/if}

View file

@ -0,0 +1,506 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
<center>
<table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
<!-- BEGIN HEADER -->
<!-- You can add table row(s) here with logo or other header elements -->
<!-- END HEADER -->
<!-- BEGIN CONTENT -->
<tr>
<td>
<p>Dear {contact.display_name},</p>
{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
<p>{$event.confirm_email_text|htmlize}</p>
{else}
<p>Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to <strong>{if $participant_status}{$participant_status}{else}{if $isOnWaitlist}waitlisted{else}registered{/if}{/if}</strong>.</p>
{/if}
<p>
{if $isOnWaitlist}
<p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
{if $isPrimary}
<p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
{/if}
{elseif $isRequireApproval}
<p>{ts}Your registration has been submitted.{/ts}</p>
{if $isPrimary}
<p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
{/if}
{elseif $is_pay_later && !$isAmountzero && !$isAdditionalParticipant}
<p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
{else}
<p>{ts}Please print this confirmation for your records.{/ts}</p>
{/if}
</td>
</tr>
<tr>
<td>
<table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
<tr>
<th {$headerStyle}>
{ts}Event Information and Location{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$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>
</tr>
{if $conference_sessions}
<tr>
<td colspan="2" {$labelStyle}>
{ts}Your schedule:{/ts}
</td>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{assign var='group_by_day' value='NA'}
{foreach from=$conference_sessions item=session}
{if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"}
{assign var='group_by_day' value=$session.start_date}
<em>{$group_by_day|date_format:"%m/%d/%Y"}</em><br />
{/if}
{$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}<br />
{if $session.location}&nbsp;&nbsp;&nbsp;&nbsp;{$session.location}<br />{/if}
{/foreach}
</td>
</tr>
{/if}
{if $event.participant_role neq 'Attendee' and $defaultRole}
<tr>
<td {$labelStyle}>
{ts}Participant Role{/ts}
</td>
<td {$valueStyle}>
{$event.participant_role}
</td>
</tr>
{/if}
{if $isShowLocation}
<tr>
<td colspan="2" {$valueStyle}>
{if $location.address.1.name}
{$location.address.1.name}<br />
{/if}
{if $location.address.1.street_address}
{$location.address.1.street_address}<br />
{/if}
{if $location.address.1.supplemental_address_1}
{$location.address.1.supplemental_address_1}<br />
{/if}
{if $location.address.1.supplemental_address_2}
{$location.address.1.supplemental_address_2}<br />
{/if}
{if $location.address.1.city}
{$location.address.1.city}, {$location.address.1.state_province} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
{/if}
</td>
</tr>
{/if}
{if $location.phone.1.phone || $location.email.1.email}
<tr>
<td colspan="2" {$labelStyle}>
{ts}Event Contacts:{/ts}
</td>
</tr>
{foreach from=$location.phone item=phone}
{if $phone.phone}
<tr>
<td {$labelStyle}>
{if $phone.phone_type}
{$phone.phone_type_display}
{else}
{ts}Phone{/ts}
{/if}
</td>
<td {$valueStyle}>
{$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
</td>
</tr>
{/if}
{/foreach}
{foreach from=$location.email item=eventEmail}
{if $eventEmail.email}
<tr>
<td {$labelStyle}>
{ts}Email{/ts}
</td>
<td {$valueStyle}>
{$eventEmail.email}
</td>
</tr>
{/if}
{/foreach}
{/if}
{if $event.is_public}
<tr>
<td colspan="2" {$valueStyle}>
{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
<a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
</td>
</tr>
{/if}
{if $event.is_share}
<tr>
<td colspan="2" {$valueStyle}>
{capture assign=eventUrl}{crmURL p='civicrm/event/info' q="id=`$event.id`&reset=1" a=true fe=1 h=1}{/capture}
{include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$eventUrl title=$event.title pageURL=$eventUrl}
</td>
</tr>
{/if}
{if $payer.name}
<tr>
<th {$headerStyle}>
{ts}You were registered by:{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$payer.name}
</td>
</tr>
{/if}
{if $event.is_monetary}
<tr>
<th {$headerStyle}>
{$event.fee_label}
</th>
</tr>
{if $lineItem}
{foreach from=$lineItem item=value key=priceset}
{if $value neq 'skip'}
{if $isPrimary}
{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
<tr>
<td colspan="2" {$labelStyle}>
{ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
</td>
</tr>
{/if}
{/if}
<tr>
<td colspan="2" {$valueStyle}>
<table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
<tr>
<th>{ts}Item{/ts}</th>
<th>{ts}Qty{/ts}</th>
<th>{ts}Each{/ts}</th>
{if $dataArray}
<th>{ts}SubTotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
{/if}
<th>{ts}Total{/ts}</th>
{if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
</tr>
{foreach from=$value item=line}
<tr>
<td>
{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
</td>
<td>
{$line.qty}
</td>
<td>
{$line.unit_price|crmMoney:$currency}
</td>
{if $dataArray}
<td>
{$line.unit_price*$line.qty|crmMoney}
</td>
{if $line.tax_rate != "" || $line.tax_amount != ""}
<td>
{$line.tax_rate|string_format:"%.2f"}%
</td>
<td>
{$line.tax_amount|crmMoney}
</td>
{else}
<td></td>
<td></td>
{/if}
{/if}
<td>
{$line.line_total+$line.tax_amount|crmMoney:$currency}
</td>
{if $pricesetFieldsCount }<td>{$line.participant_count}</td> {/if}
</tr>
{/foreach}
</table>
</td>
</tr>
{/if}
{/foreach}
{if $dataArray}
<tr>
<td {$labelStyle}>
{ts} Amount Before Tax: {/ts}
</td>
<td {$valueStyle}>
{$totalAmount-$totalTaxAmount|crmMoney}
</td>
</tr>
{foreach from=$dataArray item=value key=priceset}
<tr>
{if $priceset || $priceset == 0}
<td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{else}
<td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{/if}
</tr>
{/foreach}
{/if}
{/if}
{if $amounts && !$lineItem}
{foreach from=$amounts item=amnt key=level}
<tr>
<td colspan="2" {$valueStyle}>
{$amnt.amount|crmMoney:$currency} {$amnt.label}
</td>
</tr>
{/foreach}
{/if}
{if $totalTaxAmount}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}
</td>
<td {$valueStyle}>
{$totalTaxAmount|crmMoney:$currency}
</td>
</tr>
{/if}
{if $isPrimary}
<tr>
<td {$labelStyle}>
{ts}Total Amount{/ts}
</td>
<td {$valueStyle}>
{$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if}
</td>
</tr>
{if $pricesetFieldsCount }
<tr>
<td {$labelStyle}>
{ts}Total Participants{/ts}</td>
<td {$valueStyle}>
{assign var="count" value= 0}
{foreach from=$lineItem item=pcount}
{assign var="lineItemCount" value=0}
{if $pcount neq 'skip'}
{foreach from=$pcount item=p_count}
{assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
{/foreach}
{if $lineItemCount < 1 }
{assign var="lineItemCount" value=1}
{/if}
{assign var="count" value=$count+$lineItemCount}
{/if}
{/foreach}
{$count}
</td> </tr>
{/if}
{if $register_date}
<tr>
<td {$labelStyle}>
{ts}Registration Date{/ts}
</td>
<td {$valueStyle}>
{$register_date|crmDate}
</td>
</tr>
{/if}
{if $receive_date}
<tr>
<td {$labelStyle}>
{ts}Transaction Date{/ts}
</td>
<td {$valueStyle}>
{$receive_date|crmDate}
</td>
</tr>
{/if}
{if $contributionTypeName}
<tr>
<td {$labelStyle}>
{ts}Financial Type{/ts}
</td>
<td {$valueStyle}>
{$contributionTypeName}
</td>
</tr>
{/if}
{if $trxn_id}
<tr>
<td {$labelStyle}>
{ts}Transaction #{/ts}
</td>
<td {$valueStyle}>
{$trxn_id}
</td>
</tr>
{/if}
{if $paidBy}
<tr>
<td {$labelStyle}>
{ts}Paid By{/ts}
</td>
<td {$valueStyle}>
{$paidBy}
</td>
</tr>
{/if}
{if $checkNumber}
<tr>
<td {$labelStyle}>
{ts}Check Number{/ts}
</td>
<td {$valueStyle}>
{$checkNumber}
</td>
</tr>
{/if}
{if $contributeMode ne 'notify' and !$isAmountzero and (!$is_pay_later or $isBillingAddressRequiredForPayLater) and !$isOnWaitlist and !$isRequireApproval}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$billingName}<br />
{$address|nl2br}
</td>
</tr>
{/if}
{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$credit_card_type}<br />
{$credit_card_number}<br />
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
</td>
</tr>
{/if}
{/if}
{/if} {* End of conditional section for Paid events *}
{if $customPre}
{foreach from=$customPre item=customPr key=i}
<tr> <th {$headerStyle}>{$customPre_grouptitle.$i}</th></tr>
{foreach from=$customPr item=customValue key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
<tr>
<td {$labelStyle}>{$customName}</td>
<td {$valueStyle}>{$customValue}</td>
</tr>
{/if}
{/foreach}
{/foreach}
{/if}
{if $customPost}
{foreach from=$customPost item=customPos key=j}
<tr> <th {$headerStyle}>{$customPost_grouptitle.$j}</th></tr>
{foreach from=$customPos item=customValue key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
<tr>
<td {$labelStyle}>{$customName}</td>
<td {$valueStyle}>{$customValue}</td>
</tr>
{/if}
{/foreach}
{/foreach}
{/if}
{if $customProfile}
{foreach from=$customProfile.profile item=eachParticipant key=participantID}
<tr><th {$headerStyle}>{ts 1=$participantID+2}Participant %1{/ts} </th></tr>
{foreach from=$eachParticipant item=eachProfile key=pid}
<tr><th {$headerStyle}>{$customProfile.title.$pid}</th></tr>
{foreach from=$eachProfile item=val key=field}
<tr>{foreach from=$val item=v key=f}
<td {$labelStyle}>{$field}</td>
<td {$valueStyle}>{$v}</td>
{/foreach}
</tr>
{/foreach}
{/foreach}
{/foreach}
{/if}
{if $customGroup}
{foreach from=$customGroup item=value key=customName}
<tr>
<th {$headerStyle}>
{$customName}
</th>
</tr>
{foreach from=$value item=v key=n}
<tr>
<td {$labelStyle}>
{$n}
</td>
<td {$valueStyle}>
{$v}
</td>
</tr>
{/foreach}
{/foreach}
{/if}
</table>
</td>
</tr>
</table>
</center>
</body>
</html>

View file

@ -0,0 +1,301 @@
Dear {contact.display_name},
{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
{$event.confirm_email_text}
{else}
Thank you for your participation. This letter is a confirmation that your registration has been received and your status has been updated to {if $participant_status}{$participant_status}{else}{if $isOnWaitlist}waitlisted{else}registered{/if}{/if}.
{/if}
{if $isOnWaitlist}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts}You have been added to the WAIT LIST for this event.{/ts}
{if $isPrimary}
{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
{/if}
==========================================================={if $pricesetFieldsCount }===================={/if}
{elseif $isRequireApproval}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts}Your registration has been submitted.{/ts}
{if $isPrimary}
{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
{/if}
==========================================================={if $pricesetFieldsCount }===================={/if}
{elseif $is_pay_later && !$isAmountzero && !$isAdditionalParticipant}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$pay_later_receipt}
==========================================================={if $pricesetFieldsCount }===================={/if}
{else}
{ts}Please print this confirmation for your records.{/ts}
{/if}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts}Event Information and Location{/ts}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$event.event_title}
{$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}
{if $conference_sessions}
{ts}Your schedule:{/ts}
{assign var='group_by_day' value='NA'}
{foreach from=$conference_sessions item=session}
{if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"}
{assign var='group_by_day' value=$session.start_date}
{$group_by_day|date_format:"%m/%d/%Y"}
{/if}
{$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
{if $session.location} {$session.location}{/if}
{/foreach}
{/if}
{if $event.participant_role neq 'Attendee' and $defaultRole}
{ts}Participant Role{/ts}: {$event.participant_role}
{/if}
{if $isShowLocation}
{if $location.address.1.name}
{$location.address.1.name}
{/if}
{if $location.address.1.street_address}{$location.address.1.street_address}
{/if}
{if $location.address.1.supplemental_address_1}{$location.address.1.supplemental_address_1}
{/if}
{if $location.address.1.supplemental_address_2}{$location.address.1.supplemental_address_2}
{/if}
{if $location.address.1.city}{$location.address.1.city}, {$location.address.1.state_province} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}
{/if}
{/if}{*End of isShowLocation condition*}
{if $location.phone.1.phone || $location.email.1.email}
{ts}Event Contacts:{/ts}
{foreach from=$location.phone item=phone}
{if $phone.phone}
{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if}
{/foreach}
{foreach from=$location.email item=eventEmail}
{if $eventEmail.email}
{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
{/if}
{if $event.is_public}
{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
{ts}Download iCalendar File:{/ts} {$icalFeed}
{/if}
{if $payer.name}
You were registered by: {$payer.name}
{/if}
{if $event.is_monetary} {* This section for Paid events only.*}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$event.fee_label}
==========================================================={if $pricesetFieldsCount }===================={/if}
{if $lineItem}{foreach from=$lineItem item=value key=priceset}
{if $value neq 'skip'}
{if $isPrimary}
{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
{ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
{/if}
{/if}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
{capture assign=ts_each}{ts}Each{/ts}{/capture}
{if $dataArray}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{/if}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
{if $pricesetFieldsCount }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
-----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
{foreach from=$value item=line}
{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}{$ts_participant_count|string_format:"%10s"}
{/foreach}
{/if}
{/foreach}
{if $dataArray}
{ts}Amount before Tax{/ts}: {$totalAmount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{if $priceset || $priceset == 0}
{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
{else}
{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
{/if}
{/foreach}
{/if}
{/if}
{if $amounts && !$lineItem}
{foreach from=$amounts item=amnt key=level}{$amnt.amount|crmMoney:$currency} {$amnt.label}
{/foreach}
{/if}
{if $totalTaxAmount}
{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
{/if}
{if $isPrimary }
{ts}Total Amount{/ts}: {$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if}
{if $pricesetFieldsCount }
{assign var="count" value= 0}
{foreach from=$lineItem item=pcount}
{assign var="lineItemCount" value=0}
{if $pcount neq 'skip'}
{foreach from=$pcount item=p_count}
{assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
{/foreach}
{if $lineItemCount < 1 }
{assign var="lineItemCount" value=1}
{/if}
{assign var="count" value=$count+$lineItemCount}
{/if}
{/foreach}
{ts}Total Participants{/ts}: {$count}
{/if}
{if $register_date}
{ts}Registration Date{/ts}: {$register_date|crmDate}
{/if}
{if $receive_date}
{ts}Transaction Date{/ts}: {$receive_date|crmDate}
{/if}
{if $contributionTypeName}
{ts}Financial Type{/ts}: {$contributionTypeName}
{/if}
{if $trxn_id}
{ts}Transaction #{/ts}: {$trxn_id}
{/if}
{if $paidBy}
{ts}Paid By{/ts}: {$paidBy}
{/if}
{if $checkNumber}
{ts}Check Number{/ts}: {$checkNumber}
{/if}
{if $contributeMode ne 'notify' and !$isAmountzero and (!$is_pay_later or $isBillingAddressRequiredForPayLater) and !$isOnWaitlist and !$isRequireApproval}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts}Billing Name and Address{/ts}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$billingName}
{$address}
{/if}
{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts}Credit Card Information{/ts}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$credit_card_type}
{$credit_card_number}
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
{/if}
{/if}
{/if} {* End of conditional section for Paid events *}
{if $customPre}
{foreach from=$customPre item=customPr key=i}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$customPre_grouptitle.$i}
==========================================================={if $pricesetFieldsCount }===================={/if}
{foreach from=$customPr item=customValue key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
{$customName}: {$customValue}
{/if}
{/foreach}
{/foreach}
{/if}
{if $customPost}
{foreach from=$customPost item=customPos key=j}
==========================================================={if $pricesetFieldsCount }===================={/if}
{$customPost_grouptitle.$j}
==========================================================={if $pricesetFieldsCount }===================={/if}
{foreach from=$customPos item=customValue key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
{$customName}: {$customValue}
{/if}
{/foreach}
{/foreach}
{/if}
{if $customProfile}
{foreach from=$customProfile.profile item=eachParticipant key=participantID}
==========================================================={if $pricesetFieldsCount }===================={/if}
{ts 1=$participantID+2}Participant Information - Participant %1{/ts}
==========================================================={if $pricesetFieldsCount }===================={/if}
{foreach from=$eachParticipant item=eachProfile key=pid}
----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
{$customProfile.title.$pid}
----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
{foreach from=$eachProfile item=val key=field}
{foreach from=$val item=v key=f}
{$field}: {$v}
{/foreach}
{/foreach}
{/foreach}
{/foreach}
{/if}
{if $customGroup}
{foreach from=$customGroup item=value key=customName}
=========================================================={if $pricesetFieldsCount }===================={/if}
{$customName}
=========================================================={if $pricesetFieldsCount }===================={/if}
{foreach from=$value item=v key=n}
{$n}: {$v}
{/foreach}
{/foreach}
{/if}

View file

@ -0,0 +1,296 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
<center>
<table width="620" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
<!-- BEGIN HEADER -->
<!-- You can add table row(s) here with logo or other header elements -->
<!-- END HEADER -->
<!-- BEGIN CONTENT -->
<tr>
<td>
{if $formValues.receipt_text_signup}
<p>{$formValues.receipt_text_signup|htmlize}</p>
{elseif $formValues.receipt_text_renewal}
<p>{$formValues.receipt_text_renewal|htmlize}</p>
{else}
<p>{ts}Thank you for your support.{/ts}</p>
{/if}
{if ! $cancelled}
<p>{ts}Please print this receipt for your records.{/ts}</p>
{/if}
</td>
</tr>
<tr>
<td>
<table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
{if !$lineItem}
<tr>
<th {$headerStyle}>
{ts}Membership Information{/ts}
</th>
</tr>
<tr>
<td {$labelStyle}>
{ts}Membership Type{/ts}
</td>
<td {$valueStyle}>
{$membership_name}
</td>
</tr>
{/if}
{if ! $cancelled}
{if !$lineItem}
<tr>
<td {$labelStyle}>
{ts}Membership Start Date{/ts}
</td>
<td {$valueStyle}>
{$mem_start_date}
</td>
</tr>
<tr>
<td {$labelStyle}>
{ts}Membership End Date{/ts}
</td>
<td {$valueStyle}>
{$mem_end_date}
</td>
</tr>
{/if}
{if $formValues.total_amount OR $formValues.total_amount eq 0 }
<tr>
<th {$headerStyle}>
{ts}Membership Fee{/ts}
</th>
</tr>
{if $formValues.contributionType_name}
<tr>
<td {$labelStyle}>
{ts}Financial Type{/ts}
</td>
<td {$valueStyle}>
{$formValues.contributionType_name}
</td>
</tr>
{/if}
{if $lineItem}
{foreach from=$lineItem item=value key=priceset}
<tr>
<td colspan="2" {$valueStyle}>
<table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
<tr>
<th>{ts}Item{/ts}</th>
<th>{ts}Fee{/ts}</th>
{if $dataArray}
<th>{ts}SubTotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
<th>{ts}Total{/ts}</th>
{/if}
<th>{ts}Membership Start Date{/ts}</th>
<th>{ts}Membership End Date{/ts}</th>
</tr>
{foreach from=$value item=line}
<tr>
<td>
{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
</td>
<td>
{$line.line_total|crmMoney}
</td>
{if $dataArray}
<td>
{$line.unit_price*$line.qty|crmMoney}
</td>
{if $line.tax_rate != "" || $line.tax_amount != ""}
<td>
{$line.tax_rate|string_format:"%.2f"}%
</td>
<td>
{$line.tax_amount|crmMoney}
</td>
{else}
<td></td>
<td></td>
{/if}
<td>
{$line.line_total+$line.tax_amount|crmMoney}
</td>
{/if}
<td>
{$line.start_date}
</td>
<td>
{$line.end_date}
</td>
</tr>
{/foreach}
</table>
</td>
</tr>
{/foreach}
{if $dataArray}
<tr>
<td {$labelStyle}>
{ts}Amount Before Tax : {/ts}
</td>
<td {$valueStyle}>
{$formValues.total_amount-$totalTaxAmount|crmMoney}
</td>
</tr>
{foreach from=$dataArray item=value key=priceset}
<tr>
{if $priceset}
<td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{elseif $priceset == 0}
<td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{/if}
</tr>
{/foreach}
{/if}
{/if}
{if isset($totalTaxAmount)}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}
</td>
<td {$valueStyle}>
{$totalTaxAmount|crmMoney:$currency}
</td>
</tr>
{/if}
<tr>
<td {$labelStyle}>
{ts}Amount{/ts}
</td>
<td {$valueStyle}>
{$formValues.total_amount|crmMoney}
</td>
</tr>
{if $receive_date}
<tr>
<td {$labelStyle}>
{ts}Received Date{/ts}
</td>
<td {$valueStyle}>
{$receive_date|truncate:10:''|crmDate}
</td>
</tr>
{/if}
{if $formValues.paidBy}
<tr>
<td {$labelStyle}>
{ts}Paid By{/ts}
</td>
<td {$valueStyle}>
{$formValues.paidBy}
</td>
</tr>
{if $formValues.check_number}
<tr>
<td {$labelStyle}>
{ts}Check Number{/ts}
</td>
<td {$valueStyle}>
{$formValues.check_number}
</td>
</tr>
{/if}
{/if}
{/if}
{/if}
</table>
</td>
</tr>
{if $isPrimary}
<tr>
<td>
<table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later }
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</th>
</tr>
<tr>
<td {$labelStyle}>
{$billingName}<br />
{$address}
</td>
</tr>
{/if}
{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later}
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
</th>
</tr>
<tr>
<td {$valueStyle}>
{$credit_card_type}<br />
{$credit_card_number}
</td>
</tr>
<tr>
<td {$labelStyle}>
{ts}Expires{/ts}
</td>
<td {$valueStyle}>
{$credit_card_exp_date|truncate:7:''|crmDate}
</td>
</tr>
{/if}
</table>
</td>
</tr>
{/if}
{if $customValues}
<tr>
<td>
<table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
<tr>
<th {$headerStyle}>
{ts}Membership Options{/ts}
</th>
</tr>
{foreach from=$customValues item=value key=customName}
<tr>
<td {$labelStyle}>
{$customName}
</td>
<td {$valueStyle}>
{$value}
</td>
</tr>
{/foreach}
</table>
</td>
</tr>
{/if}
</table>
</center>
</body>
</html>

View file

@ -0,0 +1,113 @@
{if $formValues.receipt_text_signup}
{$formValues.receipt_text_signup}
{elseif $formValues.receipt_text_renewal}
{$formValues.receipt_text_renewal}
{else}{ts}Thank you for your support.{/ts}{/if}
{if ! $cancelled}{ts}Please print this receipt for your records.{/ts}
{/if}
{if !$lineItem}
===========================================================
{ts}Membership Information{/ts}
===========================================================
{ts}Membership Type{/ts}: {$membership_name}
{/if}
{if ! $cancelled}
{if !$lineItem}
{ts}Membership Start Date{/ts}: {$mem_start_date}
{ts}Membership End Date{/ts}: {$mem_end_date}
{/if}
{if $formValues.total_amount OR $formValues.total_amount eq 0 }
===========================================================
{ts}Membership Fee{/ts}
===========================================================
{if $formValues.contributionType_name}
{ts}Financial Type{/ts}: {$formValues.contributionType_name}
{/if}
{if $lineItem}
{foreach from=$lineItem item=value key=priceset}
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_total}{ts}Fee{/ts}{/capture}
{if $dataArray}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
{/if}
{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
{capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
--------------------------------------------------------------------------------------------------
{foreach from=$value item=line}
{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
{/foreach}
{/foreach}
{if $dataArray}
{ts}Amount before Tax{/ts}: {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{if $priceset}
{$taxTerm} {$priceset|string_format:"%.2f"} %: {$value|crmMoney:$currency}
{elseif $priceset == 0}
{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
{/if}
{/foreach}
{/if}
--------------------------------------------------------------------------------------------------
{/if}
{if isset($totalTaxAmount)}
{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
{/if}
{ts}Amount{/ts}: {$formValues.total_amount|crmMoney}
{if $receive_date}
{ts}Received Date{/ts}: {$receive_date|truncate:10:''|crmDate}
{/if}
{if $formValues.paidBy}
{ts}Paid By{/ts}: {$formValues.paidBy}
{if $formValues.check_number}
{ts}Check Number{/ts}: {$formValues.check_number}
{/if}
{/if}
{/if}
{/if}
{if $isPrimary }
{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later }
===========================================================
{ts}Billing Name and Address{/ts}
===========================================================
{$billingName}
{$address}
{/if}
{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later}
===========================================================
{ts}Credit Card Information{/ts}
===========================================================
{$credit_card_type}
{$credit_card_number}
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
{/if}
{/if}
{if $customValues}
===========================================================
{ts}Membership Options{/ts}
===========================================================
{foreach from=$customValues item=value key=customName}
{$customName} : {$value}
{/foreach}
{/if}

View file

@ -0,0 +1,565 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
<center>
<table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
<!-- BEGIN HEADER -->
<!-- You can add table row(s) here with logo or other header elements -->
<!-- END HEADER -->
<!-- BEGIN CONTENT -->
<tr>
<td>
{if $receipt_text}
<p>{$receipt_text|htmlize}</p>
{/if}
{if $is_pay_later}
<p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
{else}
<p>{ts}Please print this confirmation for your records.{/ts}</p>
{/if}
</td>
</tr>
</table>
<table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
{if $membership_assign && !$useForMember}
<tr>
<th {$headerStyle}>
{ts}Membership Information{/ts}
</th>
</tr>
<tr>
<td {$labelStyle}>
{ts}Membership Type{/ts}
</td>
<td {$valueStyle}>
{$membership_name}
</td>
</tr>
{if $mem_start_date}
<tr>
<td {$labelStyle}>
{ts}Membership Start Date{/ts}
</td>
<td {$valueStyle}>
{$mem_start_date|crmDate}
</td>
</tr>
{/if}
{if $mem_end_date}
<tr>
<td {$labelStyle}>
{ts}Membership End Date{/ts}
</td>
<td {$valueStyle}>
{$mem_end_date|crmDate}
</td>
</tr>
{/if}
{/if}
{if $amount}
<tr>
<th {$headerStyle}>
{ts}Membership Fee{/ts}
</th>
</tr>
{if !$useForMember and $membership_amount and $is_quick_config}
<tr>
<td {$labelStyle}>
{ts 1=$membership_name}%1 Membership{/ts}
</td>
<td {$valueStyle}>
{$membership_amount|crmMoney}
</td>
</tr>
{if $amount}
{if ! $is_separate_payment }
<tr>
<td {$labelStyle}>
{ts}Contribution Amount{/ts}
</td>
<td {$valueStyle}>
{$amount|crmMoney}
</td>
</tr>
{else}
<tr>
<td {$labelStyle}>
{ts}Additional Contribution{/ts}
</td>
<td {$valueStyle}>
{$amount|crmMoney}
</td>
</tr>
{/if}
{/if}
<tr>
<td {$labelStyle}>
{ts}Total{/ts}
</td>
<td {$valueStyle}>
{$amount+$membership_amount|crmMoney}
</td>
</tr>
{elseif !$useForMember && $lineItem and $priceSetID and !$is_quick_config}
{foreach from=$lineItem item=value key=priceset}
<tr>
<td colspan="2" {$valueStyle}>
<table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
<tr>
<th>{ts}Item{/ts}</th>
<th>{ts}Qty{/ts}</th>
<th>{ts}Each{/ts}</th>
<th>{ts}Total{/ts}</th>
</tr>
{foreach from=$value item=line}
<tr>
<td>
{$line.description|truncate:30:"..."}
</td>
<td>
{$line.qty}
</td>
<td>
{$line.unit_price|crmMoney}
</td>
<td>
{$line.line_total|crmMoney}
</td>
</tr>
{/foreach}
</table>
</td>
</tr>
{/foreach}
<tr>
<td {$labelStyle}>
{ts}Total Amount{/ts}
</td>
<td {$valueStyle}>
{$amount|crmMoney}
</td>
</tr>
{else}
{if $useForMember && $lineItem and !$is_quick_config}
{foreach from=$lineItem item=value key=priceset}
<tr>
<td colspan="2" {$valueStyle}>
<table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
<tr>
<th>{ts}Item{/ts}</th>
<th>{ts}Fee{/ts}</th>
{if $dataArray}
<th>{ts}SubTotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
<th>{ts}Total{/ts}</th>
{/if}
<th>{ts}Membership Start Date{/ts}</th>
<th>{ts}Membership End Date{/ts}</th>
</tr>
{foreach from=$value item=line}
<tr>
<td>
{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
</td>
<td>
{$line.line_total|crmMoney}
</td>
{if $dataArray}
<td>
{$line.unit_price*$line.qty|crmMoney}
</td>
{if $line.tax_rate != "" || $line.tax_amount != ""}
<td>
{$line.tax_rate|string_format:"%.2f"}%
</td>
<td>
{$line.tax_amount|crmMoney}
</td>
{else}
<td></td>
<td></td>
{/if}
<td>
{$line.line_total+$line.tax_amount|crmMoney}
</td>
{/if}
<td>
{$line.start_date}
</td>
<td>
{$line.end_date}
</td>
</tr>
{/foreach}
</table>
</td>
</tr>
{/foreach}
{if $dataArray}
<tr>
<td {$labelStyle}>
{ts} Amount Before Tax : {/ts}
</td>
<td {$valueStyle}>
{$amount-$totalTaxAmount|crmMoney}
</td>
</tr>
{foreach from=$dataArray item=value key=priceset}
<tr>
{if $priceset || $priceset == 0}
<td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{else}
<td>&nbsp;{ts}NO{/ts} {$taxTerm}</td>
<td>&nbsp;{$value|crmMoney:$currency}</td>
{/if}
</tr>
{/foreach}
{/if}
{/if}
{if $totalTaxAmount}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}
</td>
<td {$valueStyle}>
{$totalTaxAmount|crmMoney:$currency}
</td>
</tr>
{/if}
<tr>
<td {$labelStyle}>
{ts}Amount{/ts}
</td>
<td {$valueStyle}>
{$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
</td>
</tr>
{/if}
{elseif $membership_amount}
<tr>
<th {$headerStyle}>
{ts}Membership Fee{/ts}
</th>
</tr>
<tr>
<td {$labelStyle}>
{ts 1=$membership_name}%1 Membership{/ts}
</td>
<td {$valueStyle}>
{$membership_amount|crmMoney}
</td>
</tr>
{/if}
{if $receive_date}
<tr>
<td {$labelStyle}>
{ts}Date{/ts}
</td>
<td {$valueStyle}>
{$receive_date|crmDate}
</td>
</tr>
{/if}
{if $is_monetary and $trxn_id}
<tr>
<td {$labelStyle}>
{ts}Transaction #{/ts}
</td>
<td {$valueStyle}>
{$trxn_id}
</td>
</tr>
{/if}
{if $membership_trx_id}
<tr>
<td {$labelStyle}>
{ts}Membership Transaction #{/ts}
</td>
<td {$valueStyle}>
{$membership_trx_id}
</td>
</tr>
{/if}
{if $is_recur}
{if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
<tr>
<td colspan="2" {$labelStyle}>
{ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can cancel the auto-renewal option by <a href="%1">visiting this web page</a>.{/ts}
</td>
</tr>
<tr>
<td colspan="2" {$labelStyle}>
{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by <a href="%1">visiting this web page</a>.{/ts}
</td>
</tr>
{/if}
{/if}
{if $honor_block_is_active}
<tr>
<th {$headerStyle}>
{$soft_credit_type}
</th>
</tr>
{foreach from=$honoreeProfile item=value key=label}
<tr>
<td {$labelStyle}>
{$label}
</td>
<td {$valueStyle}>
{$value}
</td>
</tr>
{/foreach}
{/if}
{if $pcpBlock}
<tr>
<th {$headerStyle}>
{ts}Personal Campaign Page{/ts}
</th>
</tr>
<tr>
<td {$labelStyle}>
{ts}Display In Honor Roll{/ts}
</td>
<td {$valueStyle}>
{if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
</td>
</tr>
{if $pcp_roll_nickname}
<tr>
<td {$labelStyle}>
{ts}Nickname{/ts}
</td>
<td {$valueStyle}>
{$pcp_roll_nickname}
</td>
</tr>
{/if}
{if $pcp_personal_note}
<tr>
<td {$labelStyle}>
{ts}Personal Note{/ts}
</td>
<td {$valueStyle}>
{$pcp_personal_note}
</td>
</tr>
{/if}
{/if}
{if $onBehalfProfile}
<tr>
<th {$headerStyle}>
{$onBehalfProfile_grouptitle}
</th>
</tr>
{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
<tr>
<td {$labelStyle}>
{$onBehalfName}
</td>
<td {$valueStyle}>
{$onBehalfValue}
</td>
</tr>
{/foreach}
{/if}
{if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
{if $is_pay_later}
<tr>
<th {$headerStyle}>
{ts}Registered Email{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$email}
</td>
</tr>
{elseif $amount GT 0 OR $membership_amount GT 0}
<tr>
<th {$headerStyle}>
{ts}Billing Name and Address{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$billingName}<br />
{$address|nl2br}<br />
{$email}
</td>
</tr>
{/if}
{/if}
{if $contributeMode eq 'direct' AND !$is_pay_later AND ($amount GT 0 OR $membership_amount GT 0)}
<tr>
<th {$headerStyle}>
{ts}Credit Card Information{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$credit_card_type}<br />
{$credit_card_number}<br />
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
</td>
</tr>
{/if}
{if $selectPremium}
<tr>
<th {$headerStyle}>
{ts}Premium Information{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$labelStyle}>
{$product_name}
</td>
</tr>
{if $option}
<tr>
<td {$labelStyle}>
{ts}Option{/ts}
</td>
<td {$valueStyle}>
{$option}
</td>
</tr>
{/if}
{if $sku}
<tr>
<td {$labelStyle}>
{ts}SKU{/ts}
</td>
<td {$valueStyle}>
{$sku}
</td>
</tr>
{/if}
{if $start_date}
<tr>
<td {$labelStyle}>
{ts}Start Date{/ts}
</td>
<td {$valueStyle}>
{$start_date|crmDate}
</td>
</tr>
{/if}
{if $end_date}
<tr>
<td {$labelStyle}>
{ts}End Date{/ts}
</td>
<td {$valueStyle}>
{$end_date|crmDate}
</td>
</tr>
{/if}
{if $contact_email OR $contact_phone}
<tr>
<td colspan="2" {$valueStyle}>
<p>{ts}For information about this premium, contact:{/ts}</p>
{if $contact_email}
<p>{$contact_email}</p>
{/if}
{if $contact_phone}
<p>{$contact_phone}</p>
{/if}
</td>
</tr>
{/if}
{if $is_deductible AND $price}
<tr>
<td colspan="2" {$valueStyle}>
<p>{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
</td>
</tr>
{/if}
{/if}
{if $customPre}
<tr>
<th {$headerStyle}>
{$customPre_grouptitle}
</th>
</tr>
{foreach from=$customPre item=customValue key=customName}
{if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
<tr>
<td {$labelStyle}>
{$customName}
</td>
<td {$valueStyle}>
{$customValue}
</td>
</tr>
{/if}
{/foreach}
{/if}
{if $customPost}
<tr>
<th {$headerStyle}>
{$customPost_grouptitle}
</th>
</tr>
{foreach from=$customPost item=customValue key=customName}
{if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
<tr>
<td {$labelStyle}>
{$customName}
</td>
<td {$valueStyle}>
{$customValue}
</td>
</tr>
{/if}
{/foreach}
{/if}
</table>
</center>
</body>
</html>

View file

@ -0,0 +1,243 @@
{if $receipt_text}
{$receipt_text}
{/if}
{if $is_pay_later}
===========================================================
{$pay_later_receipt}
===========================================================
{else}
{ts}Please print this receipt for your records.{/ts}
{/if}
{if $membership_assign && !$useForMember}
===========================================================
{ts}Membership Information{/ts}
===========================================================
{ts}Membership Type{/ts}: {$membership_name}
{if $mem_start_date}{ts}Membership Start Date{/ts}: {$mem_start_date|crmDate}
{/if}
{if $mem_end_date}{ts}Membership End Date{/ts}: {$mem_end_date|crmDate}
{/if}
{/if}
{if $amount}
===========================================================
{ts}Membership Fee{/ts}
===========================================================
{if !$useForMember && $membership_amount && $is_quick_config}
{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
{if $amount}
{if ! $is_separate_payment }
{ts}Contribution Amount{/ts}: {$amount|crmMoney}
{else}
{ts}Additional Contribution{/ts}: {$amount|crmMoney}
{/if}
{/if}
-------------------------------------------
{ts}Total{/ts}: {$amount+$membership_amount|crmMoney}
{elseif !$useForMember && $lineItem and $priceSetID & !$is_quick_config}
{foreach from=$lineItem item=value key=priceset}
---------------------------------------------------------
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
{capture assign=ts_each}{ts}Each{/ts}{/capture}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
----------------------------------------------------------
{foreach from=$value item=line}
{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}
{/foreach}
{/foreach}
{ts}Total Amount{/ts}: {$amount|crmMoney}
{else}
{if $useForMember && $lineItem && !$is_quick_config}
{foreach from=$lineItem item=value key=priceset}
{capture assign=ts_item}{ts}Item{/ts}{/capture}
{capture assign=ts_total}{ts}Fee{/ts}{/capture}
{if $dataArray}
{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
{capture assign=ts_total}{ts}Total{/ts}{/capture}
{/if}
{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
{capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
--------------------------------------------------------------------------------------------------
{foreach from=$value item=line}
{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.line_total|crmMoney|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
{/foreach}
{/foreach}
{if $dataArray}
{ts}Amount before Tax{/ts}: {$amount-$totalTaxAmount|crmMoney:$currency}
{foreach from=$dataArray item=value key=priceset}
{if $priceset || $priceset == 0}
{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
{else}
{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
{/if}
{/foreach}
{/if}
--------------------------------------------------------------------------------------------------
{/if}
{if $totalTaxAmount}
{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
{/if}
{ts}Amount{/ts}: {$amount|crmMoney} {if $amount_level } - {$amount_level} {/if}
{/if}
{elseif $membership_amount}
===========================================================
{ts}Membership Fee{/ts}
===========================================================
{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
{/if}
{if $receive_date}
{ts}Date{/ts}: {$receive_date|crmDate}
{/if}
{if $is_monetary and $trxn_id}
{ts}Transaction #{/ts}: {$trxn_id}
{/if}
{if $membership_trx_id}
{ts}Membership Transaction #{/ts}: {$membership_trx_id}
{/if}
{if $is_recur}
{if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
{ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can cancel the auto-renewal option by visiting this web page: %1.{/ts}
{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by <a href="%1">visiting this web page</a>.{/ts}
{/if}
{/if}
{if $honor_block_is_active }
===========================================================
{$soft_credit_type}
===========================================================
{foreach from=$honoreeProfile item=value key=label}
{$label}: {$value}
{/foreach}
{/if}
{if $pcpBlock}
===========================================================
{ts}Personal Campaign Page{/ts}
===========================================================
{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
{/if}
{if $onBehalfProfile}
===========================================================
{ts}On Behalf Of{/ts}
===========================================================
{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
{$onBehalfName}: {$onBehalfValue}
{/foreach}
{/if}
{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
{if $is_pay_later}
===========================================================
{ts}Registered Email{/ts}
===========================================================
{$email}
{elseif $amount GT 0 OR $membership_amount GT 0 }
===========================================================
{ts}Billing Name and Address{/ts}
===========================================================
{$billingName}
{$address}
{$email}
{/if} {* End ! is_pay_later condition. *}
{/if}
{if $contributeMode eq 'direct' AND !$is_pay_later AND ( $amount GT 0 OR $membership_amount GT 0 ) }
===========================================================
{ts}Credit Card Information{/ts}
===========================================================
{$credit_card_type}
{$credit_card_number}
{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
{/if}
{if $selectPremium }
===========================================================
{ts}Premium Information{/ts}
===========================================================
{$product_name}
{if $option}
{ts}Option{/ts}: {$option}
{/if}
{if $sku}
{ts}SKU{/ts}: {$sku}
{/if}
{if $start_date}
{ts}Start Date{/ts}: {$start_date|crmDate}
{/if}
{if $end_date}
{ts}End Date{/ts}: {$end_date|crmDate}
{/if}
{if $contact_email OR $contact_phone}
{ts}For information about this premium, contact:{/ts}
{if $contact_email}
{$contact_email}
{/if}
{if $contact_phone}
{$contact_phone}
{/if}
{/if}
{if $is_deductible AND $price}
{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
{/if}
{if $customPre}
===========================================================
{$customPre_grouptitle}
===========================================================
{foreach from=$customPre item=customValue key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
{$customName}: {$customValue}
{/if}
{/foreach}
{/if}
{if $customPost}
===========================================================
{$customPost_grouptitle}
===========================================================
{foreach from=$customPost item=customValue key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
{$customName}: {$customValue}
{/if}
{/foreach}
{/if}