From cf61244170f3a33c8b02f3d8eb456cb80f88f996 Mon Sep 17 00:00:00 2001 From: Parag Bhilkar Date: Thu, 7 Aug 2014 23:09:25 +0530 Subject: [PATCH] -- added upgrade code message template --- .../civicrm_msg_template.tpl | 57 ++ .../contribution_invoice_receipt_html.tpl | 382 ++++++++++++ .../contribution_invoice_receipt_subject.tpl | 2 + .../contribution_invoice_receipt_text.tpl | 1 + .../contribution_offline_receipt_html.tpl | 319 ++++++++++ .../contribution_offline_receipt_text.tpl | 118 ++++ .../contribution_online_receipt_html.tpl | 473 +++++++++++++++ .../contribution_online_receipt_text.tpl | 209 +++++++ .../event_offline_receipt_html.tpl | 529 ++++++++++++++++ .../event_offline_receipt_text.tpl | 306 ++++++++++ .../event_online_receipt_html.tpl | 509 ++++++++++++++++ .../event_online_receipt_text.tpl | 304 ++++++++++ .../membership_offline_receipt_html.tpl | 296 +++++++++ .../membership_offline_receipt_text.tpl | 113 ++++ .../membership_online_receipt_html.tpl | 565 ++++++++++++++++++ .../membership_online_receipt_text.tpl | 243 ++++++++ .../Incremental/sql/4.5.beta5.mysql.tpl | 2 + 17 files changed, 4428 insertions(+) create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/civicrm_msg_template.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_html.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_subject.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_text.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_offline_receipt_html.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_offline_receipt_text.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_online_receipt_html.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_online_receipt_text.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_offline_receipt_html.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_offline_receipt_text.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_online_receipt_html.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_online_receipt_text.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_offline_receipt_html.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_offline_receipt_text.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_online_receipt_html.tpl create mode 100644 CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_online_receipt_text.tpl diff --git a/CRM/Upgrade/4.5.beta5.msg_template/civicrm_msg_template.tpl b/CRM/Upgrade/4.5.beta5.msg_template/civicrm_msg_template.tpl new file mode 100644 index 0000000000..752a9a02ad --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/civicrm_msg_template.tpl @@ -0,0 +1,57 @@ +{php} + $dir = SMARTY_DIR . '/../../CRM/Upgrade/4.5.beta5.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.5.alpha1.msg_template/message_templates/`$vName`_subject.tpl"} + {fetch assign=text file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/4.5.alpha1.msg_template/message_templates/`$vName`_text.tpl"} + {fetch assign=html file="`$smarty.const.SMARTY_DIR`/../../CRM/Upgrade/4.5.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} diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_html.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_html.tpl new file mode 100644 index 0000000000..83dcfe12f9 --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_html.tpl @@ -0,0 +1,382 @@ + + + + + + + + + + + +
+
+

+ + + + + + + + + + + + + {if $organization_name} + + {else} + + {/if} + + + + + + + + + + + + + + + + + + + + + + + + +
TAX INVOICEInvoice Date:{$organization_name}
{$display_name} ({$organization_name}){$display_name}{$invoice_date}
{$street_address} {$supplemental_address_1}Incoice Number:
{$supplemental_address_2} {$stateProvinceAbbreviation}{$invoice_id}
{$city} {$postal_code}Reference:
{$title}
+ + + + + +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + + + + + {foreach from=$lineItem item=value key=priceset} + + + + + + {if $value.tax_amount != ''} + + {else} + + {/if} + + + {/foreach} + + + + + + + {foreach from = $dataArray item = value key = priceset} + + + {if $priceset} + + + {elseif $priceset == 0} + + + + {/if} + {/foreach} + + + + + + + + + + + + {if $is_pay_later == 0} + + + + + + + + + + + + + + + + + + + + {/if} +


+ + + + + + + + + +
DescriptionQuantityUnit Price{$taxTerm} Amount {$defaultCurrency}

+ {if $value.html_type eq 'Text'}{$value.label}{else}{$value.field_title} - {$value.label}{/if} {if $value.description}
{$value.description|truncate:30:"..."}
{/if} +
{$value.qty} {$value.unit_price|crmMoney:$currency} {$value.tax_rate}%No {$taxTerm}{$value.subTotal|crmMoney:$currency}

Sub Total {$subTotal|crmMoney:$currency}
TOTAL {$taxTerm} {$priceset}%{$value|crmMoney:$currency} TOTAL NO {$taxTerm}{$value|crmMoney:$currency}

TOTAL {$defaultCurrency}{$amount|crmMoney:$currency}
LESS Amount Paid{$amount|crmMoney:$currency}

AMOUNT DUE: {$amountDue|crmMoney:$currency}
DUE DATE: {$dueDate}
+
+ + + + + +
+ + + + + +
PAYMENT ADVICE

To: + {$organization_name}

{$notes} +
+ + + + + + + + + + + + + {if $is_pay_later == 1} + + + + + + {else} + + + + + + {/if} + + + + + + + + +
Customer:
{$display_name}
Invoice Number: {$invoice_id}

Amount Due:{$amount|crmMoney:$currency}
Amount Due: {$amountDue|crmMoney:$currency}
Due Date: {$dueDate}

+
+ + + {if $contribution_status_id == $refundedStatusId} + + + + +
+
+

