VAT-572 Display Invoicing functionality based on admin globle setting under CiviContr...
[civicrm-core.git] / xml / templates / message_templates / event_online_receipt_text.tpl
index 726b3f3e7ace86329b67eb5b6b63c4b7c622cbbd..ddf290d309d7d7d14728afbc2ec7481f8fc628bd 100644 (file)
@@ -105,8 +105,10 @@ registration process.{/ts}
 {ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
 {/if}
 
+{if $event.is_public} 
 {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
 {ts}Download iCalendar File:{/ts} {$icalFeed}
+{/if}
 
 {if $payer.name}
 You were registered by: {$payer.name}
@@ -132,22 +134,44 @@ You were registered by: {$payer.name}
 {capture assign=ts_item}{ts}Item{/ts}{/capture}
 {capture assign=ts_qty}{ts}Qty{/ts}{/capture}
 {capture assign=ts_each}{ts}Each{/ts}{/capture}
+{if $totalTaxAmount}
+{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
+{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
+{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
+{/if}
 {capture assign=ts_total}{ts}Total{/ts}{/capture}
 {if $pricesetFieldsCount }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
-{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $totalTaxAmount} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
 -----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
 
 {foreach from=$value item=line}
 {if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
-{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {$line.line_total|crmMoney:$currency|string_format:"%10s"}{$ts_participant_count|string_format:"%10s"}
+{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 $totalTaxAmount} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {$line.tax_rate|crmMoney:$currency|string_format:"%10s"} {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {/if} {$line.line_total|crmMoney:$currency|string_format:"%10s"}{$ts_participant_count|string_format:"%10s"}
 {/foreach}
 {/if}
 {/foreach}
+
+{if $dataArray && $totalTaxAmount}
+{ts}Amount before Tax{/ts}: {$totalAmount-$totalTaxAmount|crmMoney:$currency}
+
+{foreach from=$dataArray item=value key=priceset}
+{if $priceset}
+{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{elseif  $priceset == 0}
+{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
+{/if}
+{/foreach}
+{/if}
 {/if}
+
 {if $amounts && !$lineItem}
 {foreach from=$amounts item=amnt key=level}{$amnt.amount|crmMoney:$currency} {$amnt.label}
 {/foreach}
 {/if}
+
+{if $totalTaxAmount}
+{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
+{/if}
 {if $isPrimary }
 
 {ts}Total Amount{/ts}: {$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if}