whitespace fixups
[civicrm-core.git] / xml / templates / message_templates / contribution_offline_receipt_html.tpl
index 985ddc5585c5b2782ff146fc89d4874ba4b5cf5e..829afa01e33bfe4506c7a4b6c494a5fb645a9c8c 100644 (file)
            <th>{ts}Item{/ts}</th>
            <th>{ts}Qty{/ts}</th>
            <th>{ts}Each{/ts}</th>
+           {if $getTaxDetails}
+             <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 $getTaxDetails}
+              <td>
+                {$line.unit_price*$line.qty|crmMoney:$currency}
+              </td>
+              {if $line.tax_rate != "" || $line.tax_amount != ""}
+                <td>
+                  {$line.tax_rate|string_format:"%.2f"}%
+                </td>
+                <td>
+                  {$line.tax_amount|crmMoney:$currency}
+                </td>
+              {else}
+                <td></td>
+                <td></td>
+              {/if}
+            {/if}
             <td>
-             {$line.line_total|crmMoney:$currency}
+             {$line.line_total+$line.tax_amount|crmMoney:$currency}
             </td>
            </tr>
           {/foreach}
        </tr>
       {/foreach}
      {/if}
+     {if $getTaxDetails && $dataArray}
+       <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 ||  $priceset == 0 || $value != ''}
+          <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
+          <td>&nbsp;{$value|crmMoney:$currency}</td>
+        {else}
+          <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
+          <td>&nbsp;{$value|crmMoney:$currency}</td>
+        {/if}
+        </tr>
+      {/foreach}
+     {/if}
+
+     {if isset($totalTaxAmount) && $totalTaxAmount !== 'null'}
+      <tr>
+        <td {$labelStyle}>
+          {ts}Total Tax Amount{/ts}
+        </td>
+        <td {$valueStyle}>
+          {$totalTaxAmount|crmMoney:$currency}
+        </td>
+      </tr>
+     {/if}
 
      <tr>
       <td {$labelStyle}>