+ + + + + + + + + + + + + + {if $organization_name} + + {else} + + {/if} + + + + + + + + + + + + + + + + + + + + + + + + + +
CREDIT NOTEDate:{$organization_name}
{$display_name} ({$organization_name}){$display_name}{$invoice_date}
{$street_address} {$supplemental_address_1}Credit Note Number:
{$supplemental_address_2} {$stateProvinceAbbreviation}{$invoice_id}
{$city} {$postal_code}Reference:
{$title}
+ + + + + +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + + + + + {foreach from=$lineItem item=value key=priceset} + + + + + + {if $value.tax_amount != ''} + + {else} + + {/if} + + + {/foreach} + + + + + + + {foreach from = $dataArray item = value key = priceset} + + + {if $priceset} + + + {elseif $priceset == 0} + + + + {/if} + {/foreach} + + + + + + + + + + + + {if $is_pay_later == 0} + + + + + + + + + + + + + + + + + + + + {/if} +


+ + + + + + + + + +
DescriptionQuantityUnit Price{$taxTerm} Amount {$defaultCurrency}

+ {if $value.html_type eq 'Text'}{$value.label}{else}{$value.field_title} - {$value.label}{/if} {if $value.description}
{$value.description|truncate:30:"..."}
{/if} +
{$value.qty} {$value.unit_price|crmMoney:$currency} {$value.tax_rate}%No {$taxTerm}{$value.subTotal|crmMoney:$currency}

Sub Total {$subTotal|crmMoney:$currency}
TOTAL {$taxTerm}{$priceset}%{$value|crmMoney:$currency} TOTAL NO {$taxTerm}{$value|crmMoney:$currency}

TOTAL {$defaultCurrency}{$amount|crmMoney:$currency}
LESS Credit to invoice(s){$amount|crmMoney:$currency}

REMAINING CREDIT{$amountDue|crmMoney:$currency}
+
+ + + + + +
+ + + + + + + +
CREDIT ADVICE

{$notes}
+ + + + + + + + + + + + + + + + + +
Customer:
{$display_name}
Credit Note#: {$invoice_id}

Credit Amount:{$amount|crmMoney:$currency}
+
+ + + {/if} +
+ + diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_subject.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_subject.tpl new file mode 100644 index 0000000000..0035d669ed --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_subject.tpl @@ -0,0 +1,2 @@ +{if $title}{if $component}{if $component == 'event'} {ts}Event Registration Invoice:- {$title}{/ts}{else}{ts}Contribution Invoice : + {$title}{/ts}{/if}{/if} {else} {ts}Invoice {/ts} {/if} diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_text.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_text.tpl new file mode 100644 index 0000000000..37e2edf09d --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_invoice_receipt_text.tpl @@ -0,0 +1 @@ +{ts}Contribution Invoice{/ts} diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_offline_receipt_html.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_offline_receipt_html.tpl new file mode 100644 index 0000000000..56ae50f6c9 --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_offline_receipt_html.tpl @@ -0,0 +1,319 @@ + + + + + + + + +{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} + +
+ + + + + + + + + + + + + + + +
+ + {if $formValues.receipt_text} +

{$formValues.receipt_text|htmlize}

+ {else} +

{ts}Thanks for your support.{/ts}

+ {/if} + +

{ts}Please print this receipt for your records.{/ts}

+ +
+ + + + + + + + + + {if $lineItem and !$is_quick_config} + {foreach from=$lineItem item=value key=priceset} + + + + {/foreach} + {/if} + {if $getTaxDetails && $dataArray} + + + + + + {foreach from=$dataArray item=value key=priceset} + + {if $priceset || $priceset == 0 || $value != ''} + + + {else} + + + {/if} + + {/foreach} + {/if} + + {if $getTaxDetails && $totalTaxAmount} + + + + + {/if} + + + + + + + {if $receive_date} + + + + + {/if} + + {if $receipt_date} + + + + + {/if} + + {if $formValues.paidBy and !$formValues.hidden_CreditCard} + + + + + {if $formValues.check_number} + + + + + {/if} + {/if} + + {if $formValues.trxn_id} + + + + + {/if} + + {if $ccContribution} + + + + + + + + + + + + + {/if} + + {if $softCreditTypes and $softCredits} + {foreach from=$softCreditTypes item=softCreditType key=n} + + + + {foreach from=$softCredits.$n item=value key=label} + + + + + {/foreach} + {/foreach} + {/if} + + {if $customGroup} + {foreach from=$customGroup item=value key=customName} + + + + {foreach from=$value item=v key=n} + + + + + {/foreach} + {/foreach} + {/if} + + {if $formValues.product_name} + + + + + + + {if $formValues.product_option} + + + + + {/if} + {if $formValues.product_sku} + + + + + {/if} + {if $fulfilled_date} + + + + + {/if} + {/if} + +
+ {ts}Contribution Information{/ts} +
+ {ts}Financial Type{/ts} + + {$formValues.contributionType_name} +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + + {if $getTaxDetails} + + + + {/if} + + + {foreach from=$value item=line} + + + + + {if $getTaxDetails} + + {if $line.tax_rate != "" || $line.tax_amount != ""} + + + {else} + + + {/if} + {/if} + + + {/foreach} +
{ts}Item{/ts}{ts}Qty{/ts}{ts}Each{/ts}{ts}Subtotal{/ts}{ts}Tax Rate{/ts}{ts}Tax Amount{/ts}{ts}Total{/ts}
+ {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} +
+ {$line.qty} + + {$line.unit_price|crmMoney:$currency} + + {$line.unit_price*$line.qty|crmMoney:$currency} + + {$line.tax_rate}% + + {$line.tax_amount|crmMoney:$currency} + + {$line.line_total+$line.tax_amount|crmMoney:$currency} +
+
+ {ts} Amount before Tax : {/ts} + + {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency} +
 {$taxTerm} {$priceset}% {$value|crmMoney:$currency} {ts}No{/ts} {$taxTerm} {$value|crmMoney:$currency}
