if ($this->_id && isset($this->_values['tax_amount'])) {
$componentDetails = CRM_Contribute_BAO_Contribution::getComponentDetails($this->_id);
if (CRM_Utils_Array::value('membership', $componentDetails) || CRM_Utils_Array::value('participant', $componentDetails)) {
+ if ($totalAmount) {
+ $totalAmount->freeze();
+ }
$financialType->freeze();
- $totalAmount->freeze();
$this->assign('freezeFinancialType', TRUE);
}
}
{if $ppID}{ts}<a href='#' onclick='adjustPayment();'>adjust payment amount</a>{/ts}{help id="adjust-payment-amount"}{/if}
<div id="totalAmountBlock">
- <br /><span class="description">{ts}Total amount of this contribution.{/ts}{if $hasPriceSets} {ts}Alternatively, you can use a price set.{/ts}{/if}</span>
- <br /><span id="totalTaxAmount" class="label"></span>
+ {if $hasPriceSets}<span class="description">{ts}Alternatively, you can use a price set.{/ts}</span>{/if}
+ <div id="totalTaxAmount" class="label"></div>
</div>
</td>
</tr>
var taxRate = taxRates[financialType];
if (!taxRate) {
taxRate = 0;
+ cj("#totalTaxAmount").hide( );
+ } else {
+ cj("#totalTaxAmount").show( );
}
var totalAmount = $('#total_amount').val();
var thousandMarker = '{/literal}{$config->monetaryThousandSeparator}{literal}';
var taxAmount = (taxRate/100)*totalAmount;
taxAmount = isNaN (taxAmount) ? 0:taxAmount;
var totalTaxAmount = taxAmount + Number(totalAmount);
- totalTaxAmount = formatMoney( totalTaxAmount, 2, seperator, thousandMarker );
+ totalTaxAmount = formatMoney( totalTaxAmount, 2, seperator, thousandMarker );
$("#totalTaxAmount" ).html('Amount with tax : <span id="currencySymbolShow">' + currencySymbol + '</span> '+ totalTaxAmount);
}