Smarty modifier - stop using isset to check taxTerm
[civicrm-core.git] / xml / templates / message_templates / contribution_online_receipt_text.tpl
1 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
2 {if !empty($receipt_text)}
3 {$receipt_text}
4 {/if}
5 {if $is_pay_later}
6
7 ===========================================================
8 {$pay_later_receipt}
9 ===========================================================
10 {/if}
11
12 {if $amount}
13 ===========================================================
14 {ts}Contribution Information{/ts}
15
16 ===========================================================
17 {if $lineItem and $priceSetID and empty($is_quick_config)}
18 {foreach from=$lineItem item=value key=priceset}
19 ---------------------------------------------------------
20 {capture assign=ts_item}{ts}Item{/ts}{/capture}
21 {capture assign=ts_qty}{ts}Qty{/ts}{/capture}
22 {capture assign=ts_each}{ts}Each{/ts}{/capture}
23 {if !empty($dataArray)}
24 {capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
25 {capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
26 {capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
27 {/if}
28 {capture assign=ts_total}{ts}Total{/ts}{/capture}
29 {$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"}
30 ----------------------------------------------------------
31 {foreach from=$value item=line}
32 {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"}
33 {/foreach}
34 {/foreach}
35
36 {if !empty($dataArray)}
37 {ts}Amount before Tax{/ts}: {$amount-$totalTaxAmount|crmMoney:$currency}
38
39 {foreach from=$dataArray item=value key=priceset}
40 {if $priceset || $priceset == 0}
41 {$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
42 {else}
43 {ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
44 {/if}
45 {/foreach}
46 {/if}
47
48 {if isset($totalTaxAmount)}
49 {ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
50 {/if}
51
52 {ts}Total Amount{/ts}: {$amount|crmMoney:$currency}
53 {else}
54 {ts}Amount{/ts}: {$amount|crmMoney:$currency} {if isset($amount_level) } - {$amount_level} {/if}
55 {/if}
56 {/if}
57 {if !empty($receive_date)}
58
59 {ts}Date{/ts}: {$receive_date|crmDate}
60 {/if}
61 {if !empty($is_monetary) and !empty($trxn_id)}
62 {ts}Transaction #{/ts}: {$trxn_id}
63 {/if}
64
65 {if !empty($is_recur)}
66 {ts}This is a recurring contribution.{/ts}
67
68 {if $cancelSubscriptionUrl}
69 {ts}You can cancel future contributions at:{/ts}
70
71 {$cancelSubscriptionUrl}
72
73 {/if}
74
75 {if $updateSubscriptionBillingUrl}
76 {ts}You can update billing details for this recurring contribution at:{/ts}
77
78 {$updateSubscriptionBillingUrl}
79
80 {/if}
81
82 {if $updateSubscriptionUrl}
83 {ts}You can update recurring contribution amount or change the number of installments for this recurring contribution at:{/ts}
84
85 {$updateSubscriptionUrl}
86
87 {/if}
88 {/if}
89
90 {if $honor_block_is_active}
91 ===========================================================
92 {$soft_credit_type}
93 ===========================================================
94 {foreach from=$honoreeProfile item=value key=label}
95 {$label}: {$value}
96 {/foreach}
97 {elseif !empty($softCreditTypes) and !empty($softCredits)}
98 {foreach from=$softCreditTypes item=softCreditType key=n}
99 ===========================================================
100 {$softCreditType}
101 ===========================================================
102 {foreach from=$softCredits.$n item=value key=label}
103 {$label}: {$value}
104 {/foreach}
105 {/foreach}
106 {/if}
107 {if !empty($pcpBlock)}
108 ===========================================================
109 {ts}Personal Campaign Page{/ts}
110
111 ===========================================================
112 {ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
113
114 {if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
115
116 {if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
117
118 {/if}
119 {if !empty($onBehalfProfile)}
120 ===========================================================
121 {ts}On Behalf Of{/ts}
122
123 ===========================================================
124 {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
125 {$onBehalfName}: {$onBehalfValue}
126 {/foreach}
127 {/if}
128
129 {if !empty($billingName)}
130 ===========================================================
131 {ts}Billing Name and Address{/ts}
132
133 ===========================================================
134 {$billingName}
135 {$address}
136
137 {$email}
138 {elseif !empty($email)}
139 ===========================================================
140 {ts}Registered Email{/ts}
141
142 ===========================================================
143 {$email}
144 {/if} {* End billingName or Email*}
145 {if !empty($credit_card_type)}
146
147 ===========================================================
148 {ts}Credit Card Information{/ts}
149
150 ===========================================================
151 {$credit_card_type}
152 {$credit_card_number}
153 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
154 {/if}
155
156 {if !empty($selectPremium )}
157 ===========================================================
158 {ts}Premium Information{/ts}
159
160 ===========================================================
161 {$product_name}
162 {if $option}
163 {ts}Option{/ts}: {$option}
164 {/if}
165 {if $sku}
166 {ts}SKU{/ts}: {$sku}
167 {/if}
168 {if $start_date}
169 {ts}Start Date{/ts}: {$start_date|crmDate}
170 {/if}
171 {if $end_date}
172 {ts}End Date{/ts}: {$end_date|crmDate}
173 {/if}
174 {if !empty($contact_email) OR !empty($contact_phone)}
175
176 {ts}For information about this premium, contact:{/ts}
177
178 {if !empty($contact_email)}
179 {$contact_email}
180 {/if}
181 {if !empty($contact_phone)}
182 {$contact_phone}
183 {/if}
184 {/if}
185 {if !empty($is_deductible) AND !empty($price)}
186
187 {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}
188 {/if}
189
190 {if !empty($customPre)}
191 ===========================================================
192 {$customPre_grouptitle}
193
194 ===========================================================
195 {foreach from=$customPre item=customValue key=customName}
196 {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
197 {$customName}: {$customValue}
198 {/if}
199 {/foreach}
200 {/if}
201
202
203 {if !empty($customPost)}
204 ===========================================================
205 {$customPost_grouptitle}
206
207 ===========================================================
208 {foreach from=$customPost item=customValue key=customName}
209 {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
210 {$customName}: {$customValue}
211 {/if}
212 {/foreach}
213 {/if}