+ {ts}Total Tax Amount{/ts} + + {$totalTaxAmount|crmMoney:$currency} +
+ {ts}Total Amount{/ts} + + {$formValues.total_amount|crmMoney:$currency} +
+ {ts}Received Date{/ts} + + {$receive_date|truncate:10:''|crmDate} +
+ {ts}Receipt Date{/ts} + + {$receipt_date|truncate:10:''|crmDate} +
+ {ts}Paid By{/ts} + + {$formValues.paidBy} +
+ {ts}Check Number{/ts} + + {$formValues.check_number} +
+ {ts}Transaction ID{/ts} + + {$formValues.trxn_id} +
+ {ts}Billing Name and Address{/ts} +
+ {$billingName}
+ {$address|nl2br} +
+ {ts}Credit Card Information{/ts} +
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate} +
+ {$softCreditType} +
+ {$label} + + {$value} +
+ {$customName} +
+ {$n} + + {$v} +
+ {ts}Premium Information{/ts} +
+ {$formValues.product_name} +
+ {ts}Option{/ts} + + {$formValues.product_option} +
+ {ts}SKU{/ts} + + {$formValues.product_sku} +
+ {ts}Sent{/ts} + + {$fulfilled_date|truncate:10:''|crmDate} +
+
+
+ + + diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_offline_receipt_text.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_offline_receipt_text.tpl new file mode 100644 index 0000000000..d0b54802db --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_offline_receipt_text.tpl @@ -0,0 +1,118 @@ +{if $formValues.receipt_text} +{$formValues.receipt_text} +{else}{ts}Thanks 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} % {$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}% : {$value|crmMoney:$currency} +{else} +{ts}No{/ts} {$taxTerm} : {$value|crmMoney:$currency} +{/if} +{/foreach} +{/if} + +{if $getTaxDetails && $totalTaxAmount} +{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} diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_online_receipt_html.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_online_receipt_html.tpl new file mode 100644 index 0000000000..8d629700ee --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_online_receipt_html.tpl @@ -0,0 +1,473 @@ + + + + + + + + +{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} + +
+ + + + + + + + + + + +
+ + {if $receipt_text} +

{$receipt_text|htmlize}

+ {/if} + + {if $is_pay_later} +

{$pay_later_receipt}

{* FIXME: this might be text rather than HTML *} + {else} +

{ts}Please print this confirmation for your records.{/ts}

