From 24dac2ae3533dc7d5f78d744f1e93992f696fad2 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 16 Jul 2021 14:27:29 +1200 Subject: [PATCH] Swap displayName smarty for {contact.display_name token} This swaps over the smartyToken for the token token on the template added on new installs, and adds a test. Separately I will look at an upgrade script and other templates To test make sure you enable invoicing & then generate an invoice from search results. use the demo site due to aforementioned lack of upgrade and check the display name is still on the left hand side --- Civi/Test/ContactTestTrait.php | 2 - sql/civicrm_generated.mysql | 4 +- .../CRM/Contribute/Form/Task/InvoiceTest.php | 60 +++++++++++++++---- .../contribution_invoice_receipt_html.tpl | 3 + .../contribution_invoice_receipt_html.tpl | 12 ++-- 5 files changed, 61 insertions(+), 20 deletions(-) create mode 100644 tests/templates/message_templates/contribution_invoice_receipt_html.tpl diff --git a/Civi/Test/ContactTestTrait.php b/Civi/Test/ContactTestTrait.php index bd8d5bb16fcf..0807e8f0b7af 100644 --- a/Civi/Test/ContactTestTrait.php +++ b/Civi/Test/ContactTestTrait.php @@ -77,8 +77,6 @@ public function organizationCreate($params = [], $seq = 0): int { * * @return int * id of Individual created - * - * @throws \CiviCRM_API3_Exception */ public function individualCreate($params = [], $seq = 0, $random = FALSE): int { $params = array_merge($this->sampleContact('Individual', $seq, $random), $params); diff --git a/sql/civicrm_generated.mysql b/sql/civicrm_generated.mysql index b649dbccef56..30af2a714063 100644 --- a/sql/civicrm_generated.mysql +++ b/sql/civicrm_generated.mysql @@ -5102,8 +5102,8 @@ INSERT INTO `civicrm_msg_template` (`id`, `msg_title`, `msg_subject`, `msg_text` (6,'Contributions - Receipt (off-line)','{ts}Contribution Receipt{/ts} - {contact.display_name}\n','{assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}{$greeting},{/if}\n\n{if !empty($formValues.receipt_text)}\n{$formValues.receipt_text}\n{else}{ts}Below you will find a receipt for this contribution.{/ts}{/if}\n\n===========================================================\n{ts}Contribution Information{/ts}\n\n===========================================================\n{ts}Contributor{/ts}: {contact.display_name}\n{if !empty($formValues.contributionType_name)}\n{ts}Financial Type{/ts}: {$formValues.contributionType_name}\n{/if}\n{if $lineItem}\n{foreach from=$lineItem item=value key=priceset}\n---------------------------------------------------------\n{capture assign=ts_item}{ts}Item{/ts}{/capture}\n{capture assign=ts_qty}{ts}Qty{/ts}{/capture}\n{capture assign=ts_each}{ts}Each{/ts}{/capture}\n{if !empty($getTaxDetails)}\n{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}\n{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}\n{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}\n{/if}\n{capture assign=ts_total}{ts}Total{/ts}{/capture}\n{$ts_item|string_format:\"%-30s\"} {$ts_qty|string_format:\"%5s\"} {$ts_each|string_format:\"%10s\"} {if !empty($getTaxDetails)} {$ts_subtotal|string_format:\"%10s\"} {$ts_taxRate} {$ts_taxAmount|string_format:\"%10s\"} {/if} {$ts_total|string_format:\"%10s\"}\n----------------------------------------------------------\n{foreach from=$value item=line}\n{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 !empty($getTaxDetails)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:\"%10s\"} {if isset($line.tax_rate) and ($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\"}\n{/foreach}\n{/foreach}\n{/if}\n\n{if !empty($getTaxDetails) && !empty($dataArray)}\n{ts}Amount before Tax{/ts} : {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}\n\n{foreach from=$dataArray item=value key=priceset}\n{if $priceset || $priceset == 0 || $value != \'\'}\n{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:\"%.2f\"}% : {$value|crmMoney:$currency}\n{else}\n{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if} : {$value|crmMoney:$currency}\n{/if}\n{/foreach}\n{/if}\n\n{if isset($totalTaxAmount) && $totalTaxAmount !== \'null\'}\n{ts}Total Tax Amount{/ts} : {$totalTaxAmount|crmMoney:$currency}\n{/if}\n{ts}Total Amount{/ts} : {$formValues.total_amount|crmMoney:$currency}\n{if !empty($receive_date)}\n{ts}Date Received{/ts}: {$receive_date|truncate:10:\'\'|crmDate}\n{/if}\n{if !empty($receipt_date)}\n{ts}Receipt Date{/ts}: {$receipt_date|truncate:10:\'\'|crmDate}\n{/if}\n{if !empty($formValues.paidBy) and empty($formValues.hidden_CreditCard)}\n{ts}Paid By{/ts}: {$formValues.paidBy}\n{if !empty($formValues.check_number)}\n{ts}Check Number{/ts}: {$formValues.check_number}\n{/if}\n{/if}\n{if !empty($formValues.trxn_id)}\n{ts}Transaction ID{/ts}: {$formValues.trxn_id}\n{/if}\n\n{if !empty($ccContribution)}\n===========================================================\n{ts}Billing Name and Address{/ts}\n\n===========================================================\n{$billingName}\n{$address}\n\n===========================================================\n{ts}Credit Card Information{/ts}\n\n===========================================================\n{$credit_card_type}\n{$credit_card_number}\n{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:\'\'|crmDate}\n{/if}\n{if !empty($customGroup)}\n{foreach from=$customGroup item=value key=customName}\n===========================================================\n{$customName}\n===========================================================\n{foreach from=$value item=v key=n}\n{$n}: {$v}\n{/foreach}\n{/foreach}\n{/if}\n\n{if !empty($softCreditTypes) and !empty($softCredits)}\n{foreach from=$softCreditTypes item=softCreditType key=n}\n===========================================================\n{$softCreditType}\n===========================================================\n{foreach from=$softCredits.$n item=value key=label}\n{$label}: {$value}\n{/foreach}\n{/foreach}\n{/if}\n\n{if !empty($formValues.product_name)}\n===========================================================\n{ts}Premium Information{/ts}\n\n===========================================================\n{$formValues.product_name}\n{if $formValues.product_option}\n{ts}Option{/ts}: {$formValues.product_option}\n{/if}\n{if $formValues.product_sku}\n{ts}SKU{/ts}: {$formValues.product_sku}\n{/if}\n{if !empty($fulfilled_date)}\n{ts}Sent{/ts}: {$fulfilled_date|crmDate}\n{/if}\n{/if}\n','\n\n\n \n \n\n\n\n{capture assign=headerStyle}colspan=\"2\" style=\"text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;\"{/capture}\n{capture assign=labelStyle }style=\"padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;\"{/capture}\n{capture assign=valueStyle }style=\"padding: 4px; border-bottom: 1px solid #999;\"{/capture}\n\n
\n \n\n \n \n \n\n \n\n \n \n \n \n \n \n\n
\n {assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}

{$greeting},

{/if}\n {if !empty($formValues.receipt_text)}\n

{$formValues.receipt_text|htmlize}

\n {else}\n

{ts}Below you will find a receipt for this contribution.{/ts}

\n {/if}\n
\n \n \n \n \n \n \n \n \n \n {if !empty($formValues.contributionType_name)}\n \n \n {/if}\n \n\n {if !empty($lineItem) and empty($is_quick_config)}\n {foreach from=$lineItem item=value key=priceset}\n \n \n \n {/foreach}\n {/if}\n {if !empty($getTaxDetails) && !empty($dataArray)}\n \n \n \n \n\n {foreach from=$dataArray item=value key=priceset}\n \n {if $priceset || $priceset == 0 || $value != \'\'}\n \n \n {else}\n \n \n {/if}\n \n {/foreach}\n {/if}\n\n {if isset($totalTaxAmount) && $totalTaxAmount !== \'null\'}\n \n \n \n \n {/if}\n\n \n \n \n \n\n {if !empty($receive_date)}\n \n \n \n \n {/if}\n\n {if !empty($receipt_date)}\n \n \n \n \n {/if}\n\n {if !empty($formValues.paidBy) and empty($formValues.hidden_CreditCard)}\n \n \n \n \n {if !empty($formValues.check_number)}\n \n \n \n \n {/if}\n {/if}\n\n {if !empty($formValues.trxn_id)}\n \n \n \n \n {/if}\n\n {if !empty($ccContribution)}\n \n \n \n \n \n \n \n \n \n \n \n \n {/if}\n\n {if !empty($softCreditTypes) and !empty($softCredits)}\n {foreach from=$softCreditTypes item=softCreditType key=n}\n \n \n \n {foreach from=$softCredits.$n item=value key=label}\n \n \n \n \n {/foreach}\n {/foreach}\n {/if}\n\n {if !empty($customGroup)}\n {foreach from=$customGroup item=value key=customName}\n \n \n \n {foreach from=$value item=v key=n}\n \n \n \n \n {/foreach}\n {/foreach}\n {/if}\n\n {if !empty($formValues.product_name)}\n \n \n \n \n \n \n {if $formValues.product_option}\n \n \n \n \n {/if}\n {if $formValues.product_sku}\n \n \n \n \n {/if}\n {if !empty($fulfilled_date)}\n \n \n \n \n {/if}\n {/if}\n\n
\n {ts}Contribution Information{/ts}\n
\n {ts}Contributor Name{/ts}\n \n {contact.display_name}\n
\n {ts}Financial Type{/ts}\n \n {$formValues.contributionType_name}\n
\n {* FIXME: style this table so that it looks like the text version (justification, etc.) *}\n \n \n \n \n {if !empty($getTaxDetails)}\n \n \n \n {/if}\n \n \n {foreach from=$value item=line}\n \n \n \n \n {if !empty($getTaxDetails)}\n \n {if isset($line.tax_rate) and ($line.tax_rate != \"\" || $line.tax_amount != \"\")}\n \n \n {else}\n \n \n {/if}\n {/if}\n \n \n {/foreach}\n
{ts}Item{/ts}{ts}Qty{/ts}{ts}Each{/ts}{ts}Subtotal{/ts}{ts}Tax Rate{/ts}{ts}Tax Amount{/ts}{ts}Total{/ts}
\n {if $line.html_type eq \'Text\'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}
{$line.description|truncate:30:\"...\"}
{/if}\n
\n {$line.qty}\n \n {$line.unit_price|crmMoney:$currency}\n \n {$line.unit_price*$line.qty|crmMoney:$currency}\n \n {$line.tax_rate|string_format:\"%.2f\"}%\n \n {$line.tax_amount|crmMoney:$currency}\n \n {$line.line_total+$line.tax_amount|crmMoney:$currency}\n
\n
\n {ts} Amount before Tax : {/ts}\n \n {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}\n
 {if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:\"%.2f\"}% {$value|crmMoney:$currency} {ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if} {$value|crmMoney:$currency}
\n {ts}Total Tax Amount{/ts}\n \n {$totalTaxAmount|crmMoney:$currency}\n
\n {ts}Total Amount{/ts}\n \n {$formValues.total_amount|crmMoney:$currency}\n
\n {ts}Date Received{/ts}\n \n {$receive_date|truncate:10:\'\'|crmDate}\n
\n {ts}Receipt Date{/ts}\n \n {$receipt_date|truncate:10:\'\'|crmDate}\n
\n {ts}Paid By{/ts}\n \n {$formValues.paidBy}\n
\n {ts}Check Number{/ts}\n \n {$formValues.check_number}\n
\n {ts}Transaction ID{/ts}\n \n {$formValues.trxn_id}\n
\n {ts}Billing Name and Address{/ts}\n
\n {$billingName}
\n {$address|nl2br}\n
\n {ts}Credit Card Information{/ts}\n
\n {$credit_card_type}
\n {$credit_card_number}
\n {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:\'\'|crmDate}\n
\n {$softCreditType}\n
\n {$label}\n \n {$value}\n
\n {$customName}\n
\n {$n}\n \n {$v}\n
\n {ts}Premium Information{/ts}\n
\n {$formValues.product_name}\n
\n {ts}Option{/ts}\n \n {$formValues.product_option}\n
\n {ts}SKU{/ts}\n \n {$formValues.product_sku}\n
\n {ts}Sent{/ts}\n \n {$fulfilled_date|truncate:10:\'\'|crmDate}\n
\n
\n
\n\n\n\n',1,825,'contribution_offline_receipt',0,1,0,NULL), (7,'Contributions - Receipt (on-line)','{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name}\n','{assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}{$greeting},{/if}\n{if !empty($receipt_text)}\n{$receipt_text}\n{/if}\n{if $is_pay_later}\n\n===========================================================\n{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}\n===========================================================\n{/if}\n\n{if $amount}\n===========================================================\n{ts}Contribution Information{/ts}\n\n===========================================================\n{if $lineItem and $priceSetID and empty($is_quick_config)}\n{foreach from=$lineItem item=value key=priceset}\n---------------------------------------------------------\n{capture assign=ts_item}{ts}Item{/ts}{/capture}\n{capture assign=ts_qty}{ts}Qty{/ts}{/capture}\n{capture assign=ts_each}{ts}Each{/ts}{/capture}\n{if !empty($dataArray)}\n{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}\n{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}\n{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}\n{/if}\n{capture assign=ts_total}{ts}Total{/ts}{/capture}\n{$ts_item|string_format:\"%-30s\"} {$ts_qty|string_format:\"%5s\"} {$ts_each|string_format:\"%10s\"} {if !empty($dataArray)} {$ts_subtotal|string_format:\"%10s\"} {$ts_taxRate} {$ts_taxAmount|string_format:\"%10s\"} {/if} {$ts_total|string_format:\"%10s\"}\n----------------------------------------------------------\n{foreach from=$value item=line}\n{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 !empty($dataArray)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:\"%10s\"} {if isset($line.tax_rate) and ($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\"}\n{/foreach}\n{/foreach}\n\n{if !empty($dataArray)}\n{ts}Amount before Tax{/ts}: {$amount-$totalTaxAmount|crmMoney:$currency}\n\n{foreach from=$dataArray item=value key=priceset}\n{if $priceset || $priceset == 0}\n{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:\"%.2f\"}%: {$value|crmMoney:$currency}\n{else}\n{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}\n{/if}\n{/foreach}\n{/if}\n\n{if isset($totalTaxAmount)}\n{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}\n{/if}\n\n{ts}Total Amount{/ts}: {$amount|crmMoney:$currency}\n{else}\n{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if isset($amount_level) } - {$amount_level} {/if}\n{/if}\n{/if}\n{if !empty($receive_date)}\n\n{ts}Date{/ts}: {$receive_date|crmDate}\n{/if}\n{if !empty($is_monetary) and !empty($trxn_id)}\n{ts}Transaction #{/ts}: {$trxn_id}\n{/if}\n\n{if !empty($is_recur)}\n{ts}This is a recurring contribution.{/ts}\n\n{if $cancelSubscriptionUrl}\n{ts}You can cancel future contributions at:{/ts}\n\n{$cancelSubscriptionUrl}\n\n{/if}\n\n{if $updateSubscriptionBillingUrl}\n{ts}You can update billing details for this recurring contribution at:{/ts}\n\n{$updateSubscriptionBillingUrl}\n\n{/if}\n\n{if $updateSubscriptionUrl}\n{ts}You can update recurring contribution amount or change the number of installments for this recurring contribution at:{/ts}\n\n{$updateSubscriptionUrl}\n\n{/if}\n{/if}\n\n{if $honor_block_is_active}\n===========================================================\n{$soft_credit_type}\n===========================================================\n{foreach from=$honoreeProfile item=value key=label}\n{$label}: {$value}\n{/foreach}\n{elseif !empty($softCreditTypes) and !empty($softCredits)}\n{foreach from=$softCreditTypes item=softCreditType key=n}\n===========================================================\n{$softCreditType}\n===========================================================\n{foreach from=$softCredits.$n item=value key=label}\n{$label}: {$value}\n{/foreach}\n{/foreach}\n{/if}\n{if !empty($pcpBlock)}\n===========================================================\n{ts}Personal Campaign Page{/ts}\n\n===========================================================\n{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}\n\n{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}\n\n{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}\n\n{/if}\n{if !empty($onBehalfProfile)}\n===========================================================\n{ts}On Behalf Of{/ts}\n\n===========================================================\n{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}\n{$onBehalfName}: {$onBehalfValue}\n{/foreach}\n{/if}\n\n{if !empty($billingName)}\n===========================================================\n{ts}Billing Name and Address{/ts}\n\n===========================================================\n{$billingName}\n{$address}\n\n{$email}\n{elseif !empty($email)}\n===========================================================\n{ts}Registered Email{/ts}\n\n===========================================================\n{$email}\n{/if} {* End billingName or Email*}\n{if !empty($credit_card_type)}\n\n===========================================================\n{ts}Credit Card Information{/ts}\n\n===========================================================\n{$credit_card_type}\n{$credit_card_number}\n{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:\'\'|crmDate}\n{/if}\n\n{if !empty($selectPremium )}\n===========================================================\n{ts}Premium Information{/ts}\n\n===========================================================\n{$product_name}\n{if $option}\n{ts}Option{/ts}: {$option}\n{/if}\n{if $sku}\n{ts}SKU{/ts}: {$sku}\n{/if}\n{if $start_date}\n{ts}Start Date{/ts}: {$start_date|crmDate}\n{/if}\n{if $end_date}\n{ts}End Date{/ts}: {$end_date|crmDate}\n{/if}\n{if !empty($contact_email) OR !empty($contact_phone)}\n\n{ts}For information about this premium, contact:{/ts}\n\n{if !empty($contact_email)}\n {$contact_email}\n{/if}\n{if !empty($contact_phone)}\n {$contact_phone}\n{/if}\n{/if}\n{if !empty($is_deductible) AND !empty($price)}\n\n{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}\n{/if}\n\n{if !empty($customPre)}\n===========================================================\n{$customPre_grouptitle}\n\n===========================================================\n{foreach from=$customPre item=customValue key=customName}\n{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}\n {$customName}: {$customValue}\n{/if}\n{/foreach}\n{/if}\n\n\n{if !empty($customPost)}\n===========================================================\n{$customPost_grouptitle}\n\n===========================================================\n{foreach from=$customPost item=customValue key=customName}\n{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}\n {$customName}: {$customValue}\n{/if}\n{/foreach}\n{/if}\n','\n\n\n \n \n\n\n\n{capture assign=headerStyle}colspan=\"2\" style=\"text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;\"{/capture}\n{capture assign=labelStyle }style=\"padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;\"{/capture}\n{capture assign=valueStyle }style=\"padding: 4px; border-bottom: 1px solid #999;\"{/capture}\n\n
\n \n\n \n \n \n\n \n\n \n \n \n
\n {assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}

{$greeting},

{/if}\n {if !empty($receipt_text)}\n

{$receipt_text|htmlize}

\n {/if}\n\n {if $is_pay_later}\n

{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}

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

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

\n {if !empty($contact_email)}\n

{$contact_email}

\n {/if}\n {if !empty($contact_phone)}\n

{$contact_phone}

\n {/if}\n
\n

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

\n
\n {$customPre_grouptitle}\n
\n {$customName}\n \n {$customValue}\n
\n {$customPost_grouptitle}\n
\n {$customName}\n \n {$customValue}\n
\n
\n\n\n\n',1,826,'contribution_online_receipt',1,0,0,NULL), (8,'Contributions - Receipt (on-line)','{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name}\n','{assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}{$greeting},{/if}\n{if !empty($receipt_text)}\n{$receipt_text}\n{/if}\n{if $is_pay_later}\n\n===========================================================\n{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}\n===========================================================\n{/if}\n\n{if $amount}\n===========================================================\n{ts}Contribution Information{/ts}\n\n===========================================================\n{if $lineItem and $priceSetID and empty($is_quick_config)}\n{foreach from=$lineItem item=value key=priceset}\n---------------------------------------------------------\n{capture assign=ts_item}{ts}Item{/ts}{/capture}\n{capture assign=ts_qty}{ts}Qty{/ts}{/capture}\n{capture assign=ts_each}{ts}Each{/ts}{/capture}\n{if !empty($dataArray)}\n{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}\n{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}\n{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}\n{/if}\n{capture assign=ts_total}{ts}Total{/ts}{/capture}\n{$ts_item|string_format:\"%-30s\"} {$ts_qty|string_format:\"%5s\"} {$ts_each|string_format:\"%10s\"} {if !empty($dataArray)} {$ts_subtotal|string_format:\"%10s\"} {$ts_taxRate} {$ts_taxAmount|string_format:\"%10s\"} {/if} {$ts_total|string_format:\"%10s\"}\n----------------------------------------------------------\n{foreach from=$value item=line}\n{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 !empty($dataArray)}{$line.unit_price*$line.qty|crmMoney:$currency|string_format:\"%10s\"} {if isset($line.tax_rate) and ($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\"}\n{/foreach}\n{/foreach}\n\n{if !empty($dataArray)}\n{ts}Amount before Tax{/ts}: {$amount-$totalTaxAmount|crmMoney:$currency}\n\n{foreach from=$dataArray item=value key=priceset}\n{if $priceset || $priceset == 0}\n{if isset($taxTerm)}{$taxTerm}{/if} {$priceset|string_format:\"%.2f\"}%: {$value|crmMoney:$currency}\n{else}\n{ts}No{/ts} {if isset($taxTerm)}{$taxTerm}{/if}: {$value|crmMoney:$currency}\n{/if}\n{/foreach}\n{/if}\n\n{if isset($totalTaxAmount)}\n{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}\n{/if}\n\n{ts}Total Amount{/ts}: {$amount|crmMoney:$currency}\n{else}\n{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if isset($amount_level) } - {$amount_level} {/if}\n{/if}\n{/if}\n{if !empty($receive_date)}\n\n{ts}Date{/ts}: {$receive_date|crmDate}\n{/if}\n{if !empty($is_monetary) and !empty($trxn_id)}\n{ts}Transaction #{/ts}: {$trxn_id}\n{/if}\n\n{if !empty($is_recur)}\n{ts}This is a recurring contribution.{/ts}\n\n{if $cancelSubscriptionUrl}\n{ts}You can cancel future contributions at:{/ts}\n\n{$cancelSubscriptionUrl}\n\n{/if}\n\n{if $updateSubscriptionBillingUrl}\n{ts}You can update billing details for this recurring contribution at:{/ts}\n\n{$updateSubscriptionBillingUrl}\n\n{/if}\n\n{if $updateSubscriptionUrl}\n{ts}You can update recurring contribution amount or change the number of installments for this recurring contribution at:{/ts}\n\n{$updateSubscriptionUrl}\n\n{/if}\n{/if}\n\n{if $honor_block_is_active}\n===========================================================\n{$soft_credit_type}\n===========================================================\n{foreach from=$honoreeProfile item=value key=label}\n{$label}: {$value}\n{/foreach}\n{elseif !empty($softCreditTypes) and !empty($softCredits)}\n{foreach from=$softCreditTypes item=softCreditType key=n}\n===========================================================\n{$softCreditType}\n===========================================================\n{foreach from=$softCredits.$n item=value key=label}\n{$label}: {$value}\n{/foreach}\n{/foreach}\n{/if}\n{if !empty($pcpBlock)}\n===========================================================\n{ts}Personal Campaign Page{/ts}\n\n===========================================================\n{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}\n\n{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}\n\n{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}\n\n{/if}\n{if !empty($onBehalfProfile)}\n===========================================================\n{ts}On Behalf Of{/ts}\n\n===========================================================\n{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}\n{$onBehalfName}: {$onBehalfValue}\n{/foreach}\n{/if}\n\n{if !empty($billingName)}\n===========================================================\n{ts}Billing Name and Address{/ts}\n\n===========================================================\n{$billingName}\n{$address}\n\n{$email}\n{elseif !empty($email)}\n===========================================================\n{ts}Registered Email{/ts}\n\n===========================================================\n{$email}\n{/if} {* End billingName or Email*}\n{if !empty($credit_card_type)}\n\n===========================================================\n{ts}Credit Card Information{/ts}\n\n===========================================================\n{$credit_card_type}\n{$credit_card_number}\n{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:\'\'|crmDate}\n{/if}\n\n{if !empty($selectPremium )}\n===========================================================\n{ts}Premium Information{/ts}\n\n===========================================================\n{$product_name}\n{if $option}\n{ts}Option{/ts}: {$option}\n{/if}\n{if $sku}\n{ts}SKU{/ts}: {$sku}\n{/if}\n{if $start_date}\n{ts}Start Date{/ts}: {$start_date|crmDate}\n{/if}\n{if $end_date}\n{ts}End Date{/ts}: {$end_date|crmDate}\n{/if}\n{if !empty($contact_email) OR !empty($contact_phone)}\n\n{ts}For information about this premium, contact:{/ts}\n\n{if !empty($contact_email)}\n {$contact_email}\n{/if}\n{if !empty($contact_phone)}\n {$contact_phone}\n{/if}\n{/if}\n{if !empty($is_deductible) AND !empty($price)}\n\n{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}\n{/if}\n\n{if !empty($customPre)}\n===========================================================\n{$customPre_grouptitle}\n\n===========================================================\n{foreach from=$customPre item=customValue key=customName}\n{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}\n {$customName}: {$customValue}\n{/if}\n{/foreach}\n{/if}\n\n\n{if !empty($customPost)}\n===========================================================\n{$customPost_grouptitle}\n\n===========================================================\n{foreach from=$customPost item=customValue key=customName}\n{if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}\n {$customName}: {$customValue}\n{/if}\n{/foreach}\n{/if}\n','\n\n\n \n \n\n\n\n{capture assign=headerStyle}colspan=\"2\" style=\"text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;\"{/capture}\n{capture assign=labelStyle }style=\"padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;\"{/capture}\n{capture assign=valueStyle }style=\"padding: 4px; border-bottom: 1px solid #999;\"{/capture}\n\n
\n \n\n \n \n \n\n \n\n \n \n \n
\n {assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}

{$greeting},

{/if}\n {if !empty($receipt_text)}\n

{$receipt_text|htmlize}

\n {/if}\n\n {if $is_pay_later}\n

{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}

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

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

\n {if !empty($contact_email)}\n

{$contact_email}

\n {/if}\n {if !empty($contact_phone)}\n

{$contact_phone}

\n {/if}\n
\n

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

\n
\n {$customPre_grouptitle}\n
\n {$customName}\n \n {$customValue}\n
\n {$customPost_grouptitle}\n
\n {$customName}\n \n {$customValue}\n
\n
\n\n\n\n',1,826,'contribution_online_receipt',0,1,0,NULL), - (9,'Contributions - Invoice','{if $title}\n {if $component}\n {if $component == \'event\'}\n {ts 1=$title}Event Registration Invoice: %1{/ts}\n {else}\n {ts 1=$title}Contribution Invoice: %1{/ts}\n {/if}\n {/if}\n{else}\n {ts}Invoice{/ts}\n{/if}\n - {contact.display_name}\n','{ts}Contribution Invoice{/ts}\n','\n\n \n \n \n \n \n
\n {if $config->empoweredBy}\n \n \n \n \n
\n {/if}\n \n \n \n \n \n \n \n {if $organization_name}\n \n {else}\n \n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}INVOICE{/ts}{ts}Invoice Date:{/ts}{$domain_organization}
{$display_name} ({$organization_name}){$display_name}{$invoice_date}\n \n {if $domain_street_address }{$domain_street_address}{/if}\n {if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if}\n \n
{$street_address} {$supplemental_address_1}{ts}Invoice Number:{/ts}\n \n {if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if}\n {if $domain_state }{$domain_state}{/if}\n \n
{$supplemental_address_2} {$stateProvinceAbbreviation}{$invoice_number}\n \n {if $domain_city}{$domain_city}{/if}\n {if $domain_postal_code }{$domain_postal_code}{/if}\n \n
{$city} {$postal_code}{ts}Reference:{/ts}{if $domain_country}{$domain_country}{/if}
{$country}{if !empty($source)}{$source}{/if}{if $domain_email}{$domain_email}{/if}
{if $domain_phone}{$domain_phone}{/if}
\n\n \n \n \n \n \n \n \n \n {foreach from=$lineItem item=value key=priceset name=taxpricevalue}\n {if $smarty.foreach.taxpricevalue.index eq 0}\n {else}\n {/if}\n \n \n \n \n {if $value.tax_amount != \'\'}\n \n {else}\n \n {/if}\n \n \n {/foreach}\n \n \n \n \n \n {if !empty($dataArray)}\n {foreach from=$dataArray item=value key=priceset}\n \n \n {if $priceset}\n \n \n {elseif $priceset == 0}\n \n \n {/if}\n \n {/foreach}\n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n


\n \n \n \n {if $contribution_status_id == $pendingStatusId && $is_pay_later == 1}\n \n \n \n \n {/if}\n
{ts}Description{/ts}{ts}Quantity{/ts}{ts}Unit Price{/ts}{if isset($taxTerm)}{$taxTerm}{/if}{ts 1=$currency}Amount %1{/ts}
\n {if $value.html_type eq \'Text\'}\n {$value.label}\n {else}\n {$value.field_title} - {$value.label}\n {/if}\n {if $value.description}\n
{$value.description|truncate:30:\"...\"}
\n {/if}\n
\n
{$value.qty}{$value.unit_price|crmMoney:$currency}{if isset($value.tax_rate)}{$value.tax_rate}%{/if}{if isset($taxTerm)}{ts 1=$taxTerm}-{/ts}{/if}{$value.subTotal|crmMoney:$currency}
{ts}Sub Total{/ts}{$subTotal|crmMoney:$currency}
{if isset($taxTerm)}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}{$value|crmMoney:$currency} {if isset($taxTerm)}{ts 1=$taxTerm}TOTAL %1{/ts}{/if}{$value|crmMoney:$currency}
{ts 1=$currency}TOTAL %1{/ts}{$amount|crmMoney:$currency}
\n {if $contribution_status_id == $refundedStatusId}\n {ts}Amount Credited{/ts}\n {else}\n {ts}Amount Paid{/ts}\n {/if}\n \n {$amountPaid|crmMoney:$currency}

{ts}AMOUNT DUE:{/ts}{$amountDue|crmMoney:$currency}
{ts 1=$dueDate}DUE DATE: %1{/ts}
\n \n \n \n\n {if $contribution_status_id == $pendingStatusId && $is_pay_later == 1}\n \n \n \n \n
\n\n \n \n \n \n \n
{ts}PAYMENT ADVICE{/ts}

{ts}To:{/ts}
\n {$domain_organization}
\n {$domain_street_address} {$domain_supplemental_address_1}
\n {$domain_supplemental_address_2} {$domain_state}
\n {$domain_city} {$domain_postal_code}
\n {$domain_country}
\n {$domain_email}
\n {$domain_phone}
\n


{$notes}\n
\n \n \n \n \n \n \n \n \n \n \n {if $is_pay_later == 1}\n \n \n \n \n {else}\n \n \n \n \n {/if}\n \n \n \n \n \n \n \n
{ts}Customer:{/ts}{$display_name}
{ts}Invoice Number:{/ts}{$invoice_number}

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

\n {/if}\n\n {if $contribution_status_id == $refundedStatusId || $contribution_status_id == $cancelledStatusId}\n {if $config->empoweredBy}\n \n \n \n \n
\n {/if}\n\n
\n \n \n \n \n \n \n \n {if $organization_name}\n \n {else}\n \n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}CREDIT NOTE{/ts}{ts}Date:{/ts}{$domain_organization}
{$display_name} ({$organization_name}){$display_name}{$invoice_date}\n \n {if $domain_street_address }{$domain_street_address}{/if}\n {if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if}\n \n
{$street_address} {$supplemental_address_1}{ts}Credit Note Number:{/ts}\n \n {if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if}\n {if $domain_state }{$domain_state}{/if}\n \n
{$supplemental_address_2} {$stateProvinceAbbreviation}{$creditnote_id}\n \n {if $domain_city}{$domain_city}{/if}\n {if $domain_postal_code }{$domain_postal_code}{/if}\n \n
{$city} {$postal_code}{ts}Reference:{/ts}\n \n {if $domain_country}{$domain_country}{/if}\n \n
{$source}\n \n {if $domain_email}{$domain_email}{/if}\n \n
\n \n {if $domain_phone}{$domain_phone}{/if}\n \n
\n\n \n \n \n \n
\n {* FIXME: style this table so that it looks like the text version (justification, etc.) *}\n \n \n \n \n \n \n \n {foreach from=$lineItem item=value key=priceset name=pricevalue}\n {if $smarty.foreach.pricevalue.index eq 0}\n \n {else}\n \n {/if}\n \n \n \n \n {if $value.tax_amount != \'\'}\n \n {else}\n \n {/if}\n \n \n {/foreach}\n \n \n \n \n \n \n {if !empty($dataArray)}\n {foreach from=$dataArray item=value key=priceset}\n \n \n {if $priceset}\n \n \n {elseif $priceset == 0}\n \n \n {/if}\n \n {/foreach}\n {/if}\n \n \n \n \n \n \n \n \n \n {if $is_pay_later == 0}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {/if}\n


\n \n \n \n \n \n \n \n
{ts}Description{/ts}{ts}Quantity{/ts}{ts}Unit Price{/ts}{if isset($taxTerm)}{$taxTerm}{/if}{ts 1=$currency}Amount %1{/ts}


\n \n {if $value.html_type eq \'Text\'}\n {$value.label}\n {else}\n {$value.field_title} - {$value.label}\n {/if}\n {if $value.description}\n
{$value.description|truncate:30:\"...\"}
\n {/if}\n
\n
{$value.qty}{$value.unit_price|crmMoney:$currency}{if isset($value.tax_rate)}{$value.tax_rate}%{/if}{if isset($taxTerm)}{ts 1=$taxTerm}No %1{/ts}{/if}{$value.subTotal|crmMoney:$currency}

{ts}Sub Total{/ts}{$subTotal|crmMoney:$currency}
{if isset($taxTerm)}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}{$value|crmMoney:$currency} {if isset($taxTerm)}{ts 1=$taxTerm}TOTAL NO %1{/ts}{/if}{$value|crmMoney:$currency}

{ts 1=$currency}TOTAL %1{/ts}{$amount|crmMoney:$currency}
{ts}LESS Credit to invoice(s){/ts}{$amount|crmMoney:$currency}

{ts}REMAINING CREDIT{/ts}{$amountDue|crmMoney:$currency}
\n
\n\n \n \n \n \n
\n\n \n \n \n \n \n
{ts}CREDIT ADVICE{/ts}

{ts}Please do not pay on this advice. Deduct the amount of this Credit Note from your next payment to us{/ts}

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}Customer:{/ts}{$display_name}
{ts}Credit Note#:{/ts}{$creditnote_id}

{ts}Credit Amount:{/ts}{$amount|crmMoney:$currency}
\n
\n {/if}\n
\n\n \n \n\n',1,827,'contribution_invoice_receipt',1,0,0,NULL), - (10,'Contributions - Invoice','{if $title}\n {if $component}\n {if $component == \'event\'}\n {ts 1=$title}Event Registration Invoice: %1{/ts}\n {else}\n {ts 1=$title}Contribution Invoice: %1{/ts}\n {/if}\n {/if}\n{else}\n {ts}Invoice{/ts}\n{/if}\n - {contact.display_name}\n','{ts}Contribution Invoice{/ts}\n','\n\n \n \n \n \n \n
\n {if $config->empoweredBy}\n \n \n \n \n
\n {/if}\n \n \n \n \n \n \n \n {if $organization_name}\n \n {else}\n \n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}INVOICE{/ts}{ts}Invoice Date:{/ts}{$domain_organization}
{$display_name} ({$organization_name}){$display_name}{$invoice_date}\n \n {if $domain_street_address }{$domain_street_address}{/if}\n {if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if}\n \n
{$street_address} {$supplemental_address_1}{ts}Invoice Number:{/ts}\n \n {if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if}\n {if $domain_state }{$domain_state}{/if}\n \n
{$supplemental_address_2} {$stateProvinceAbbreviation}{$invoice_number}\n \n {if $domain_city}{$domain_city}{/if}\n {if $domain_postal_code }{$domain_postal_code}{/if}\n \n
{$city} {$postal_code}{ts}Reference:{/ts}{if $domain_country}{$domain_country}{/if}
{$country}{if !empty($source)}{$source}{/if}{if $domain_email}{$domain_email}{/if}
{if $domain_phone}{$domain_phone}{/if}
\n\n \n \n \n \n \n \n \n \n {foreach from=$lineItem item=value key=priceset name=taxpricevalue}\n {if $smarty.foreach.taxpricevalue.index eq 0}\n {else}\n {/if}\n \n \n \n \n {if $value.tax_amount != \'\'}\n \n {else}\n \n {/if}\n \n \n {/foreach}\n \n \n \n \n \n {if !empty($dataArray)}\n {foreach from=$dataArray item=value key=priceset}\n \n \n {if $priceset}\n \n \n {elseif $priceset == 0}\n \n \n {/if}\n \n {/foreach}\n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n


\n \n \n \n {if $contribution_status_id == $pendingStatusId && $is_pay_later == 1}\n \n \n \n \n {/if}\n
{ts}Description{/ts}{ts}Quantity{/ts}{ts}Unit Price{/ts}{if isset($taxTerm)}{$taxTerm}{/if}{ts 1=$currency}Amount %1{/ts}
\n {if $value.html_type eq \'Text\'}\n {$value.label}\n {else}\n {$value.field_title} - {$value.label}\n {/if}\n {if $value.description}\n
{$value.description|truncate:30:\"...\"}
\n {/if}\n
\n
{$value.qty}{$value.unit_price|crmMoney:$currency}{if isset($value.tax_rate)}{$value.tax_rate}%{/if}{if isset($taxTerm)}{ts 1=$taxTerm}-{/ts}{/if}{$value.subTotal|crmMoney:$currency}
{ts}Sub Total{/ts}{$subTotal|crmMoney:$currency}
{if isset($taxTerm)}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}{$value|crmMoney:$currency} {if isset($taxTerm)}{ts 1=$taxTerm}TOTAL %1{/ts}{/if}{$value|crmMoney:$currency}
{ts 1=$currency}TOTAL %1{/ts}{$amount|crmMoney:$currency}
\n {if $contribution_status_id == $refundedStatusId}\n {ts}Amount Credited{/ts}\n {else}\n {ts}Amount Paid{/ts}\n {/if}\n \n {$amountPaid|crmMoney:$currency}

{ts}AMOUNT DUE:{/ts}{$amountDue|crmMoney:$currency}
{ts 1=$dueDate}DUE DATE: %1{/ts}
\n
\n\n {if $contribution_status_id == $pendingStatusId && $is_pay_later == 1}\n \n \n \n \n
\n\n \n \n \n \n \n
{ts}PAYMENT ADVICE{/ts}

{ts}To:{/ts}
\n {$domain_organization}
\n {$domain_street_address} {$domain_supplemental_address_1}
\n {$domain_supplemental_address_2} {$domain_state}
\n {$domain_city} {$domain_postal_code}
\n {$domain_country}
\n {$domain_email}
\n {$domain_phone}
\n


{$notes}\n
\n \n \n \n \n \n \n \n \n \n \n {if $is_pay_later == 1}\n \n \n \n \n {else}\n \n \n \n \n {/if}\n \n \n \n \n \n \n \n
{ts}Customer:{/ts}{$display_name}
{ts}Invoice Number:{/ts}{$invoice_number}

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

\n {/if}\n\n {if $contribution_status_id == $refundedStatusId || $contribution_status_id == $cancelledStatusId}\n {if $config->empoweredBy}\n \n \n \n \n
\n {/if}\n\n
\n \n \n \n \n \n \n \n {if $organization_name}\n \n {else}\n \n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}CREDIT NOTE{/ts}{ts}Date:{/ts}{$domain_organization}
{$display_name} ({$organization_name}){$display_name}{$invoice_date}\n \n {if $domain_street_address }{$domain_street_address}{/if}\n {if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if}\n \n
{$street_address} {$supplemental_address_1}{ts}Credit Note Number:{/ts}\n \n {if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if}\n {if $domain_state }{$domain_state}{/if}\n \n
{$supplemental_address_2} {$stateProvinceAbbreviation}{$creditnote_id}\n \n {if $domain_city}{$domain_city}{/if}\n {if $domain_postal_code }{$domain_postal_code}{/if}\n \n
{$city} {$postal_code}{ts}Reference:{/ts}\n \n {if $domain_country}{$domain_country}{/if}\n \n
{$source}\n \n {if $domain_email}{$domain_email}{/if}\n \n
\n \n {if $domain_phone}{$domain_phone}{/if}\n \n
\n\n \n \n \n \n
\n {* FIXME: style this table so that it looks like the text version (justification, etc.) *}\n \n \n \n \n \n \n \n {foreach from=$lineItem item=value key=priceset name=pricevalue}\n {if $smarty.foreach.pricevalue.index eq 0}\n \n {else}\n \n {/if}\n \n \n \n \n {if $value.tax_amount != \'\'}\n \n {else}\n \n {/if}\n \n \n {/foreach}\n \n \n \n \n \n \n {if !empty($dataArray)}\n {foreach from=$dataArray item=value key=priceset}\n \n \n {if $priceset}\n \n \n {elseif $priceset == 0}\n \n \n {/if}\n \n {/foreach}\n {/if}\n \n \n \n \n \n \n \n \n \n {if $is_pay_later == 0}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {/if}\n


\n \n \n \n \n \n \n \n
{ts}Description{/ts}{ts}Quantity{/ts}{ts}Unit Price{/ts}{if isset($taxTerm)}{$taxTerm}{/if}{ts 1=$currency}Amount %1{/ts}


\n \n {if $value.html_type eq \'Text\'}\n {$value.label}\n {else}\n {$value.field_title} - {$value.label}\n {/if}\n {if $value.description}\n
{$value.description|truncate:30:\"...\"}
\n {/if}\n
\n
{$value.qty}{$value.unit_price|crmMoney:$currency}{if isset($value.tax_rate)}{$value.tax_rate}%{/if}{if isset($taxTerm)}{ts 1=$taxTerm}No %1{/ts}{/if}{$value.subTotal|crmMoney:$currency}

{ts}Sub Total{/ts}{$subTotal|crmMoney:$currency}
{if isset($taxTerm)}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}{$value|crmMoney:$currency} {if isset($taxTerm)}{ts 1=$taxTerm}TOTAL NO %1{/ts}{/if}{$value|crmMoney:$currency}

{ts 1=$currency}TOTAL %1{/ts}{$amount|crmMoney:$currency}
{ts}LESS Credit to invoice(s){/ts}{$amount|crmMoney:$currency}

{ts}REMAINING CREDIT{/ts}{$amountDue|crmMoney:$currency}
\n
\n\n \n \n \n \n
\n\n \n \n \n \n \n
{ts}CREDIT ADVICE{/ts}

{ts}Please do not pay on this advice. Deduct the amount of this Credit Note from your next payment to us{/ts}

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}Customer:{/ts}{$display_name}
{ts}Credit Note#:{/ts}{$creditnote_id}

{ts}Credit Amount:{/ts}{$amount|crmMoney:$currency}
\n
\n {/if}\n
\n\n \n \n\n',1,827,'contribution_invoice_receipt',0,1,0,NULL), + (9,'Contributions - Invoice','{if $title}\n {if $component}\n {if $component == \'event\'}\n {ts 1=$title}Event Registration Invoice: %1{/ts}\n {else}\n {ts 1=$title}Contribution Invoice: %1{/ts}\n {/if}\n {/if}\n{else}\n {ts}Invoice{/ts}\n{/if}\n - {contact.display_name}\n','{ts}Contribution Invoice{/ts}\n','\n\n \n \n \n \n \n
\n {if $config->empoweredBy}\n \n \n \n \n
\n {/if}\n \n \n \n \n \n \n \n {if $organization_name}\n \n {else}\n \n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}INVOICE{/ts}{ts}Invoice Date:{/ts}{$domain_organization}
{contact.display_name} ({$organization_name}){contact.display_name}{$invoice_date}\n \n {if $domain_street_address }{$domain_street_address}{/if}\n {if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if}\n \n
{$street_address} {$supplemental_address_1}{ts}Invoice Number:{/ts}\n \n {if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if}\n {if $domain_state }{$domain_state}{/if}\n \n
{$supplemental_address_2} {$stateProvinceAbbreviation}{$invoice_number}\n \n {if $domain_city}{$domain_city}{/if}\n {if $domain_postal_code }{$domain_postal_code}{/if}\n \n
{$city} {$postal_code}{ts}Reference:{/ts}{if $domain_country}{$domain_country}{/if}
{$country}{if !empty($source)}{$source}{/if}{if $domain_email}{$domain_email}{/if}
{if $domain_phone}{$domain_phone}{/if}
\n\n \n \n \n \n \n \n \n \n {foreach from=$lineItem item=value key=priceset name=taxpricevalue}\n {if $smarty.foreach.taxpricevalue.index eq 0}\n {else}\n {/if}\n \n \n \n \n {if $value.tax_amount != \'\'}\n \n {else}\n \n {/if}\n \n \n {/foreach}\n \n \n \n \n \n {if !empty($dataArray)}\n {foreach from=$dataArray item=value key=priceset}\n \n \n {if $priceset}\n \n \n {elseif $priceset == 0}\n \n \n {/if}\n \n {/foreach}\n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n


\n \n \n \n {if $contribution_status_id == $pendingStatusId && $is_pay_later == 1}\n \n \n \n \n {/if}\n
{ts}Description{/ts}{ts}Quantity{/ts}{ts}Unit Price{/ts}{if isset($taxTerm)}{$taxTerm}{/if}{ts 1=$currency}Amount %1{/ts}
\n {if $value.html_type eq \'Text\'}\n {$value.label}\n {else}\n {$value.field_title} - {$value.label}\n {/if}\n {if $value.description}\n
{$value.description|truncate:30:\"...\"}
\n {/if}\n
\n
{$value.qty}{$value.unit_price|crmMoney:$currency}{if isset($value.tax_rate)}{$value.tax_rate}%{/if}{if isset($taxTerm)}{ts 1=$taxTerm}-{/ts}{/if}{$value.subTotal|crmMoney:$currency}
{ts}Sub Total{/ts}{$subTotal|crmMoney:$currency}
{if isset($taxTerm)}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}{$value|crmMoney:$currency} {if isset($taxTerm)}{ts 1=$taxTerm}TOTAL %1{/ts}{/if}{$value|crmMoney:$currency}
{ts 1=$currency}TOTAL %1{/ts}{$amount|crmMoney:$currency}
\n {if $contribution_status_id == $refundedStatusId}\n {ts}Amount Credited{/ts}\n {else}\n {ts}Amount Paid{/ts}\n {/if}\n \n {$amountPaid|crmMoney:$currency}

{ts}AMOUNT DUE:{/ts}{$amountDue|crmMoney:$currency}
{ts 1=$dueDate}DUE DATE: %1{/ts}
\n
\n\n {if $contribution_status_id == $pendingStatusId && $is_pay_later == 1}\n \n \n \n \n
\n\n \n \n \n \n \n
{ts}PAYMENT ADVICE{/ts}

{ts}To:{/ts}
\n {$domain_organization}
\n {$domain_street_address} {$domain_supplemental_address_1}
\n {$domain_supplemental_address_2} {$domain_state}
\n {$domain_city} {$domain_postal_code}
\n {$domain_country}
\n {$domain_email}
\n {$domain_phone}
\n


{$notes}\n
\n \n \n \n \n \n \n \n \n \n \n {if $is_pay_later == 1}\n \n \n \n \n {else}\n \n \n \n \n {/if}\n \n \n \n \n \n \n \n
{ts}Customer:{/ts}{contact.display_name}
{ts}Invoice Number:{/ts}{$invoice_number}

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

\n {/if}\n\n {if $contribution_status_id == $refundedStatusId || $contribution_status_id == $cancelledStatusId}\n {if $config->empoweredBy}\n \n \n \n \n
\n {/if}\n\n
\n \n \n \n \n \n \n \n {if $organization_name}\n \n {else}\n \n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}CREDIT NOTE{/ts}{ts}Date:{/ts}{$domain_organization}
{contact.display_name} ({$organization_name}){contact.display_name}{$invoice_date}\n \n {if $domain_street_address }{$domain_street_address}{/if}\n {if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if}\n \n
{$street_address} {$supplemental_address_1}{ts}Credit Note Number:{/ts}\n \n {if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if}\n {if $domain_state }{$domain_state}{/if}\n \n
{$supplemental_address_2} {$stateProvinceAbbreviation}{$creditnote_id}\n \n {if $domain_city}{$domain_city}{/if}\n {if $domain_postal_code }{$domain_postal_code}{/if}\n \n
{$city} {$postal_code}{ts}Reference:{/ts}\n \n {if $domain_country}{$domain_country}{/if}\n \n
{$source}\n \n {if $domain_email}{$domain_email}{/if}\n \n
\n \n {if $domain_phone}{$domain_phone}{/if}\n \n
\n\n \n \n \n \n
\n {* FIXME: style this table so that it looks like the text version (justification, etc.) *}\n \n \n \n \n \n \n \n {foreach from=$lineItem item=value key=priceset name=pricevalue}\n {if $smarty.foreach.pricevalue.index eq 0}\n \n {else}\n \n {/if}\n \n \n \n \n {if $value.tax_amount != \'\'}\n \n {else}\n \n {/if}\n \n \n {/foreach}\n \n \n \n \n \n \n {if !empty($dataArray)}\n {foreach from=$dataArray item=value key=priceset}\n \n \n {if $priceset}\n \n \n {elseif $priceset == 0}\n \n \n {/if}\n \n {/foreach}\n {/if}\n \n \n \n \n \n \n \n \n \n {if $is_pay_later == 0}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {/if}\n


\n \n \n \n \n \n \n \n
{ts}Description{/ts}{ts}Quantity{/ts}{ts}Unit Price{/ts}{if isset($taxTerm)}{$taxTerm}{/if}{ts 1=$currency}Amount %1{/ts}


\n \n {if $value.html_type eq \'Text\'}\n {$value.label}\n {else}\n {$value.field_title} - {$value.label}\n {/if}\n {if $value.description}\n
{$value.description|truncate:30:\"...\"}
\n {/if}\n
\n
{$value.qty}{$value.unit_price|crmMoney:$currency}{if isset($value.tax_rate)}{$value.tax_rate}%{/if}{if isset($taxTerm)}{ts 1=$taxTerm}No %1{/ts}{/if}{$value.subTotal|crmMoney:$currency}

{ts}Sub Total{/ts}{$subTotal|crmMoney:$currency}
{if isset($taxTerm)}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}{$value|crmMoney:$currency} {if isset($taxTerm)}{ts 1=$taxTerm}TOTAL NO %1{/ts}{/if}{$value|crmMoney:$currency}

{ts 1=$currency}TOTAL %1{/ts}{$amount|crmMoney:$currency}
{ts}LESS Credit to invoice(s){/ts}{$amount|crmMoney:$currency}

{ts}REMAINING CREDIT{/ts}{$amountDue|crmMoney:$currency}
\n
\n\n \n \n \n \n
\n\n \n \n \n \n \n
{ts}CREDIT ADVICE{/ts}

{ts}Please do not pay on this advice. Deduct the amount of this Credit Note from your next payment to us{/ts}

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}Customer:{/ts}{contact.display_name}
{ts}Credit Note#:{/ts}{$creditnote_id}

{ts}Credit Amount:{/ts}{$amount|crmMoney:$currency}
\n
\n {/if}\n
\n\n \n \n\n',1,827,'contribution_invoice_receipt',1,0,0,NULL), + (10,'Contributions - Invoice','{if $title}\n {if $component}\n {if $component == \'event\'}\n {ts 1=$title}Event Registration Invoice: %1{/ts}\n {else}\n {ts 1=$title}Contribution Invoice: %1{/ts}\n {/if}\n {/if}\n{else}\n {ts}Invoice{/ts}\n{/if}\n - {contact.display_name}\n','{ts}Contribution Invoice{/ts}\n','\n\n \n \n \n \n \n
\n {if $config->empoweredBy}\n \n \n \n \n
\n {/if}\n \n \n \n \n \n \n \n {if $organization_name}\n \n {else}\n \n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}INVOICE{/ts}{ts}Invoice Date:{/ts}{$domain_organization}
{contact.display_name} ({$organization_name}){contact.display_name}{$invoice_date}\n \n {if $domain_street_address }{$domain_street_address}{/if}\n {if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if}\n \n
{$street_address} {$supplemental_address_1}{ts}Invoice Number:{/ts}\n \n {if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if}\n {if $domain_state }{$domain_state}{/if}\n \n
{$supplemental_address_2} {$stateProvinceAbbreviation}{$invoice_number}\n \n {if $domain_city}{$domain_city}{/if}\n {if $domain_postal_code }{$domain_postal_code}{/if}\n \n
{$city} {$postal_code}{ts}Reference:{/ts}{if $domain_country}{$domain_country}{/if}
{$country}{if !empty($source)}{$source}{/if}{if $domain_email}{$domain_email}{/if}
{if $domain_phone}{$domain_phone}{/if}
\n\n \n \n \n \n \n \n \n \n {foreach from=$lineItem item=value key=priceset name=taxpricevalue}\n {if $smarty.foreach.taxpricevalue.index eq 0}\n {else}\n {/if}\n \n \n \n \n {if $value.tax_amount != \'\'}\n \n {else}\n \n {/if}\n \n \n {/foreach}\n \n \n \n \n \n {if !empty($dataArray)}\n {foreach from=$dataArray item=value key=priceset}\n \n \n {if $priceset}\n \n \n {elseif $priceset == 0}\n \n \n {/if}\n \n {/foreach}\n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n


\n \n \n \n {if $contribution_status_id == $pendingStatusId && $is_pay_later == 1}\n \n \n \n \n {/if}\n
{ts}Description{/ts}{ts}Quantity{/ts}{ts}Unit Price{/ts}{if isset($taxTerm)}{$taxTerm}{/if}{ts 1=$currency}Amount %1{/ts}
\n {if $value.html_type eq \'Text\'}\n {$value.label}\n {else}\n {$value.field_title} - {$value.label}\n {/if}\n {if $value.description}\n
{$value.description|truncate:30:\"...\"}
\n {/if}\n
\n
{$value.qty}{$value.unit_price|crmMoney:$currency}{if isset($value.tax_rate)}{$value.tax_rate}%{/if}{if isset($taxTerm)}{ts 1=$taxTerm}-{/ts}{/if}{$value.subTotal|crmMoney:$currency}
{ts}Sub Total{/ts}{$subTotal|crmMoney:$currency}
{if isset($taxTerm)}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}{$value|crmMoney:$currency} {if isset($taxTerm)}{ts 1=$taxTerm}TOTAL %1{/ts}{/if}{$value|crmMoney:$currency}
{ts 1=$currency}TOTAL %1{/ts}{$amount|crmMoney:$currency}
\n {if $contribution_status_id == $refundedStatusId}\n {ts}Amount Credited{/ts}\n {else}\n {ts}Amount Paid{/ts}\n {/if}\n \n {$amountPaid|crmMoney:$currency}

{ts}AMOUNT DUE:{/ts}{$amountDue|crmMoney:$currency}
{ts 1=$dueDate}DUE DATE: %1{/ts}
\n
\n\n {if $contribution_status_id == $pendingStatusId && $is_pay_later == 1}\n \n \n \n \n
\n\n \n \n \n {if $organization_name} - + {else} - + {/if}
{ts}PAYMENT ADVICE{/ts}

{ts}To:{/ts}
\n {$domain_organization}
\n {$domain_street_address} {$domain_supplemental_address_1}
\n {$domain_supplemental_address_2} {$domain_state}
\n {$domain_city} {$domain_postal_code}
\n {$domain_country}
\n {$domain_email}
\n {$domain_phone}
\n


{$notes}\n
\n \n \n \n \n \n \n \n \n \n \n {if $is_pay_later == 1}\n \n \n \n \n {else}\n \n \n \n \n {/if}\n \n \n \n \n \n \n \n
{ts}Customer:{/ts}{contact.display_name}
{ts}Invoice Number:{/ts}{$invoice_number}

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

\n {/if}\n\n {if $contribution_status_id == $refundedStatusId || $contribution_status_id == $cancelledStatusId}\n {if $config->empoweredBy}\n \n \n \n \n
\n {/if}\n\n
\n \n \n \n \n \n \n \n {if $organization_name}\n \n {else}\n \n {/if}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}CREDIT NOTE{/ts}{ts}Date:{/ts}{$domain_organization}
{contact.display_name} ({$organization_name}){contact.display_name}{$invoice_date}\n \n {if $domain_street_address }{$domain_street_address}{/if}\n {if $domain_supplemental_address_1 }{$domain_supplemental_address_1}{/if}\n \n
{$street_address} {$supplemental_address_1}{ts}Credit Note Number:{/ts}\n \n {if $domain_supplemental_address_2 }{$domain_supplemental_address_2}{/if}\n {if $domain_state }{$domain_state}{/if}\n \n
{$supplemental_address_2} {$stateProvinceAbbreviation}{$creditnote_id}\n \n {if $domain_city}{$domain_city}{/if}\n {if $domain_postal_code }{$domain_postal_code}{/if}\n \n
{$city} {$postal_code}{ts}Reference:{/ts}\n \n {if $domain_country}{$domain_country}{/if}\n \n
{$source}\n \n {if $domain_email}{$domain_email}{/if}\n \n
\n \n {if $domain_phone}{$domain_phone}{/if}\n \n
\n\n \n \n \n \n
\n {* FIXME: style this table so that it looks like the text version (justification, etc.) *}\n \n \n \n \n \n \n \n {foreach from=$lineItem item=value key=priceset name=pricevalue}\n {if $smarty.foreach.pricevalue.index eq 0}\n \n {else}\n \n {/if}\n \n \n \n \n {if $value.tax_amount != \'\'}\n \n {else}\n \n {/if}\n \n \n {/foreach}\n \n \n \n \n \n \n {if !empty($dataArray)}\n {foreach from=$dataArray item=value key=priceset}\n \n \n {if $priceset}\n \n \n {elseif $priceset == 0}\n \n \n {/if}\n \n {/foreach}\n {/if}\n \n \n \n \n \n \n \n \n \n {if $is_pay_later == 0}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {/if}\n


\n \n \n \n \n \n \n \n
{ts}Description{/ts}{ts}Quantity{/ts}{ts}Unit Price{/ts}{if isset($taxTerm)}{$taxTerm}{/if}{ts 1=$currency}Amount %1{/ts}


\n \n {if $value.html_type eq \'Text\'}\n {$value.label}\n {else}\n {$value.field_title} - {$value.label}\n {/if}\n {if $value.description}\n
{$value.description|truncate:30:\"...\"}
\n {/if}\n
\n
{$value.qty}{$value.unit_price|crmMoney:$currency}{if isset($value.tax_rate)}{$value.tax_rate}%{/if}{if isset($taxTerm)}{ts 1=$taxTerm}No %1{/ts}{/if}{$value.subTotal|crmMoney:$currency}

{ts}Sub Total{/ts}{$subTotal|crmMoney:$currency}
{if isset($taxTerm)}{ts 1=$taxTerm 2=$priceset}TOTAL %1 %2%{/ts}{/if}{$value|crmMoney:$currency} {if isset($taxTerm)}{ts 1=$taxTerm}TOTAL NO %1{/ts}{/if}{$value|crmMoney:$currency}

{ts 1=$currency}TOTAL %1{/ts}{$amount|crmMoney:$currency}
{ts}LESS Credit to invoice(s){/ts}{$amount|crmMoney:$currency}

{ts}REMAINING CREDIT{/ts}{$amountDue|crmMoney:$currency}
\n
\n\n \n \n \n \n
\n\n \n \n \n \n \n
{ts}CREDIT ADVICE{/ts}

{ts}Please do not pay on this advice. Deduct the amount of this Credit Note from your next payment to us{/ts}

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{ts}Customer:{/ts}{contact.display_name}
{ts}Credit Note#:{/ts}{$creditnote_id}

{ts}Credit Amount:{/ts}{$amount|crmMoney:$currency}
\n
\n {/if}\n
\n\n \n \n\n',1,827,'contribution_invoice_receipt',0,1,0,NULL), (11,'Contributions - Recurring Start and End Notification','{ts}Recurring Contribution Notification{/ts} - {contact.display_name}\n','{assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}{$greeting},{/if}\n\n{if $recur_txnType eq \'START\'}\n{if $auto_renew_membership}\n{ts}Thanks for your auto renew membership sign-up.{/ts}\n\n\n{ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This membership will be automatically renewed every %1 %2(s).{/ts}\n\n{if $cancelSubscriptionUrl}\n{ts 1=$cancelSubscriptionUrl}You can cancel the auto-renewal option by visiting this web page.{/ts}\n\n{/if}\n\n{if $updateSubscriptionBillingUrl}\n{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts}\n\n{/if}\n{else}\n{ts}Thanks for your recurring contribution sign-up.{/ts}\n\n\n{ts 1=$recur_frequency_interval 2=$recur_frequency_unit 3=$recur_installments}This recurring contribution will be automatically processed every %1 %2(s){/ts}{if $recur_installments } {ts 1=$recur_installments} for a total of %1 installment(s){/ts}{/if}.\n\n{ts}Start Date{/ts}: {$recur_start_date|crmDate}\n\n{if $cancelSubscriptionUrl}\n{ts 1=$cancelSubscriptionUrl}You can cancel the recurring contribution option by visiting this web page.{/ts}\n\n{/if}\n\n{if $updateSubscriptionBillingUrl}\n{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by visiting this web page.{/ts}\n\n{/if}\n\n{if $updateSubscriptionUrl}\n{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}\n\n{/if}\n{/if}\n\n{elseif $recur_txnType eq \'END\'}\n{if $auto_renew_membership}\n{ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}\n\n\n{else}\n{ts}Your recurring contribution term has ended.{/ts}\n\n\n{ts 1=$recur_installments}You have successfully completed %1 recurring contributions. Thank you.{/ts}\n\n\n==================================================\n{ts 1=$recur_installments}Interval of Subscription for %1 installment(s){/ts}\n\n==================================================\n{ts}Start Date{/ts}: {$recur_start_date|crmDate}\n\n{ts}End Date{/ts}: {$recur_end_date|crmDate}\n\n{/if}\n{/if}\n','\n\n\n \n \n\n\n\n{capture assign=headerStyle}colspan=\"2\" style=\"text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;\"{/capture}\n{capture assign=labelStyle }style=\"padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;\"{/capture}\n{capture assign=valueStyle }style=\"padding: 4px; border-bottom: 1px solid #999;\"{/capture}\n\n
\n \n\n \n \n \n\n \n\n \n \n \n\n \n \n \n\n {if $recur_txnType eq \'START\'}\n {if $auto_renew_membership}\n \n \n \n {if $cancelSubscriptionUrl}\n \n \n \n {/if}\n {if $updateSubscriptionBillingUrl}\n \n \n \n {/if}\n {else}\n \n \n \n {if $cancelSubscriptionUrl}\n \n \n \n {/if}\n {if $updateSubscriptionBillingUrl}\n \n \n \n {/if}\n {if $updateSubscriptionUrl}\n \n \n \n {/if}\n {/if}\n\n {elseif $recur_txnType eq \'END\'}\n\n {if $auto_renew_membership}\n \n \n \n {else}\n \n \n \n \n \n \n\n {/if}\n {/if}\n\n
\n {assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}

{$greeting},

{/if}\n
 
\n

{ts}Thanks for your auto renew membership sign-up.{/ts}

\n

{ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This membership will be automatically renewed every %1 %2(s). {/ts}

\n
\n {ts 1=$cancelSubscriptionUrl}You can cancel the auto-renewal option by visiting this web page.{/ts}\n
\n {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts}\n
\n

{ts}Thanks for your recurring contribution sign-up.{/ts}

\n

{ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This recurring contribution will be automatically processed every %1 %2(s){/ts}{if $recur_installments }{ts 1=$recur_installments} for a total of %1 installment(s){/ts}{/if}.

\n

{ts}Start Date{/ts}: {$recur_start_date|crmDate}

\n
\n {ts 1=$cancelSubscriptionUrl} You can cancel the recurring contribution option by visiting this web page.{/ts}\n
\n {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by visiting this web page.{/ts}\n
\n {ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments details for this recurring contribution by visiting this web page.{/ts}\n
\n

{ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}

\n
\n

{ts}Your recurring contribution term has ended.{/ts}

\n

{ts 1=$recur_installments}You have successfully completed %1 recurring contributions. Thank you.{/ts}

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n {ts 1=$recur_installments}Interval of Subscription for %1 installment(s){/ts}\n
\n {ts}Start Date{/ts}\n \n {$recur_start_date|crmDate}\n
\n {ts}End Date{/ts}\n \n {$recur_end_date|crmDate}\n
\n
\n
\n\n\n\n',1,828,'contribution_recurring_notify',1,0,0,NULL), (12,'Contributions - Recurring Start and End Notification','{ts}Recurring Contribution Notification{/ts} - {contact.display_name}\n','{assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}{$greeting},{/if}\n\n{if $recur_txnType eq \'START\'}\n{if $auto_renew_membership}\n{ts}Thanks for your auto renew membership sign-up.{/ts}\n\n\n{ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This membership will be automatically renewed every %1 %2(s).{/ts}\n\n{if $cancelSubscriptionUrl}\n{ts 1=$cancelSubscriptionUrl}You can cancel the auto-renewal option by visiting this web page.{/ts}\n\n{/if}\n\n{if $updateSubscriptionBillingUrl}\n{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts}\n\n{/if}\n{else}\n{ts}Thanks for your recurring contribution sign-up.{/ts}\n\n\n{ts 1=$recur_frequency_interval 2=$recur_frequency_unit 3=$recur_installments}This recurring contribution will be automatically processed every %1 %2(s){/ts}{if $recur_installments } {ts 1=$recur_installments} for a total of %1 installment(s){/ts}{/if}.\n\n{ts}Start Date{/ts}: {$recur_start_date|crmDate}\n\n{if $cancelSubscriptionUrl}\n{ts 1=$cancelSubscriptionUrl}You can cancel the recurring contribution option by visiting this web page.{/ts}\n\n{/if}\n\n{if $updateSubscriptionBillingUrl}\n{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by visiting this web page.{/ts}\n\n{/if}\n\n{if $updateSubscriptionUrl}\n{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}\n\n{/if}\n{/if}\n\n{elseif $recur_txnType eq \'END\'}\n{if $auto_renew_membership}\n{ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}\n\n\n{else}\n{ts}Your recurring contribution term has ended.{/ts}\n\n\n{ts 1=$recur_installments}You have successfully completed %1 recurring contributions. Thank you.{/ts}\n\n\n==================================================\n{ts 1=$recur_installments}Interval of Subscription for %1 installment(s){/ts}\n\n==================================================\n{ts}Start Date{/ts}: {$recur_start_date|crmDate}\n\n{ts}End Date{/ts}: {$recur_end_date|crmDate}\n\n{/if}\n{/if}\n','\n\n\n \n \n\n\n\n{capture assign=headerStyle}colspan=\"2\" style=\"text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;\"{/capture}\n{capture assign=labelStyle }style=\"padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;\"{/capture}\n{capture assign=valueStyle }style=\"padding: 4px; border-bottom: 1px solid #999;\"{/capture}\n\n
\n \n\n \n \n \n\n \n\n \n \n \n\n \n \n \n\n {if $recur_txnType eq \'START\'}\n {if $auto_renew_membership}\n \n \n \n {if $cancelSubscriptionUrl}\n \n \n \n {/if}\n {if $updateSubscriptionBillingUrl}\n \n \n \n {/if}\n {else}\n \n \n \n {if $cancelSubscriptionUrl}\n \n \n \n {/if}\n {if $updateSubscriptionBillingUrl}\n \n \n \n {/if}\n {if $updateSubscriptionUrl}\n \n \n \n {/if}\n {/if}\n\n {elseif $recur_txnType eq \'END\'}\n\n {if $auto_renew_membership}\n \n \n \n {else}\n \n \n \n \n \n \n\n {/if}\n {/if}\n\n
\n {assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}

{$greeting},

{/if}\n
 
\n

{ts}Thanks for your auto renew membership sign-up.{/ts}

\n

{ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This membership will be automatically renewed every %1 %2(s). {/ts}

\n
\n {ts 1=$cancelSubscriptionUrl}You can cancel the auto-renewal option by visiting this web page.{/ts}\n
\n {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts}\n
\n

{ts}Thanks for your recurring contribution sign-up.{/ts}

\n

{ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This recurring contribution will be automatically processed every %1 %2(s){/ts}{if $recur_installments }{ts 1=$recur_installments} for a total of %1 installment(s){/ts}{/if}.

\n

{ts}Start Date{/ts}: {$recur_start_date|crmDate}

\n
\n {ts 1=$cancelSubscriptionUrl} You can cancel the recurring contribution option by visiting this web page.{/ts}\n
\n {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by visiting this web page.{/ts}\n
\n {ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments details for this recurring contribution by visiting this web page.{/ts}\n
\n

{ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}

\n
\n

{ts}Your recurring contribution term has ended.{/ts}

\n

{ts 1=$recur_installments}You have successfully completed %1 recurring contributions. Thank you.{/ts}

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n {ts 1=$recur_installments}Interval of Subscription for %1 installment(s){/ts}\n
\n {ts}Start Date{/ts}\n \n {$recur_start_date|crmDate}\n
\n {ts}End Date{/ts}\n \n {$recur_end_date|crmDate}\n
\n
\n
\n\n\n\n',1,828,'contribution_recurring_notify',0,1,0,NULL), (13,'Contributions - Recurring Cancellation Notification','{ts}Recurring Contribution Cancellation Notification{/ts} - {contact.display_name}\n','{assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}{$greeting},{/if}\n\n{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Your recurring contribution of %1, every %2 %3 has been cancelled as requested.{/ts}\n','\n\n\n \n \n\n\n\n{capture assign=headerStyle}colspan=\"2\" style=\"text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;\"{/capture}\n{capture assign=labelStyle }style=\"padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;\"{/capture}\n{capture assign=valueStyle }style=\"padding: 4px; border-bottom: 1px solid #999;\"{/capture}\n\n
\n \n\n \n \n \n\n \n\n \n \n \n \n
\n {assign var=\"greeting\" value=\"{contact.email_greeting}\"}{if $greeting}

{$greeting},

{/if}\n

{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Your recurring contribution of %1, every %2 %3 has been cancelled as requested.{/ts}

\n
\n
\n\n\n\n',1,829,'contribution_recurring_cancelled',1,0,0,NULL), diff --git a/tests/phpunit/CRM/Contribute/Form/Task/InvoiceTest.php b/tests/phpunit/CRM/Contribute/Form/Task/InvoiceTest.php index 9550a872d030..a66569312dc3 100644 --- a/tests/phpunit/CRM/Contribute/Form/Task/InvoiceTest.php +++ b/tests/phpunit/CRM/Contribute/Form/Task/InvoiceTest.php @@ -25,6 +25,7 @@ class CRM_Contribute_Form_Task_InvoiceTest extends CiviUnitTestCase { */ public function tearDown(): void { $this->quickCleanUpFinancialEntities(); + $this->revertTemplateToReservedTemplate('contribution_invoice_receipt'); CRM_Utils_Hook::singleton()->reset(); } @@ -173,22 +174,14 @@ public function testThatInvoiceShowTheActuallContributionCurrencyInsteadOfTheDef $this->_individualId = $this->individualCreate(); - $contributionParams = [ - 'contact_id' => $this->_individualId, - 'total_amount' => 100, - 'currency' => 'GBP', - 'financial_type_id' => 'Donation', - 'contribution_status_id' => 1, - ]; - - $contribution = $this->callAPISuccess('Contribution', 'create', $contributionParams); + $contributionID = $this->setupContribution(); $params = [ 'output' => 'pdf_invoice', 'forPage' => 1, ]; - $invoiceHTML = CRM_Contribute_Form_Task_Invoice::printPDF([$contribution['id']], $params, [$this->_individualId]); + $invoiceHTML = CRM_Contribute_Form_Task_Invoice::printPDF([$contributionID], $params, [$this->_individualId]); $this->assertStringNotContainsString('$', $invoiceHTML); $this->assertStringNotContainsString('Amount USD', $invoiceHTML); @@ -200,4 +193,51 @@ public function testThatInvoiceShowTheActuallContributionCurrencyInsteadOfTheDef } + /** + * Test invoice contact fields. + */ + public function testInvoiceContactFields(): void { + $this->swapMessageTemplateForTestTemplate('contribution_invoice_receipt'); + $contactID = $this->individualCreate([ + 'postal_code' => 2345, + 'street_address' => 'on my street', + 'supplemental_address_1' => 'and more detail', + 'supplemental_address_2' => 'and more', + 'stateProvinceAbbreviation' => 'ME', + 'city' => 'Baltimore', + 'country' => 'US', + 'external_identifier' => 2345, + ]); + $params = [ + 'output' => 'pdf_invoice', + 'forPage' => 1, + ]; + $invoiceHTML = CRM_Contribute_Form_Task_Invoice::printPDF([$this->setupContribution(['contact_id' => $contactID])], $params, [$contactID]); + $expected = [ + 'externalIdentifier (token):::2345', + 'displayName (token):::Mr. Anthony Anderson II', + ]; + foreach ($expected as $string) { + $this->assertStringContainsString($string, $invoiceHTML); + } + } + + /** + * Set up a contribution. + * + * @param array $params + * + * @return int + */ + protected function setupContribution(array $params = []): int { + $contributionParams = array_merge([ + 'contact_id' => $this->_individualId, + 'total_amount' => 100, + 'currency' => 'GBP', + 'financial_type_id' => 'Donation', + 'contribution_status_id' => 1, + ], $params); + return (int) $this->callAPISuccess('Contribution', 'create', $contributionParams)['id']; + } + } diff --git a/tests/templates/message_templates/contribution_invoice_receipt_html.tpl b/tests/templates/message_templates/contribution_invoice_receipt_html.tpl new file mode 100644 index 000000000000..7ab5b21f50ac --- /dev/null +++ b/tests/templates/message_templates/contribution_invoice_receipt_html.tpl @@ -0,0 +1,3 @@ +displayName (token):::{contact.display_name} +organizationName (token):::{contact.organization_name} +externalIdentifier (token):::{contact.external_identifier} diff --git a/xml/templates/message_templates/contribution_invoice_receipt_html.tpl b/xml/templates/message_templates/contribution_invoice_receipt_html.tpl index 0ee969175014..5666c8927e42 100644 --- a/xml/templates/message_templates/contribution_invoice_receipt_html.tpl +++ b/xml/templates/message_templates/contribution_invoice_receipt_html.tpl @@ -21,9 +21,9 @@
{$display_name} ({$organization_name}){contact.display_name} ({$organization_name}){$display_name}{contact.display_name}{$invoice_date} @@ -188,7 +188,7 @@ - + @@ -234,9 +234,9 @@ {if $organization_name} - + {else} - + {/if} - +
{ts}Customer:{/ts}{$display_name}{contact.display_name}
{ts}Invoice Number:{/ts}
{$display_name} ({$organization_name}){contact.display_name} ({$organization_name}){$display_name}{contact.display_name}{$invoice_date} @@ -408,7 +408,7 @@
{ts}Customer:{/ts}{$display_name}{contact.display_name}