<th>{ts}Item{/ts}</th>
<th>{ts}Qty{/ts}</th>
<th>{ts}Each{/ts}</th>
- {if $totalTaxAmount}
+ {if $getTaxDetails}
<th>{ts}Subtotal{/ts}</th>
<th>{ts}Tax Rate{/ts}</th>
<th>{ts}Tax Amount{/ts}</th>
<td>
{$line.unit_price|crmMoney:$currency}
</td>
- {if $totalTaxAmount}
+ {if $getTaxDetails}
<td>
{$line.unit_price*$line.qty|crmMoney:$currency}
</td>
- <td>
- {$line.tax_rate|crmMoney:$currency}
- </td>
- <td>
- {$line.tax_amount|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 $dataArray && $totalTaxAmount}
+ {if $getTaxDetails && $dataArray}
<tr>
<td {$labelStyle}>
{ts} Amount before Tax : {/ts}
{foreach from=$dataArray item=value key=priceset}
<tr>
- {if $priceset}
- <td> {ts}Vat{/ts}{$priceset|string_format:"%.2f"}%</td>
+ {if $priceset || $priceset == 0 || $value != ''}
+ <td> {$taxTerm} {$priceset|string_format:"%.2f"}%</td>
<td> {$value|crmMoney:$currency}</td>
- {elseif $priceset == 0}
- <td> {ts}No Vat{/ts}</td>
+ {else}
+ <td> {ts}No{/ts} {$taxTerm}</td>
<td> {$value|crmMoney:$currency}</td>
{/if}
</tr>
{/foreach}
{/if}
- {if $totalTaxAmount}
+ {if isset($totalTaxAmount) && $totalTaxAmount !== 'null'}
<tr>
<td {$labelStyle}>
{ts}Total Tax Amount{/ts}