+ {/if} + +
+ + + {if $amount} + + + + + + + {if $lineItem and $priceSetID and !$is_quick_config} + + {foreach from=$lineItem item=value key=priceset} + + + + {/foreach} + {if $dataArray} + + + + + + {foreach from=$dataArray item=value key=priceset} + + {if $priceset || $priceset == 0} + + + {else} + + + {/if} + + {/foreach} + + {/if} + {if $totalTaxAmount} + + + + + {/if} + + + + + + {else} + + {if $totalTaxAmount} + + + + + {/if} + + + + + + {/if} + + {/if} + + + {if $receive_date} + + + + + {/if} + + {if $is_monetary and $trxn_id} + + + + + {/if} + + {if $is_recur} + {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'} + + + {if $updateSubscriptionBillingUrl} + + + + {/if} + + + + + {/if} + {/if} + + {if $honor_block_is_active} + + + + {foreach from=$honoreeProfile item=value key=label} + + + + + {/foreach} + {elseif $softCreditTypes and $softCredits} + {foreach from=$softCreditTypes item=softCreditType key=n} + + + + {foreach from=$softCredits.$n item=value key=label} + + + + + {/foreach} + {/foreach} + {/if} + + {if $pcpBlock} + + + + + + + + {if $pcp_roll_nickname} + + + + + {/if} + {if $pcp_personal_note} + + + + + {/if} + {/if} + + {if $onBehalfProfile} + + + + {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName} + + + + + {/foreach} + {/if} + + {if $isShare} + + + + {/if} + + {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary} + {if $is_pay_later} + + + + + + + {elseif $amount GT 0} + + + + + + + {/if} + {/if} + + {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0} + + + + + + + {/if} + + {if $selectPremium} + + + + + + + {if $option} + + + + + {/if} + {if $sku} + + + + + {/if} + {if $start_date} + + + + + {/if} + {if $end_date} + + + + + {/if} + {if $contact_email OR $contact_phone} + + + + {/if} + {if $is_deductible AND $price} + + + + {/if} + {/if} + + {if $customPre} + + + + {foreach from=$customPre item=customValue key=customName} + {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields} + + + + + {/if} + {/foreach} + {/if} + + {if $customPost} + + + + {foreach from=$customPost item=customValue key=customName} + {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields} + + + + + {/if} + {/foreach} + {/if} + +
+ {ts}Contribution Information{/ts} +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + + {if $dataArray} + + + + {/if} + + + {foreach from=$value item=line} + + + + + {if $getTaxDetails} + + {if $line.tax_rate != "" || $line.tax_amount != ""} + + + {else} + + + {/if} + {/if} + + + {/foreach} +
{ts}Item{/ts}{ts}Qty{/ts}{ts}Each{/ts}{ts}Subtotal{/ts}{ts}Tax Rate{/ts}{ts}Tax Amount{/ts}{ts}Total{/ts}
+ {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} +
+ {$line.qty} + + {$line.unit_price|crmMoney:$currency} + + {$line.unit_price*$line.qty|crmMoney:$currency} + + {$line.tax_rate|string_format:"%.2f"}% + + {$line.tax_amount|crmMoney:$currency} + + {$line.line_total+$line.tax_amount|crmMoney:$currency} +
+
+ {ts} Amount before Tax : {/ts} + + {$amount-$totalTaxAmount|crmMoney:$currency} +
 {$taxTerm} {$priceset}% {$value|crmMoney:$currency} {ts}No{/ts} {$taxTerm} {$value|crmMoney:$currency}
+ {ts}Total Tax{/ts} + + {$totalTaxAmount|crmMoney:$currency} +
+ {ts}Total Amount{/ts} + + {$amount|crmMoney:$currency} +
+ {ts}Total Tax Amount{/ts} + + {$totalTaxAmount|crmMoney:$currency} +
+ {ts}Amount{/ts} + + {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if} +
+ {ts}Date{/ts} + + {$receive_date|crmDate} +
+ {ts}Transaction #{/ts} + + {$trxn_id} +
+ {ts 1=$cancelSubscriptionUrl}This is a recurring contribution. You can cancel future contributions by visiting this web page.{/ts} +
+ {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by visiting this web page.{/ts} +
+ {ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments for this recurring contribution by visiting this web page.{/ts} +
+ {$soft_credit_type} +
+ {$label} + + {$value} +
+ {$softCreditType} +
+ {$label} + + {$value} +
+ {ts}Personal Campaign Page{/ts} +
+ {ts}Display In Honor Roll{/ts} + + {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if} +
+ {ts}Nickname{/ts} + + {$pcp_roll_nickname} +
+ {ts}Personal Note{/ts} + + {$pcp_personal_note} +
+ {$onBehalfProfile_grouptitle} +
+ {$onBehalfName} + + {$onBehalfValue} +
+ {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} +
+ {ts}Registered Email{/ts} +
+ {$email} +
+ {ts}Billing Name and Address{/ts} +
+ {$billingName}
+ {$address|nl2br}
+ {$email} +
+ {ts}Credit Card Information{/ts} +
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+
+ {ts}Premium Information{/ts} +
+ {$product_name} +
+ {ts}Option{/ts} + + {$option} +
+ {ts}SKU{/ts} + + {$sku} +
+ {ts}Start Date{/ts} + + {$start_date|crmDate} +
+ {ts}End Date{/ts} + + {$end_date|crmDate} +
+

{ts}For information about this premium, contact:{/ts}

+ {if $contact_email} +

{$contact_email}

+ {/if} + {if $contact_phone} +

{$contact_phone}

+ {/if} +
+

{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}

+
+ {$customPre_grouptitle} +
+ {$customName} + + {$customValue} +
+ {$customPost_grouptitle} +
+ {$customName} + + {$customValue} +
+
+ + + diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_online_receipt_text.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_online_receipt_text.tpl new file mode 100644 index 0000000000..6b60eadcd0 --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/contribution_online_receipt_text.tpl @@ -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}%: {$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} +=========================================================== +{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} \ No newline at end of file diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_offline_receipt_html.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_offline_receipt_html.tpl new file mode 100644 index 0000000000..81a73f98b1 --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_offline_receipt_html.tpl @@ -0,0 +1,529 @@ + + + + + + + + +{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} + +
+ + + + + + + + + + + + + + + +
+ + {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)} +

{$event.confirm_email_text|htmlize}

+ {/if} + + {if $isOnWaitlist} +

{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} + {elseif $isRequireApproval} +

{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} + {elseif $is_pay_later} +

{$pay_later_receipt}

{* FIXME: this might be text rather than HTML *} + {else} +

{ts}Please print this confirmation for your records.{/ts}

+ {/if} + +
+ + + + + + + + + {if $event.participant_role neq 'Attendee' and $defaultRole} + + + + + {/if} + + {if $isShowLocation} + + + + {/if} + + {if $location.phone.1.phone || $location.email.1.email} + + + + {foreach from=$location.phone item=phone} + {if $phone.phone} + + + + + {/if} + {/foreach} + {foreach from=$location.email item=eventEmail} + {if $eventEmail.email} + + + + + {/if} + {/foreach} + {/if} + + {if $event.is_public} + + + + {/if} + + {if $email} + + + + + + + {/if} + + + {if $event.is_monetary} + + + + + + {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. *} + + + + {/if} + {/if} + + + + {/if} + {/foreach} + {if $dataArray} + + + + + {foreach from=$dataArray item=value key=priceset} + + {if $priceset || $priceset == 0} + + + {else} + + + {/if} + + {/foreach} + {/if} + {/if} + + {if $amount && !$lineItem} + {foreach from=$amount item=amnt key=level} + + + + {/foreach} + {/if} + {if $totalTaxAmount} + + + + + {/if} + {if $isPrimary} + + + + + {if $balanceAmount} + + + + + {/if} + {if $pricesetFieldsCount } + + + + + {/if} + {if $is_pay_later} + + + + {/if} + + {if $register_date} + + + + + {/if} + + {if $receive_date} + + + + + {/if} + + {if $contributionTypeName} + + + + + {/if} + + {if $trxn_id} + + + + + {/if} + + {if $paidBy} + + + + + {/if} + + {if $checkNumber} + + + + + {/if} + + {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval} + + + + + + + {/if} + + {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval} + + + + + + + {/if} + + {/if} + + {/if} {* End of conditional section for Paid events *} + + {if $customPre} + + + + {foreach from=$customPre item=value key=customName} + {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields} + + + + + {/if} + {/foreach} + {/if} + + {if $customPost} + + + + {foreach from=$customPost item=value key=customName} + {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields} + + + + + {/if} + {/foreach} + {/if} + + {if $customProfile} + {foreach from=$customProfile item=value key=customName} + + + + {foreach from=$value item=val key=field} + {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'} + + + + {foreach from=$val item=v key=f} + + + + + {/foreach} + {/if} + {/foreach} + {/foreach} + {/if} + + {if $customGroup} + {foreach from=$customGroup item=value key=customName} + + + + {foreach from=$value item=v key=n} + + + + + {/foreach} + {/foreach} + {/if} + +
+ {ts}Event Information and Location{/ts} +
+ {$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} +
+ {ts}Participant Role{/ts} + + {$event.participant_role} +
+ {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} +
+ {ts}Event Contacts:{/ts} +
+ {if $phone.phone_type} + {$phone.phone_type_display} + {else} + {ts}Phone{/ts} + {/if} + + {$phone.phone} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if} +
+ {ts}Email{/ts} + + {$eventEmail.email} +
+ {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} +
+ {ts}Registered Email{/ts} +
+ {$email} +
+ {$event.fee_label} +
+ {ts 1=$priceset+1}Participant %1{/ts} +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + + {if $dataArray} + + + + {/if} + + {if $pricesetFieldsCount }{/if} + + {foreach from=$value item=line} + + + + + {if $dataArray} + + {if $line.tax_rate != "" || $line.tax_amount != ""} + + + {else} + + + {/if} + {/if} + + {if $pricesetFieldsCount } + + {/if} + + {/foreach} +
{ts}Item{/ts}{ts}Qty{/ts}{ts}Each{/ts}{ts}SubTotal{/ts}{ts}Tax Rate{/ts}{ts}Tax Amount{/ts}{ts}Total{/ts}{ts}Total Participants{/ts}
+ {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} +
+ {$line.qty} + + {$line.unit_price|crmMoney} + + {$line.unit_price*$line.qty|crmMoney} + + {$line.tax_rate|string_format:"%.2f"}% + + {$line.tax_amount|crmMoney} + + {$line.line_total+$line.tax_amount|crmMoney} + + {$line.participant_count} +
+
+ {ts} Amount Before Tax : {/ts} + + {$totalAmount-$totalTaxAmount|crmMoney} +
 {$taxTerm} {$priceset|string_format:"%.2f"}% {$value|crmMoney:$currency} {ts}No{/ts} {$taxTerm} {$value|crmMoney:$currency}
+ {$amnt.amount|crmMoney} {$amnt.label} +
+ {ts}Total Tax Amount{/ts} + + {$totalTaxAmount|crmMoney:$currency} +
+ {if $balanceAmount} + {ts}Total Paid{/ts} + {else} + {ts}Total Amount{/ts} + {/if} + + {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if} +
+ {ts}Balance{/ts} + + {$balanceAmount|crmMoney} +
+ {ts}Total Participants{/ts} + {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} +
+ {$pay_later_receipt} +
+ {ts}Registration Date{/ts} + + {$register_date|crmDate} +
+ {ts}Transaction Date{/ts} + + {$receive_date|crmDate} +
+ {ts}Financial Type{/ts} + + {$contributionTypeName} +
+ {ts}Transaction #{/ts} + + {$trxn_id} +
+ {ts}Paid By{/ts} + + {$paidBy} +
+ {ts}Check Number{/ts} + + {$checkNumber} +
+ {ts}Billing Name and Address{/ts} +
+ {$billingName}
+ {$address|nl2br} +
+ {ts}Credit Card Information{/ts} +
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate} +
+ {$customPre_grouptitle} +
+ {$customName} + + {$value} +
+ {$customPost_grouptitle} +
+ {$customName} + + {$value} +
+ {ts 1=$customName+1}Participant Information - Participant %1{/ts} +
+ {if $field eq 'additionalCustomPre'} + {$additionalCustomPre_grouptitle} + {else} + {$additionalCustomPost_grouptitle} + {/if} +
+ {$f} + + {$v} +
+ {$customName} +
+ {$n} + + {$v} +
+
+
+ + + diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_offline_receipt_text.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_offline_receipt_text.tpl new file mode 100644 index 0000000000..f359f7e72e --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_offline_receipt_text.tpl @@ -0,0 +1,306 @@ +{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} + + diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_online_receipt_html.tpl new file mode 100644 index 0000000000..11030468f3 --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_online_receipt_html.tpl @@ -0,0 +1,509 @@ + + + + + + + + +{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} + +
+ + + + + + + + + + + + + + +
+

