diff --git a/xml/templates/message_templates/contribution_invoice_receipt_html.tpl b/xml/templates/message_templates/contribution_invoice_receipt_html.tpl index f7a39b986ae2..3051de1ba1f7 100644 --- a/xml/templates/message_templates/contribution_invoice_receipt_html.tpl +++ b/xml/templates/message_templates/contribution_invoice_receipt_html.tpl @@ -91,20 +91,15 @@ {ts}Sub Total{/ts} {$subTotal|crmMoney:$currency} - {if !empty($dataArray)} - {foreach from=$dataArray item=value key=priceset} + {foreach from=$taxRateBreakdown item=taxDetail key=taxRate} + {if $taxRate != 0} - {if $priceset} - {if '{domain.tax_term}'}{ts 1='{domain.tax_term}' 2=$priceset}TOTAL %1 %2%{/ts}{/if} - {$value|crmMoney:$currency} - {elseif $priceset == 0} - {if '{domain.tax_term}'}{ts 1='{domain.tax_term}'}TOTAL %1{/ts}{/if} - {$value|crmMoney:$currency} - {/if} + {if '{domain.tax_term}'}{ts 1='{domain.tax_term}' 2=$taxRate|crmNumberFormat}TOTAL %1 %2%{/ts}{/if} + {$taxDetail.amount|crmMoney:'{contribution.currency}'} - {/foreach} - {/if} + {/if} + {/foreach} {ts 1=$currency}TOTAL %1{/ts} @@ -292,20 +287,15 @@ {ts}Sub Total{/ts} {$subTotal|crmMoney:$currency} - {if !empty($dataArray)} - {foreach from=$dataArray item=value key=priceset} - - - {if $priceset} - {if '{domain.tax_term}'}{ts 1='{domain.tax_term}' 2=$priceset}TOTAL %1 %2%{/ts}{/if} - {$value|crmMoney:$currency} - {elseif $priceset == 0} - {if '{domain.tax_term}'}{ts 1='{domain.tax_term}'}TOTAL NO %1{/ts}{/if} - {$value|crmMoney:$currency} - {/if} - + {foreach from=$taxRateBreakdown item=taxDetail key=taxRate} + {if $taxRate != 0} + + + {if '{domain.tax_term}'}{ts 1='{domain.tax_term}' 2=$taxRate|crmNumberFormat}TOTAL %1 %2%{/ts}{/if} + {$taxDetail.amount|crmMoney:'{contribution.currency}'} + + {/if} {/foreach} - {/if}