VAT-415 The default receipts that the system sends out should be updated to show...
[civicrm-core.git] / xml / templates / message_templates / contribution_offline_receipt_html.tpl
index 985ddc5585c5b2782ff146fc89d4874ba4b5cf5e..28072b44043c1863d65eea86a5fd62ac6f37597b 100644 (file)
            <th>{ts}Item{/ts}</th>
            <th>{ts}Qty{/ts}</th>
            <th>{ts}Each{/ts}</th>
+           {if $totalTaxAmount}
+             <th>{ts}Subtotal{/ts}</th>
+             <th>{ts}Tax Rate{/ts}</th>
+             <th>{ts}Tax Amount{/ts}</th>
+           {/if}
            <th>{ts}Total{/ts}</th>
           </tr>
           {foreach from=$value item=line}
             <td>
              {$line.unit_price|crmMoney:$currency}
             </td>
+            {if $totalTaxAmount}
+              <td>
+                {$line.unit_price*$line.qty|crmMoney:$currency}
+              </td>
+              <td>
+                {$line.tax_rate|crmMoney:$currency}
+              </td>
+              <td>
+                {$line.tax_amount|crmMoney:$currency}
+              </td>
+            {/if}
             <td>
              {$line.line_total|crmMoney:$currency}
             </td>
        </tr>
       {/foreach}
      {/if}
+     {if $dataArray && $totalTaxAmount}
+       <tr>
+         <td {$labelStyle}>
+           {ts} Amount before Tax : {/ts}
+         </td>
+         <td {$valueStyle}>
+           {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
+         </td>
+       </tr>
+
+      {foreach from=$dataArray item=value key=priceset}
+        <tr>
+        {if $priceset}
+          <td>&nbsp;Vat {$priceset|string_format:"%.2f"}%</td>    
+          <td>&nbsp;{$value|crmMoney:$currency}</td>
+        {elseif  $priceset == 0}
+          <td>&nbsp;No Vat</td>
+          <td>&nbsp;{$value|crmMoney:$currency}</td>
+        {/if}
+        </tr>
+      {/foreach}
+     {/if}
+
+     {if $totalTaxAmount}
+      <tr>
+        <td {$labelStyle}>
+          {ts}Total Tax Amount{/ts}
+        </td>
+        <td {$valueStyle}>
+          {$totalTaxAmount|crmMoney:$currency}
+        </td>
+      </tr>
+     {/if}
 
      <tr>
       <td {$labelStyle}>