Dear {contact.display_name},

+ + {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)} +

{$event.confirm_email_text|htmlize}

+ + {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} +

{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} + {elseif $isRequireApproval} +

{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} + {elseif $is_pay_later && !$isAmountzero && !$isAdditionalParticipant} +

{$pay_later_receipt}

{* FIXME: this might be text rather than HTML *} + {else} +

{ts}Please print this confirmation for your records.{/ts}

+ {/if} + +
+ + + + + + + + + + {if $conference_sessions} + + + + + + + {/if} + + {if $event.participant_role neq 'Attendee' and $defaultRole} + + + + + {/if} + + {if $isShowLocation} + + + + {/if} + + {if $location.phone.1.phone || $location.email.1.email} + + + + {foreach from=$location.phone item=phone} + {if $phone.phone} + + + + + {/if} + {/foreach} + {foreach from=$location.email item=eventEmail} + {if $eventEmail.email} + + + + + {/if} + {/foreach} + {/if} + + {if $event.is_public} + + + + {/if} + + {if $event.is_share} + + + + {/if} + {if $payer.name} + + + + + + + {/if} + {if $event.is_monetary} + + + + + + {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. *} + + + + {/if} + {/if} + + + + {/if} + {/foreach} + {if $dataArray} + + + + + {foreach from=$dataArray item=value key=priceset} + + {if $priceset || $priceset == 0} + + + {else} + + + {/if} + + {/foreach} + {/if} + {/if} + + {if $amounts && !$lineItem} + {foreach from=$amounts item=amnt key=level} + + + + {/foreach} + {/if} + + {if $totalTaxAmount} + + + + + {/if} + {if $isPrimary} + + + + + {if $pricesetFieldsCount } + + + + {/if} + + {if $register_date} + + + + + {/if} + + {if $receive_date} + + + + + {/if} + + {if $contributionTypeName} + + + + + {/if} + + {if $trxn_id} + + + + + {/if} + + {if $paidBy} + + + + + {/if} + + {if $checkNumber} + + + + + {/if} + + {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval} + + + + + + + {/if} + + {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval} + + + + + + + {/if} + + {/if} + + {/if} {* End of conditional section for Paid events *} + + +{if $customPre} +{foreach from=$customPre item=customPr key=i} + + {foreach from=$customPr item=customValue key=customName} + {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields} + + + + + {/if} + {/foreach} +{/foreach} +{/if} + +{if $customPost} +{foreach from=$customPost item=customPos key=j} + + {foreach from=$customPos item=customValue key=customName} + {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields} + + + + +{/if} +{/foreach} +{/foreach} +{/if} + +{if $customProfile} +{foreach from=$customProfile.profile item=eachParticipant key=participantID} + + {foreach from=$eachParticipant item=eachProfile key=pid} + + {foreach from=$eachProfile item=val key=field} + {foreach from=$val item=v key=f} + + + {/foreach} + + {/foreach} +{/foreach} +{/foreach} +{/if} + + {if $customGroup} + {foreach from=$customGroup item=value key=customName} + + + + {foreach from=$value item=v key=n} + + + + + {/foreach} + {/foreach} + {/if} + +
+ {ts}Event Information and Location{/ts} +
+ {$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} +
+ {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} +
+ {ts}Participant Role{/ts} + + {$event.participant_role} +
+ {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} +
+ {ts}Event Contacts:{/ts} +
+ {if $phone.phone_type} + {$phone.phone_type_display} + {else} + {ts}Phone{/ts} + {/if} + + {$phone.phone} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if} +
+ {ts}Email{/ts} + + {$eventEmail.email} +
+ {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} +
+ {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} +
+ {ts}You were registered by:{/ts} +
+ {$payer.name} +
+ {$event.fee_label} +
+ {ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info} +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + + {if $dataArray} + + + + {/if} + + {if $pricesetFieldsCount }{/if} + + {foreach from=$value item=line} + + + + + {if $dataArray} + + {if $line.tax_rate != "" || $line.tax_amount != ""} + + + {else} + + + {/if} + {/if} + + {if $pricesetFieldsCount } {/if} + + {/foreach} +
{ts}Item{/ts}{ts}Qty{/ts}{ts}Each{/ts}{ts}SubTotal{/ts}{ts}Tax Rate{/ts}{ts}Tax Amount{/ts}{ts}Total{/ts}{ts}Total Participants{/ts}
+ {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} +
+ {$line.qty} + + {$line.unit_price|crmMoney:$currency} + + {$line.unit_price*$line.qty|crmMoney} + + {$line.tax_rate|string_format:"%.2f"}% + + {$line.tax_amount|crmMoney} + + {$line.line_total+$line.tax_amount|crmMoney:$currency} + {$line.participant_count}
+
+ {ts} Amount Before Tax: {/ts} + + {$totalAmount-$totalTaxAmount|crmMoney} +
 {$taxTerm} {$priceset|string_format:"%.2f"}% {$value|crmMoney:$currency} {ts}No{/ts} {$taxTerm} {$value|crmMoney:$currency}
