Smarty modifier - stop using isset to check taxTerm
[civicrm-core.git] / xml / templates / message_templates / contribution_offline_receipt_text.tpl
CommitLineData
56658066
AH
1{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
2
ff708ff0 3{if !empty($formValues.receipt_text)}
6a488035 4{$formValues.receipt_text}
12ff7379 5{else}{ts}Below you will find a receipt for this contribution.{/ts}{/if}
6a488035
TO
6
7===========================================================
8{ts}Contribution Information{/ts}
9
10===========================================================
448a7f8c 11{ts}Contributor{/ts}: {contact.display_name}
a221e1e0 12{if !empty($formValues.contributionType_name)}
6a488035 13{ts}Financial Type{/ts}: {$formValues.contributionType_name}
a221e1e0 14{/if}
6a488035
TO
15{if $lineItem}
16{foreach from=$lineItem item=value key=priceset}
17---------------------------------------------------------
18{capture assign=ts_item}{ts}Item{/ts}{/capture}
19{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
20{capture assign=ts_each}{ts}Each{/ts}{/capture}
ff708ff0 21{if !empty($getTaxDetails)}
79d001a2
PB
22{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
23{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
24{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
25{/if}
6a488035 26{capture assign=ts_total}{ts}Total{/ts}{/capture}
ff708ff0 27{$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"}
6a488035
TO
28----------------------------------------------------------
29{foreach from=$value item=line}
b0800b2c 30{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"}
6a488035
TO
31{/foreach}
32{/foreach}
33{/if}
34
ff708ff0 35{if !empty($getTaxDetails) && !empty($dataArray)}
7cf82823 36{ts}Amount before Tax{/ts} : {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
79d001a2
PB
37
38{foreach from=$dataArray item=value key=priceset}
7cf82823 39{if $priceset || $priceset == 0 || $value != ''}
42b37f89 40{$taxTerm} {$priceset|string_format:"%.2f"}% : {$value|crmMoney:$currency}
7cf82823 41{else}
42b37f89 42{ts}No{/ts} {$taxTerm} : {$value|crmMoney:$currency}
79d001a2
PB
43{/if}
44{/foreach}
45{/if}
46
01604562 47{if isset($totalTaxAmount) && $totalTaxAmount !== 'null'}
7cf82823 48{ts}Total Tax Amount{/ts} : {$totalTaxAmount|crmMoney:$currency}
79d001a2 49{/if}
7cf82823 50{ts}Total Amount{/ts} : {$formValues.total_amount|crmMoney:$currency}
ff708ff0 51{if !empty($receive_date)}
7bc6b5bb 52{ts}Date Received{/ts}: {$receive_date|truncate:10:''|crmDate}
6a488035 53{/if}
9fd20718 54{if !empty($receipt_date)}
6a488035
TO
55{ts}Receipt Date{/ts}: {$receipt_date|truncate:10:''|crmDate}
56{/if}
ff708ff0 57{if !empty($formValues.paidBy) and empty($formValues.hidden_CreditCard)}
6a488035 58{ts}Paid By{/ts}: {$formValues.paidBy}
ff708ff0 59{if !empty($formValues.check_number)}
6a488035
TO
60{ts}Check Number{/ts}: {$formValues.check_number}
61{/if}
62{/if}
ff708ff0 63{if !empty($formValues.trxn_id)}
6a488035
TO
64{ts}Transaction ID{/ts}: {$formValues.trxn_id}
65{/if}
66
ff708ff0 67{if !empty($ccContribution)}
6a488035
TO
68===========================================================
69{ts}Billing Name and Address{/ts}
70
71===========================================================
72{$billingName}
73{$address}
74
75===========================================================
76{ts}Credit Card Information{/ts}
77
78===========================================================
79{$credit_card_type}
80{$credit_card_number}
81{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
82{/if}
ff708ff0 83{if !empty($customGroup)}
6a488035
TO
84{foreach from=$customGroup item=value key=customName}
85===========================================================
86{$customName}
87===========================================================
88{foreach from=$value item=v key=n}
89{$n}: {$v}
90{/foreach}
91{/foreach}
92{/if}
6a488035 93
ff708ff0 94{if !empty($softCreditTypes) and !empty($softCredits)}
1421174e 95{foreach from=$softCreditTypes item=softCreditType key=n}
6a488035 96===========================================================
33a1c5c8 97{$softCreditType}
6a488035 98===========================================================
1421174e 99{foreach from=$softCredits.$n item=value key=label}
100{$label}: {$value}
101{/foreach}
102{/foreach}
6a488035
TO
103{/if}
104
ff708ff0 105{if !empty($formValues.product_name)}
6a488035
TO
106===========================================================
107{ts}Premium Information{/ts}
108
109===========================================================
110{$formValues.product_name}
111{if $formValues.product_option}
112{ts}Option{/ts}: {$formValues.product_option}
113{/if}
114{if $formValues.product_sku}
115{ts}SKU{/ts}: {$formValues.product_sku}
116{/if}
9fd20718 117{if !empty($fulfilled_date)}
6a488035
TO
118{ts}Sent{/ts}: {$fulfilled_date|crmDate}
119{/if}
120{/if}