+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2016 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
</td>
</tr>
{/if}
-
+ {if $form.revenue_recognition_date}
+ <tr class="crm-contribution-form-block-revenue_recognition_date">
+ <td class="label">{$form.revenue_recognition_date.label}</td>
+ <td>{$form.revenue_recognition_date.html}</td>
+ </tr>
+ {/if}
</table>
{include file='CRM/Core/BillingBlockWrapper.tpl'}
});
function showHideCancelInfo(obj) {
- if (obj.find(":selected").text() == 'Refunded' || obj.find(":selected").text() == 'Cancelled') {
+ var cancelInfo_show_ids = [{/literal}{$cancelInfo_show_ids}{literal}];
+ if (cancelInfo_show_ids.indexOf(obj.val()) > -1) {
cj('#cancelInfo').show( );
cj('#total_amount').attr('readonly', true);
}
}
{/literal}{/if}{literal}
+var thousandMarker = "{/literal}{$config->monetaryThousandSeparator}{literal}";
+var separator = "{/literal}{$config->monetaryDecimalPoint}{literal}";
+
cj('#fee_amount').change( function() {
- var totalAmount = cj('#total_amount').val();
- var feeAmount = cj('#fee_amount').val();
- var netAmount = totalAmount.replace(/,/g, '') - feeAmount.replace(/,/g, '');
- if (!cj('#net_amount').val() && totalAmount) {
+ var totalAmount = cj('#total_amount').val().replace(thousandMarker,'').replace(separator,'.');
+ var feeAmount = cj('#fee_amount').val().replace(thousandMarker,'').replace(separator,'.');
+ var netAmount = totalAmount - feeAmount;
+ if (totalAmount) {
cj('#net_amount').val(CRM.formatMoney(netAmount, true));
}
});
cj("#totalTaxAmount").show( );
}
var totalAmount = $('#total_amount').val();
- var thousandMarker = '{/literal}{$config->monetaryThousandSeparator}{literal}';
- var seperator = '{/literal}{$config->monetaryDecimalPoint}{literal}';
- // replace all thousandMarker and change the seperator to a dot
- totalAmount = totalAmount.replace(thousandMarker,'').replace(seperator,'.');
+ // replace all thousandMarker and change the separator to a dot
+ totalAmount = totalAmount.replace(thousandMarker,'').replace(separator,'.');
var totalTaxAmount = '{/literal}{$totalTaxAmount}{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, separator, thousandMarker );
$("#totalTaxAmount" ).html('Amount with tax : <span id="currencySymbolShow">' + currencySymbol + '</span> '+ totalTaxAmount);
}