+ {$amnt.amount|crmMoney:$currency} {$amnt.label} +
+ {ts}Total Tax Amount{/ts} + + {$totalTaxAmount|crmMoney:$currency} +
+ {ts}Total Amount{/ts} + + {$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if} +
+ {ts}Total Participants{/ts} + {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} +
+ {ts}Registration Date{/ts} + + {$register_date|crmDate} +
+ {ts}Transaction Date{/ts} + + {$receive_date|crmDate} +
+ {ts}Financial Type{/ts} + + {$contributionTypeName} +
+ {ts}Transaction #{/ts} + + {$trxn_id} +
+ {ts}Paid By{/ts} + + {$paidBy} +
+ {ts}Check Number{/ts} + + {$checkNumber} +
+ {ts}Billing Name and Address{/ts} +
+ {$billingName}
+ {$address|nl2br} +
+ {ts}Credit Card Information{/ts} +
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate} +
{$customPre_grouptitle.$i}
{$customName}{$customValue}
{$customPost_grouptitle.$j}
{$customName}{$customValue}
{ts 1=$participantID+2}Participant %1{/ts}
{$customProfile.title.$pid}
{$field}{$v}
+ {$customName} +
+ {$n} + + {$v} +
+
+
+ + + diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_online_receipt_text.tpl new file mode 100644 index 0000000000..70dfd9604f --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/event_online_receipt_text.tpl @@ -0,0 +1,304 @@ +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 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} diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_offline_receipt_html.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_offline_receipt_html.tpl new file mode 100644 index 0000000000..625f047073 --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_offline_receipt_html.tpl @@ -0,0 +1,296 @@ + + + + + + + + +{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} + +
+ + + + + + + + + + + + + + + + {if $isPrimary} + + + + {/if} + + {if $customValues} + + + + {/if} + +
+ {if $formValues.receipt_text_signup} +

{$formValues.receipt_text_signup|htmlize}

+ {elseif $formValues.receipt_text_renewal} +

{$formValues.receipt_text_renewal|htmlize}

+ {else} +

{ts}Thanks for your support.{/ts}

+ {/if} + {if ! $cancelled} +

{ts}Please print this receipt for your records.{/ts}

+ {/if} +
+ + {if !$lineItem} + + + + + + + + {/if} + {if ! $cancelled} + {if !$lineItem} + + + + + + + + + {/if} + {if $formValues.total_amount} + + + + {if $formValues.contributionType_name} + + + + + {/if} + + {if $lineItem} + {foreach from=$lineItem item=value key=priceset} + + + + {/foreach} + {if $dataArray} + + + + + {foreach from=$dataArray item=value key=priceset} + + {if $priceset} + + + {elseif $priceset == 0} + + + {/if} + + {/foreach} + {/if} + {/if} + {if $totalTaxAmount} + + + + + {/if} + + + + + {if $receive_date} + + + + + {/if} + {if $formValues.paidBy} + + + + + {if $formValues.check_number} + + + + + {/if} + {/if} + {/if} + {/if} +
+ {ts}Membership Information{/ts} +
+ {ts}Membership Type{/ts} + + {$membership_name} +
+ {ts}Membership Start Date{/ts} + + {$mem_start_date} +
+ {ts}Membership End Date{/ts} + + {$mem_end_date} +
+ {ts}Membership Fee{/ts} +
+ {ts}Financial Type{/ts} + + {$formValues.contributionType_name} +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + {if $dataArray} + + + + + {/if} + + + + {foreach from=$value item=line} + + + + {if $dataArray} + + {if $line.tax_rate != "" || $line.tax_amount != ""} + + + {else} + + + {/if} + + {/if} + + + + {/foreach} +
{ts}Item{/ts}{ts}Fee{/ts}{ts}SubTotal{/ts}{ts}Tax Rate{/ts}{ts}Tax Amount{/ts}{ts}Total{/ts}{ts}Membership Start Date{/ts}{ts}Membership End Date{/ts}
+ {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} +
+ {$line.line_total|crmMoney} + + {$line.unit_price*$line.qty|crmMoney} + + {$line.tax_rate|string_format:"%.2f"}% + + {$line.tax_amount|crmMoney} + + {$line.line_total+$line.tax_amount|crmMoney} + + {$line.start_date} + + {$line.end_date} +
+
+ {ts}Amount Before Tax : {/ts} + + {$formValues.total_amount-$totalTaxAmount|crmMoney} +
 {$taxTerm} {$priceset|string_format:"%.2f"}% {$value|crmMoney:$currency} {ts}No{/ts} {$taxTerm} {$value|crmMoney:$currency}
+ {ts}Total Tax Amount{/ts} + + {$totalTaxAmount|crmMoney:$currency} +
+ {ts}Amount{/ts} + + {$formValues.total_amount|crmMoney} +
+ {ts}Received Date{/ts} + + {$receive_date|truncate:10:''|crmDate} +
+ {ts}Paid By{/ts} + + {$formValues.paidBy} +
+ {ts}Check Number{/ts} + + {$formValues.check_number} +
+
+ + + {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later } + + + + + + + {/if} + + {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later} + + + + + + + + + + + {/if} + +
+ {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} +
+
+ + + + + {foreach from=$customValues item=value key=customName} + + + + + {/foreach} +
+ {ts}Membership Options{/ts} +
+ {$customName} + + {$value} +
+
+
+ + + diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_offline_receipt_text.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_offline_receipt_text.tpl new file mode 100644 index 0000000000..2033b71530 --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_offline_receipt_text.tpl @@ -0,0 +1,113 @@ +{if $formValues.receipt_text_signup} +{$formValues.receipt_text_signup} +{elseif $formValues.receipt_text_renewal} +{$formValues.receipt_text_renewal} +{else}{ts}Thanks 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} +=========================================================== +{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 $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} diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_online_receipt_html.tpl new file mode 100644 index 0000000000..6fc789a6b4 --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_online_receipt_html.tpl @@ -0,0 +1,565 @@ + + + + + + + + +{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} + +
+ + + + + + + + + + + +
+ + {if $receipt_text} +

{$receipt_text|htmlize}

+ {/if} + + {if $is_pay_later} +

{$pay_later_receipt}

{* FIXME: this might be text rather than HTML *} + {else} +

{ts}Please print this confirmation for your records.{/ts}

+ {/if} + +
+ + + {if $membership_assign && !$useForMember} + + + + + + + + {if $mem_start_date} + + + + + {/if} + {if $mem_end_date} + + + + + {/if} + {/if} + + + {if $amount} + + + + + {if !$useForMember and $membership_amount and $is_quick_config} + + + + + + {if $amount} + {if ! $is_separate_payment } + + + + + {else} + + + + + {/if} + {/if} + + + + + + {elseif !$useForMember && $lineItem and $priceSetID and !$is_quick_config} + + {foreach from=$lineItem item=value key=priceset} + + + + {/foreach} + + + + + + {else} + {if $useForMember && $lineItem and !$is_quick_config} + {foreach from=$lineItem item=value key=priceset} + + + + {/foreach} + {if $dataArray} + + + + + {foreach from=$dataArray item=value key=priceset} + + {if $priceset || $priceset == 0} + + + {else} + + + {/if} + + {/foreach} + {/if} + {/if} + {if $totalTaxAmount} + + + + + {/if} + + + + + + {/if} + + + {elseif $membership_amount} + + + + + + + + + + + + {/if} + + {if $receive_date} + + + + + {/if} + + {if $is_monetary and $trxn_id} + + + + + {/if} + + {if $membership_trx_id} + + + + + {/if} + {if $is_recur} + {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'} + + + + + + + {/if} + {/if} + + {if $honor_block_is_active} + + + + {foreach from=$honoreeProfile item=value key=label} + + + + + {/foreach} + {/if} + + {if $pcpBlock} + + + + + + + + {if $pcp_roll_nickname} + + + + + {/if} + {if $pcp_personal_note} + + + + + {/if} + {/if} + + {if $onBehalfProfile} + + + + {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName} + + + + + {/foreach} + {/if} + + {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary} + {if $is_pay_later} + + + + + + + {elseif $amount GT 0 OR $membership_amount GT 0} + + + + + + + {/if} + {/if} + + {if $contributeMode eq 'direct' AND !$is_pay_later AND ($amount GT 0 OR $membership_amount GT 0)} + + + + + + + {/if} + + {if $selectPremium} + + + + + + + {if $option} + + + + + {/if} + {if $sku} + + + + + {/if} + {if $start_date} + + + + + {/if} + {if $end_date} + + + + + {/if} + {if $contact_email OR $contact_phone} + + + + {/if} + {if $is_deductible AND $price} + + + + {/if} + {/if} + + {if $customPre} + + + + {foreach from=$customPre item=customValue key=customName} + {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields} + + + + + {/if} + {/foreach} + {/if} + + {if $customPost} + + + + {foreach from=$customPost item=customValue key=customName} + {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields} + + + + + {/if} + {/foreach} + {/if} + +
+ {ts}Membership Information{/ts} +
+ {ts}Membership Type{/ts} + + {$membership_name} +
+ {ts}Membership Start Date{/ts} + + {$mem_start_date|crmDate} +
+ {ts}Membership End Date{/ts} + + {$mem_end_date|crmDate} +
+ {ts}Membership Fee{/ts} +
+ {ts 1=$membership_name}%1 Membership{/ts} + + {$membership_amount|crmMoney} +
+ {ts}Contribution Amount{/ts} + + {$amount|crmMoney} +
+ {ts}Additional Contribution{/ts} + + {$amount|crmMoney} +
+ {ts}Total{/ts} + + {$amount+$membership_amount|crmMoney} +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + + + + {foreach from=$value item=line} + + + + + + + {/foreach} +
{ts}Item{/ts}{ts}Qty{/ts}{ts}Each{/ts}{ts}Total{/ts}
+ {$line.description|truncate:30:"..."} + + {$line.qty} + + {$line.unit_price|crmMoney} + + {$line.line_total|crmMoney} +
+
+ {ts}Total Amount{/ts} + + {$amount|crmMoney} +
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *} + + + + {if $dataArray} + + + + + {/if} + + + + {foreach from=$value item=line} + + + + {if $dataArray} + + {if $line.tax_rate != "" || $line.tax_amount != ""} + + + {else} + + + {/if} + + {/if} + + + + {/foreach} +
{ts}Item{/ts}{ts}Fee{/ts}{ts}SubTotal{/ts}{ts}Tax Rate{/ts}{ts}Tax Amount{/ts}{ts}Total{/ts}{ts}Membership Start Date{/ts}{ts}Membership End Date{/ts}
+ {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:"..."}
{/if} +
+ {$line.line_total|crmMoney} + + {$line.unit_price*$line.qty|crmMoney} + + {$line.tax_rate|string_format:"%.2f"}% + + {$line.tax_amount|crmMoney} + + {$line.line_total+$line.tax_amount|crmMoney} + + {$line.start_date} + + {$line.end_date} +
+
+ {ts} Amount Before Tax : {/ts} + + {$amount-$totalTaxAmount|crmMoney} +
 {$taxTerm} {$priceset|string_format:"%.2f"}% {$value|crmMoney:$currency} {ts}NO{/ts} {$taxTerm} {$value|crmMoney:$currency}
+ {ts}Total Tax Amount{/ts} + + {$totalTaxAmount|crmMoney:$currency} +
+ {ts}Amount{/ts} + + {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if} +
+ {ts}Membership Fee{/ts} +
+ {ts 1=$membership_name}%1 Membership{/ts} + + {$membership_amount|crmMoney} +
+ {ts}Date{/ts} + + {$receive_date|crmDate} +
+ {ts}Transaction #{/ts} + + {$trxn_id} +
+ {ts}Membership Transaction #{/ts} + + {$membership_trx_id} +
+ {ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can cancel the auto-renewal option by visiting this web page.{/ts} +
+ {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts} +
+ {$soft_credit_type} +
+ {$label} + + {$value} +
+ {ts}Personal Campaign Page{/ts} +
+ {ts}Display In Honor Roll{/ts} + + {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if} +
+ {ts}Nickname{/ts} + + {$pcp_roll_nickname} +
+ {ts}Personal Note{/ts} + + {$pcp_personal_note} +
+ {$onBehalfProfile_grouptitle} +
+ {$onBehalfName} + + {$onBehalfValue} +
+ {ts}Registered Email{/ts} +
+ {$email} +
+ {ts}Billing Name and Address{/ts} +
+ {$billingName}
+ {$address|nl2br}
+ {$email} +
+ {ts}Credit Card Information{/ts} +
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+
+ {ts}Premium Information{/ts} +
+ {$product_name} +
+ {ts}Option{/ts} + + {$option} +
+ {ts}SKU{/ts} + + {$sku} +
+ {ts}Start Date{/ts} + + {$start_date|crmDate} +
+ {ts}End Date{/ts} + + {$end_date|crmDate} +
+

{ts}For information about this premium, contact:{/ts}

+ {if $contact_email} +

{$contact_email}

+ {/if} + {if $contact_phone} +

{$contact_phone}

+ {/if} +
+

{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}

+
+ {$customPre_grouptitle} +
+ {$customName} + + {$customValue} +
+ {$customPost_grouptitle} +
+ {$customName} + + {$customValue} +
+
+ + + diff --git a/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_online_receipt_text.tpl b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_online_receipt_text.tpl new file mode 100644 index 0000000000..7fba59ab12 --- /dev/null +++ b/CRM/Upgrade/4.5.beta5.msg_template/message_templates/membership_online_receipt_text.tpl @@ -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 visiting this web page.{/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} diff --git a/CRM/Upgrade/Incremental/sql/4.5.beta5.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.5.beta5.mysql.tpl index ba5b8053fd..05996cb0d3 100644 --- a/CRM/Upgrade/Incremental/sql/4.5.beta5.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.5.beta5.mysql.tpl @@ -1 +1,3 @@ {* file to handle db changes in 4.5.beta5 during upgrade *} + +{include file='../CRM/Upgrade/4.5.beta5.msg_template/civicrm_msg_template.tpl'} \ No newline at end of file -- 2.25.1