First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
|
@ -0,0 +1,66 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{*
|
||||
|
||||
***** IMPORTANT *************
|
||||
Quickbooks allows almost NO variation in formatting. If editing this file pay
|
||||
close attention to whitespace, empty lines, and invisible characters. In
|
||||
particular, since the coding standard means sometimes people's editors replace
|
||||
tabs with spaces, always use the $tabchar var below instead of an actual tab
|
||||
character. And watch out for editors that add spaces/tabs at the end of lines.
|
||||
(I'm wondering if it's better not to use smarty for this.)
|
||||
|
||||
****************** BE CAREFUL !!!!!!!!!! ***********************
|
||||
|
||||
*}
|
||||
{assign var='tabchar' value=9|chr}
|
||||
{if !empty($accounts)}
|
||||
!ACCNT{$tabchar}NAME{$tabchar}REFNUM{$tabchar}TIMESTAMP{$tabchar}ACCNTTYPE{$tabchar}OBAMOUNT{$tabchar}DESC{$tabchar}ACCNUM
|
||||
{* I don't think we need these fields - SCD BANKNUM EXTRA HIDDEN DELCOUNT USEID WKPAPERREF
|
||||
|
||||
*}
|
||||
{foreach from=$accounts key=account_id item=acct}
|
||||
ACCNT{$tabchar}{$acct.name}{$tabchar}{$tabchar}{$tabchar}{$acct.type}{$tabchar}{$tabchar}{$acct.description}{$tabchar}{$acct.account_code}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{if !empty($contacts)}
|
||||
!CUST{$tabchar}NAME{$tabchar}REFNUM{$tabchar}TIMESTAMP{$tabchar}BADDR1{$tabchar}BADDR2{$tabchar}BADDR3{$tabchar}BADDR4{$tabchar}BADDR5{$tabchar}SADDR1{$tabchar}SADDR2{$tabchar}SADDR3{$tabchar}SADDR4{$tabchar}SADDR5{$tabchar}PHONE1{$tabchar}PHONE2{$tabchar}FAXNUM{$tabchar}EMAIL{$tabchar}NOTE{$tabchar}CONT1{$tabchar}CONT2{$tabchar}CTYPE{$tabchar}TERMS{$tabchar}TAXABLE{$tabchar}SALESTAXCODE{$tabchar}LIMIT{$tabchar}RESALENUM{$tabchar}REP{$tabchar}TAXITEM{$tabchar}NOTEPAD{$tabchar}SALUTATION{$tabchar}COMPANYNAME{$tabchar}FIRSTNAME{$tabchar}MIDINIT{$tabchar}LASTNAME{$tabchar}CUSTFLD1{$tabchar}CUSTFLD2{$tabchar}CUSTFLD3{$tabchar}CUSTFLD4{$tabchar}CUSTFLD5{$tabchar}CUSTFLD6{$tabchar}CUSTFLD7{$tabchar}CUSTFLD8{$tabchar}CUSTFLD9{$tabchar}CUSTFLD10{$tabchar}CUSTFLD11{$tabchar}CUSTFLD12{$tabchar}CUSTFLD13{$tabchar}CUSTFLD14{$tabchar}CUSTFLD15{$tabchar}JOBDESC{$tabchar}JOBTYPE{$tabchar}JOBSTATUS{$tabchar}JOBSTART{$tabchar}JOBPROJEND{$tabchar}JOBEND{$tabchar}HIDDEN{$tabchar}DELCOUNT{$tabchar}PRICELEVEL
|
||||
{foreach from=$contacts key=contact_id item=contact}
|
||||
CUST{$tabchar}{$contact.name}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$contact.first_name}{$tabchar}{$tabchar}{$contact.last_name}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}{$tabchar}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{if !empty($journalEntries)}
|
||||
!TRNS{$tabchar}TRNSID{$tabchar}TRNSTYPE{$tabchar}DATE{$tabchar}ACCNT{$tabchar}NAME{$tabchar}CLASS{$tabchar}AMOUNT{$tabchar}DOCNUM{$tabchar}MEMO{$tabchar}PAYMETH
|
||||
!SPL{$tabchar}SPLID{$tabchar}TRNSTYPE{$tabchar}DATE{$tabchar}ACCNT{$tabchar}NAME{$tabchar}CLASS{$tabchar}AMOUNT{$tabchar}DOCNUM{$tabchar}MEMO{$tabchar}PAYMETH
|
||||
!ENDTRNS
|
||||
{foreach from=$journalEntries key=id item=je}
|
||||
TRNS{$tabchar}{$je.to_account.trxn_id}{$tabchar}GENERAL JOURNAL{$tabchar}{$je.to_account.trxn_date}{$tabchar}{$je.to_account.account_name}{$tabchar}{$je.to_account.contact_name}{$tabchar}{$tabchar}{$je.to_account.amount}{$tabchar}{$je.to_account.check_number}{$tabchar}{$tabchar}{$je.to_account.payment_instrument}
|
||||
{foreach from=$je.splits key=spl_id item=spl}
|
||||
SPL{$tabchar}{$spl.spl_id}{$tabchar}GENERAL JOURNAL{$tabchar}{$spl.trxn_date}{$tabchar}{$spl.account_name}{$tabchar}{$spl.contact_name}{$tabchar}{$tabchar}{$spl.amount}{$tabchar}{$spl.check_number}{$tabchar}{$spl.description}{$tabchar}{$spl.payment_instrument}
|
||||
{/foreach}
|
||||
ENDTRNS
|
||||
{/foreach}
|
||||
{/if}
|
|
@ -0,0 +1,361 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* this template is used for batch transaction screen, assign/remove transactions to batch *}
|
||||
{if in_array($batchStatus, array('Open', 'Reopened'))}
|
||||
<div class="crm-form-block crm-search-form-block">
|
||||
<div class="crm-accordion-wrapper crm-batch_transaction_search-accordion collapsed">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{ts}Edit Search Criteria{/ts}
|
||||
</div>
|
||||
<div class="crm-accordion-body">
|
||||
<div id="searchForm" class="crm-block crm-form-block crm-contact-custom-search-activity-search-form-block">
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td class="font-size12pt" colspan="2">{$form.sort_name.label} {$form.sort_name.html|crmAddClass:'twenty'}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{if $form.contact_tags}
|
||||
<td><label>{ts}Contributor Tag(s){/ts}</label>
|
||||
{$form.contact_tags.html}
|
||||
</td>
|
||||
{else}
|
||||
<td> </td>
|
||||
{/if}
|
||||
{if $form.group}
|
||||
<td><label>{ts}Contributor Group(s){/ts}</label>
|
||||
{$form.group.html}
|
||||
</td>
|
||||
{else}
|
||||
<td> </td>
|
||||
{/if}
|
||||
</tr>
|
||||
{include file="CRM/Contribute/Form/Search/Common.tpl"}
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if in_array($batchStatus, array('Open', 'Reopened'))}
|
||||
<div class="form-layout-compressed">{$form.trans_assign.html} {$form.submit.html}</div><br/>
|
||||
{/if}
|
||||
<div id="ltype">
|
||||
<p></p>
|
||||
<div class="form-item">
|
||||
{strip}
|
||||
<table id="crm-transaction-selector-assign-{$entityID}" cellpadding="0" cellspacing="0" border="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="crm-transaction-checkbox">{if in_array($batchStatus, array('Open', 'Reopened'))}{$form.toggleSelect.html}{/if}</th>
|
||||
<th class="crm-contact-type"></th>
|
||||
<th class="crm-contact-name">{ts}Name{/ts}</th>
|
||||
<th class="crm-amount">{ts}Amount{/ts}</th>
|
||||
<th class="crm-trxnID">{ts}Trxn ID{/ts}</th>
|
||||
<th class="crm-trxn_date">{ts}Payment/Transaction Date{/ts}</th>
|
||||
<th class="crm-received">{ts}Contribution Date{/ts}</th>
|
||||
<th class="crm-payment-method">{ts}Pay Method{/ts}</th>
|
||||
<th class="crm-status">{ts}Status{/ts}</th>
|
||||
<th class="crm-type">{ts}Financial Type{/ts}</th>
|
||||
<th class="crm-transaction-links"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
CRM.$('#_qf_BatchTransaction_submit-top, #_qf_BatchTransaction_submit-bottom').click(function() {
|
||||
CRM.$('.crm-batch_transaction_search-accordion:not(.collapsed)').crmAccordionToggle();
|
||||
});
|
||||
var batchStatus = {/literal}{$statusID}{literal};
|
||||
{/literal}{if $validStatus}{literal}
|
||||
// build transaction listing only for open/reopened batches
|
||||
var paymentInstrumentID = {/literal}{if $paymentInstrumentID neq null}{$paymentInstrumentID}{else}'null'{/if}{literal};
|
||||
if (paymentInstrumentID != 'null') {
|
||||
buildTransactionSelectorAssign( true );
|
||||
}
|
||||
else {
|
||||
buildTransactionSelectorAssign( false );
|
||||
}
|
||||
buildTransactionSelectorRemove();
|
||||
CRM.$('#_qf_BatchTransaction_submit-bottom, #_qf_BatchTransaction_submit-top').click( function() {
|
||||
buildTransactionSelectorAssign( true );
|
||||
return false;
|
||||
});
|
||||
|
||||
CRM.$("#trans_assign").prop('disabled',true);
|
||||
CRM.$("#trans_remove").prop('disabled',true);
|
||||
CRM.$('#crm-transaction-selector-assign-{/literal}{$entityID}{literal} #toggleSelect').click( function() {
|
||||
enableActions('x');
|
||||
});
|
||||
CRM.$('#crm-transaction-selector-remove-{/literal}{$entityID}{literal} #toggleSelects').click( function() {
|
||||
enableActions('y');
|
||||
});
|
||||
CRM.$('#Go').click( function() {
|
||||
return selectAction("trans_assign","toggleSelect", "crm-transaction-selector-assign-{/literal}{$entityID}{literal} input[id^='mark_x_']");
|
||||
});
|
||||
CRM.$('#GoRemove').click( function() {
|
||||
return selectAction("trans_remove","toggleSelects", "crm-transaction-selector-remove-{/literal}{$entityID}{literal} input[id^='mark_y_']");
|
||||
});
|
||||
CRM.$('#Go').click( function() {
|
||||
if (CRM.$("#trans_assign" ).val() != "" && CRM.$("input[id^='mark_x_']").is(':checked')) {
|
||||
bulkAssignRemove('Assign');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
CRM.$('#GoRemove').click( function() {
|
||||
if (CRM.$("#trans_remove" ).val() != "" && CRM.$("input[id^='mark_y_']").is(':checked')) {
|
||||
bulkAssignRemove('Remove');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
CRM.$("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} input[id^='mark_x_']").click( function() {
|
||||
enableActions('x');
|
||||
});
|
||||
CRM.$("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} input[id^='mark_y_']").click( function() {
|
||||
enableActions('y');
|
||||
});
|
||||
|
||||
CRM.$("#crm-transaction-selector-assign-{/literal}{$entityID}{literal} #toggleSelect").click( function() {
|
||||
toggleFinancialSelections('#toggleSelect', 'assign');
|
||||
});
|
||||
CRM.$("#crm-transaction-selector-remove-{/literal}{$entityID}{literal} #toggleSelects").click( function() {
|
||||
toggleFinancialSelections('#toggleSelects', 'remove');
|
||||
});
|
||||
{/literal}{else}{literal}
|
||||
buildTransactionSelectorRemove();
|
||||
{/literal}{/if}{literal}
|
||||
});
|
||||
|
||||
function enableActions( type ) {
|
||||
if (type == 'x') {
|
||||
CRM.$("#trans_assign").prop('disabled',false);
|
||||
}
|
||||
else {
|
||||
CRM.$("#trans_remove").prop('disabled',false);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleFinancialSelections(toggleID, toggleClass) {
|
||||
var mark = 'x';
|
||||
if (toggleClass == 'remove') {
|
||||
mark = 'y';
|
||||
}
|
||||
if (CRM.$("#crm-transaction-selector-" + toggleClass + "-{/literal}{$entityID}{literal} " + toggleID).is(':checked')) {
|
||||
CRM.$("#crm-transaction-selector-" + toggleClass + "-{/literal}{$entityID}{literal} input[id^='mark_" + mark + "_']").prop('checked',true);
|
||||
}
|
||||
else {
|
||||
CRM.$("#crm-transaction-selector-" + toggleClass + "-{/literal}{$entityID}{literal} input[id^='mark_" + mark + "_']").prop('checked',false);
|
||||
}
|
||||
}
|
||||
|
||||
function buildTransactionSelectorAssign(filterSearch) {
|
||||
var columns = '';
|
||||
var sourceUrl = {/literal}'{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Financial_Page_AJAX&fnName=getFinancialTransactionsList&snippet=4&context=financialBatch&entityID=$entityID¬Present=1&statusID=$statusID"}'{literal};
|
||||
if ( filterSearch ) {
|
||||
sourceUrl = sourceUrl+"&search=1";
|
||||
var ZeroRecordText = '<div class="status messages">{/literal}{ts escape="js"}None found.{/ts}{literal}</li></ul></div>';
|
||||
}
|
||||
|
||||
crmBatchSelector1 = CRM.$('#crm-transaction-selector-assign-{/literal}{$entityID}{literal}').dataTable({
|
||||
"bDestroy" : true,
|
||||
"bFilter" : false,
|
||||
"bAutoWidth" : false,
|
||||
"lengthMenu": [ 10, 25, 50, 100, 250, 500, 1000, 2000 ],
|
||||
"aaSorting" : [[5, 'desc']],
|
||||
"aoColumns" : [
|
||||
{sClass:'crm-transaction-checkbox', bSortable:false},
|
||||
{sClass:'crm-contact-type', bSortable:false},
|
||||
{sClass:'crm-contact-name'},
|
||||
{sClass:'crm-amount'},
|
||||
{sClass:'crm-trxnID'},
|
||||
{sClass:'crm-trxn_date'},
|
||||
{sClass:'crm-received'},
|
||||
{sClass:'crm-payment-method'},
|
||||
{sClass:'crm-status'},
|
||||
{sClass:'crm-type'},
|
||||
{sClass:'crm-transaction-links', bSortable:false}
|
||||
],
|
||||
"bProcessing": true,
|
||||
"asStripClasses" : [ "odd-row", "even-row" ],
|
||||
"sPaginationType": "full_numbers",
|
||||
"sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>',
|
||||
"bServerSide": true,
|
||||
"bJQueryUI": true,
|
||||
"sAjaxSource": sourceUrl,
|
||||
"iDisplayLength": 25,
|
||||
"oLanguage": {
|
||||
"sZeroRecords": ZeroRecordText,
|
||||
"sProcessing": {/literal}"{ts escape='js'}Processing...{/ts}"{literal},
|
||||
"sLengthMenu": {/literal}"{ts escape='js'}Show _MENU_ entries{/ts}"{literal},
|
||||
"sInfo": {/literal}"{ts escape='js'}Showing _START_ to _END_ of _TOTAL_ entries{/ts}"{literal},
|
||||
"sInfoEmpty": {/literal}"{ts escape='js'}Showing 0 to 0 of 0 entries{/ts}"{literal},
|
||||
"sInfoFiltered": {/literal}"{ts escape='js'}(filtered from _MAX_ total entries){/ts}"{literal},
|
||||
"sSearch": {/literal}"{ts escape='js'}Search:{/ts}"{literal},
|
||||
"oPaginate": {
|
||||
"sFirst": {/literal}"{ts escape='js'}First{/ts}"{literal},
|
||||
"sPrevious": {/literal}"{ts escape='js'}Previous{/ts}"{literal},
|
||||
"sNext": {/literal}"{ts escape='js'}Next{/ts}"{literal},
|
||||
"sLast": {/literal}"{ts escape='js'}Last{/ts}"{literal}
|
||||
}
|
||||
},
|
||||
"fnServerData": function ( sSource, aoData, fnCallback ) {
|
||||
if ( filterSearch ) {
|
||||
CRM.$('#searchForm :input').each(function() {
|
||||
if (CRM.$(this).val()) {
|
||||
aoData.push(
|
||||
{name:CRM.$(this).attr('id'), value: CRM.$(this).val()}
|
||||
);
|
||||
CRM.$(':radio, :checkbox').each(function() {
|
||||
if (CRM.$(this).is(':checked')) {
|
||||
aoData.push( { name: CRM.$(this).attr('name'), value: CRM.$(this).val() } );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
CRM.$.ajax({
|
||||
"dataType": 'json',
|
||||
"type": "POST",
|
||||
"url": sSource,
|
||||
"data": aoData,
|
||||
"success": function(b) {
|
||||
fnCallback(b);
|
||||
toggleFinancialSelections('#toggleSelect', 'assign');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function buildTransactionSelectorRemove( ) {
|
||||
var columns = '';
|
||||
var sourceUrl = {/literal}'{crmURL p="civicrm/ajax/rest" h=0 q="className=CRM_Financial_Page_AJAX&fnName=getFinancialTransactionsList&snippet=4&context=financialBatch&entityID=$entityID&statusID=$statusID"}'{literal};
|
||||
|
||||
crmBatchSelector = CRM.$('#crm-transaction-selector-remove-{/literal}{$entityID}{literal}').dataTable({
|
||||
"bDestroy" : true,
|
||||
"bFilter" : false,
|
||||
"bAutoWidth" : false,
|
||||
"aaSorting" : [[5, 'desc']],
|
||||
"aoColumns" : [
|
||||
{sClass:'crm-transaction-checkbox', bSortable:false},
|
||||
{sClass:'crm-contact-type', bSortable:false},
|
||||
{sClass:'crm-contact-name'},
|
||||
{sClass:'crm-amount'},
|
||||
{sClass:'crm-trxnID'},
|
||||
{sClass:'crm-trxn_date'},
|
||||
{sClass:'crm-received'},
|
||||
{sClass:'crm-payment-method'},
|
||||
{sClass:'crm-status'},
|
||||
{sClass:'crm-type'},
|
||||
{sClass:'crm-transaction-links', bSortable:false}
|
||||
],
|
||||
"bProcessing": true,
|
||||
"asStripClasses" : [ "odd-row", "even-row" ],
|
||||
"sPaginationType": "full_numbers",
|
||||
"sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>',
|
||||
"bServerSide": true,
|
||||
"bJQueryUI": true,
|
||||
"sAjaxSource": sourceUrl,
|
||||
"iDisplayLength": 25,
|
||||
"oLanguage": {
|
||||
"sProcessing": {/literal}"{ts escape='js'}Processing...{/ts}"{literal},
|
||||
"sLengthMenu": {/literal}"{ts escape='js'}Show _MENU_ entries{/ts}"{literal},
|
||||
"sInfo": {/literal}"{ts escape='js'}Showing _START_ to _END_ of _TOTAL_ entries{/ts}"{literal},
|
||||
"sInfoEmpty": {/literal}"{ts escape='js'}Showing 0 to 0 of 0 entries{/ts}"{literal},
|
||||
"sInfoFiltered": {/literal}"{ts escape='js'}(filtered from _MAX_ total entries){/ts}"{literal},
|
||||
"sSearch": {/literal}"{ts escape='js'}Search:{/ts}"{literal},
|
||||
"oPaginate": {
|
||||
"sFirst": {/literal}"{ts escape='js'}First{/ts}"{literal},
|
||||
"sPrevious": {/literal}"{ts escape='js'}Previous{/ts}"{literal},
|
||||
"sNext": {/literal}"{ts escape='js'}Next{/ts}"{literal},
|
||||
"sLast": {/literal}"{ts escape='js'}Last{/ts}"{literal}
|
||||
}
|
||||
},
|
||||
"fnServerData": function (sSource, aoData, fnCallback) {
|
||||
CRM.$.ajax({
|
||||
"dataType": 'json',
|
||||
"type": "POST",
|
||||
"url": sSource,
|
||||
"data": aoData,
|
||||
"success": function(b) {
|
||||
fnCallback(b);
|
||||
toggleFinancialSelections('#toggleSelects', 'remove');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function selectAction( id, toggleSelectId, checkId ) {
|
||||
if (CRM.$("#"+ id ).is(':disabled')) {
|
||||
return false;
|
||||
}
|
||||
else if (!CRM.$("#" + toggleSelectId).is(':checked') && !CRM.$("#" + checkId).is(':checked') && CRM.$("#" + id).val() != "") {
|
||||
CRM.alert ({/literal}'{ts escape="js"}Please select one or more contributions for this action.{/ts}'{literal});
|
||||
return false;
|
||||
}
|
||||
else if (CRM.$("#" + id).val() == "") {
|
||||
CRM.alert ({/literal}'{ts escape="js"}Please select an action from the drop-down menu.{/ts}'{literal});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function bulkAssignRemove( action ) {
|
||||
var postUrl = {/literal}"{crmURL p='civicrm/ajax/rest' h=0 q="className=CRM_Financial_Page_AJAX&fnName=bulkAssignRemove&entityID=$entityID" }"{literal};
|
||||
var fids = [];
|
||||
if (action == 'Assign') {
|
||||
CRM.$("input[id^='mark_x_']:checked").each( function () {
|
||||
var a = CRM.$(this).attr('id');
|
||||
fids.push(a);
|
||||
});
|
||||
}
|
||||
if (action == 'Remove') {
|
||||
CRM.$("input[id^='mark_y_']:checked").each( function () {
|
||||
var a = CRM.$(this).attr('id');
|
||||
fids.push(a);
|
||||
});
|
||||
}
|
||||
CRM.$.post(postUrl, { ID: fids, action:action }, function(data) {
|
||||
//this is custom status set when record update success.
|
||||
if (data.status == 'record-updated-success') {
|
||||
buildTransactionSelectorAssign( true );
|
||||
buildTransactionSelectorRemove();
|
||||
batchSummary({/literal}{$entityID}{literal});
|
||||
}
|
||||
else {
|
||||
CRM.alert(data.status);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,64 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Confirmation of Export Batch(s) *}
|
||||
<h3>{ts}Export Batch{/ts}</h3>
|
||||
<div class="messages status">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}Warning: You will not be able to reopen or change the batch after it is exported. Are you sure you want to export?{/ts}
|
||||
</div>
|
||||
<div class="crm-block crm-form-block crm-export_batch-form-block">
|
||||
<div class = "batch-names">
|
||||
<ul>
|
||||
{foreach from=$batchNames item=batchName}
|
||||
<li>{$batchName}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<table class="form-layout">
|
||||
<tr class="crm-contribution-form-block-name">
|
||||
<td class="html-adjust">
|
||||
{$form.export_format.html}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="form-item">
|
||||
{$form.buttons.html}
|
||||
</div>
|
||||
</div>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
$('input[name="export_format"]').filter('[value=IIF]').prop('checked', true);
|
||||
$('#_qf_Export_next').click(function(){
|
||||
$(this).hide();
|
||||
$('#_qf_Export_cancel').val('{/literal}{ts}Done{/ts}{literal}');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{htxt id="id-financial-owner-title"}
|
||||
{ts}Financial Account Owner{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-financial-owner"}
|
||||
<p>{ts}Normally the owner of a financial account is the organization implementing CiviCRM so there is no need to change this. Some organizations that maintain accounts for groups, chapters, regions, constiuency associations or other parts of the main CiviCRM organization may need to change the owner to one of these sub-entities or sibling entities.{/ts}</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="id-account-type-code-title"}
|
||||
{ts}Account Type Code{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-account-type-code"}
|
||||
<p>{ts}For export to QuickBooks, export your Chart of Accounts and open in low level text editor. You will be able to see the Account Type Code for each account. Generally, they will be from the following list: BANK, AR, OCASSET, FIXASSET, OASSET, AP, OCLIAB, LTLIAB, EQUITY, INC, COGS, EXP, EXEXP (though there may be others in your version of QuickBooks).{/ts}</p>
|
||||
{/htxt}
|
|
@ -0,0 +1,97 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* this template is used for adding/editing/deleting financial type *}
|
||||
<div class="crm-block crm-form-block crm-contribution_type-form-block crm-financial_type-form-block">
|
||||
{if $action eq 8}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}WARNING: You cannot delete a {$delName} Financial Account if it is currently used by any Financial Types. Consider disabling this option instead.{/ts} {ts}Deleting a financial type cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
|
||||
</div>
|
||||
{else}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
<tr class="crm-contribution-form-block-name">
|
||||
<td class="label">{$form.name.label}</td>
|
||||
<td class="html-adjust">{$form.name.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-description">
|
||||
<td class="label">{$form.description.label}</td>
|
||||
<td class="html-adjust">{$form.description.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-organisation_name">
|
||||
<td class="label">{$form.contact_id.label} {help id="id-financial-owner" file="CRM/Financial/Form/FinancialAccount.hlp"}</td>
|
||||
<td class="html-adjust">{$form.contact_id.html}<br />
|
||||
<span class="description">{ts}Use this field to indicate the organization that owns this account.{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-financial_account_type_id">
|
||||
<td class="label">{$form.financial_account_type_id.label}</td>
|
||||
<td class="html-adjust">{$form.financial_account_type_id.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-accounting_code">
|
||||
<td class="label">{$form.accounting_code.label}</td>
|
||||
<td class="html-adjust">{$form.accounting_code.html}<br />
|
||||
<span class="description">{ts}Enter the corresponding account code used in your accounting system. This code will be available for contribution export, and included in accounting batch exports.{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-account_type_code">
|
||||
<td class="label">{$form.account_type_code.label} {help id="id-account-type-code" file="CRM/Financial/Form/FinancialAccount.hlp"}</td>
|
||||
<td class="html-adjust">{$form.account_type_code.html}<br />
|
||||
<span class="description">{ts}Enter an account type code for this account. Account type codes are required for QuickBooks integration and will be included in all accounting batch exports.{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-is_deductible">
|
||||
<td class="label">{$form.is_deductible.label}</td>
|
||||
<td class="html-adjust">{$form.is_deductible.html}<br />
|
||||
<span class="description">{ts}Are monies received into this account tax-deductible?{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-is_active">
|
||||
<td class="label">{$form.is_active.label}</td>
|
||||
<td class="html-adjust">{$form.is_active.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-is_tax">
|
||||
<td class="label">{$form.is_tax.label}</td>
|
||||
<td class="html-adjust">{$form.is_tax.html}<br />
|
||||
<span class="description">{ts}Does this account hold taxes collected?{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-tax_rate">
|
||||
<td class="label">{$form.tax_rate.label}</td>
|
||||
<td class="html-adjust">{$form.tax_rate.html}<br />
|
||||
<span class="description">{ts}The default rate used to calculate the taxes collected into this account (e.g. for tax rate of 8.27%, enter 8.27).{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-is_default">
|
||||
<td class="label">{$form.is_default.label}</td>
|
||||
<td class="html-adjust">{$form.is_default.html}<br />
|
||||
<span class="description">{ts}Is this account to be used as the default account for its financial account type when associating financial accounts with financial types?{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="botttom"}</div>
|
||||
</div>
|
|
@ -0,0 +1,86 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* this template is used for adding/editing/deleting financial batch *}
|
||||
<div class="crm-block crm-form-block crm-financial_type-form-block">
|
||||
{if $action eq 8}
|
||||
<div class="messages status">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}WARNING: You cannot delete a financial type if it is currently used by any Contributions, Contribution Pages or Membership Types. Consider disabling this option instead.{/ts} {ts}Deleting a financial type cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
|
||||
</div>
|
||||
{else}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
|
||||
<table class="form-layout">
|
||||
<tr class="crm-contribution-form-block-name">
|
||||
<td class="label">{$form.title.label}</td>
|
||||
<td class="html-adjust">{$form.title.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-description">
|
||||
<td class="label">{$form.description.label}</td>
|
||||
<td class="html-adjust">{$form.description.html}</td>
|
||||
</tr>
|
||||
{if $action eq 2}
|
||||
<tr class="crm-contribution-form-block-contact">
|
||||
<td class="label">{ts}Created By{/ts}</td>
|
||||
<td class="html-adjust">{$contactName}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-open_date">
|
||||
<td class="label">{ts}Opened Date{/ts}</td>
|
||||
<td class="html-adjust">{$created_date|crmDate}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-modified_date">
|
||||
<td class="label">{ts}Modified Date{/ts}</td>
|
||||
<td class="html-adjust">{$modified_date|crmDate}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-batch_status">
|
||||
<td class="label">{$form.status_id.label}</td>
|
||||
<td class="html-adjust">{$form.status_id.html}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
<fieldset class="crm-collapsible">
|
||||
<legend class="collapsible-title">{ts}Optional Constraints{/ts}</legend>
|
||||
<div>
|
||||
<table class="form-layout">
|
||||
<tr class="crm-contribution-form-block-payment_instrument">
|
||||
<td class="label">{$form.payment_instrument_id.label}</td>
|
||||
<td class="html-adjust">{$form.payment_instrument_id.html} {help id="payment_instrument"}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-item_count">
|
||||
<td class="label">{$form.item_count.label}</td>
|
||||
<td class="html-adjust">{$form.item_count.html|crmAddClass:number} {help id="item_count"}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-total">
|
||||
<td class="label">{$form.total.label}</td>
|
||||
<td class="html-adjust">{$form.total.html|crmAddClass:number} {help id="total"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
{/if}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="botttom"}</div>
|
||||
</div>
|
||||
{include file="CRM/Form/validate.tpl"}
|
|
@ -0,0 +1,69 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* this template is used for adding/editing/deleting financial type *}
|
||||
<div class="crm-block crm-form-block crm-financial_type-form-block">
|
||||
{if $action eq 8}
|
||||
<div class="messages status">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}WARNING: You cannot delete a financial type if it is currently used by any Contributions, Contribution Pages or Membership Types. Consider disabling this option instead.{/ts} {ts}Deleting a financial type cannot be undone.{/ts} {ts}Do you want to continue?{/ts}
|
||||
</div>
|
||||
{else}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout">
|
||||
<tr class="crm-contribution-form-block-name">
|
||||
<td class="label">{$form.name.label}</td>
|
||||
<td class="html-adjust">{$form.name.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-description">
|
||||
<td class="label">{$form.description.label}</td>
|
||||
<td class="html-adjust">{$form.description.html}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="crm-contribution-form-block-is_deductible">
|
||||
<td class="label">{$form.is_deductible.label}</td>
|
||||
<td class="html-adjust">{$form.is_deductible.html}<br />
|
||||
<span class="description">{ts}Are contributions of this type tax-deductible?{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-is_active">
|
||||
<td class="label">{$form.is_active.label}</td>
|
||||
<td class="html-adjust">{$form.is_active.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-is_reserved">
|
||||
<td class="label">{$form.is_reserved.label}</td>
|
||||
<td class="html-adjust">{$form.is_reserved.html}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
{/if}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="botttom"}</div>
|
||||
{if $action eq 2 or $action eq 4 } {* Update or View*}
|
||||
<div class="crm-submit-buttons">
|
||||
<a href="{crmURL p='civicrm/admin/financial/financialType/accounts' q="action=browse&reset=1&aid=$aid"}" class="button"><span>{ts}View or Edit Financial Accounts{/ts}</a></span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* this template is used for adding/editing/deleting financial type *}
|
||||
<div class="crm-block crm-form-block crm-financial_type-form-block">
|
||||
{if $action eq 8}
|
||||
<div class="messages status">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}WARNING: You cannot delete a financial type if it is currently used by any Contributions, Contribution Pages or Membership Types. Consider disabling this option instead.{/ts} {ts}Deleting a financial type cannot be undone. Unbalanced transactions may be created if you delete this account.{/ts} {ts}Do you want to continue?{/ts}
|
||||
</div>
|
||||
{else}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
|
||||
<table class="form-layout">
|
||||
|
||||
<tr class="crm-contribution-form-block-account_relationship">
|
||||
<td class="label">{$form.account_relationship.label}</td>
|
||||
<td class="html-adjust">{$form.account_relationship.html}</td>
|
||||
</tr>
|
||||
<tr class="crm-contribution-form-block-financial_account_id">
|
||||
<td class="label">{$form.financial_account_id.label}</td>
|
||||
<td class="html-adjust">{$form.financial_account_id.html}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
{/if}
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="botttom"}</div>
|
||||
</div>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
{literal}
|
||||
CRM.$(function($) {
|
||||
$("#financial_account_id").change(function() {
|
||||
{/literal}
|
||||
relationID = "#account_relationship"
|
||||
financialAccountID = "#financial_account_id"
|
||||
callbackURL = "{crmURL p='civicrm/ajax/rest' h=0 q='className=CRM_Financial_Page_AJAX&fnName=jqFinancialRelation'}"
|
||||
{literal}
|
||||
var financialId = $("#financial_account_id").val();
|
||||
var check = $(relationID).val();
|
||||
if (check == 'select' || financialId == 'select') {
|
||||
callbackURL = callbackURL+"&_value=" + financialId;
|
||||
$.ajax({
|
||||
url: callbackURL,
|
||||
context: document.body,
|
||||
success: function(data, textStatus) {
|
||||
$(relationID).html("");//clear old options
|
||||
data = eval(data);//get json array
|
||||
if (data != null) {
|
||||
for (i = 0; i < data.length; i++) {
|
||||
if (data[i].selected == 'Selected') {
|
||||
var idf = data[i].value;
|
||||
}
|
||||
$(relationID).get(0).add(new Option(data[i].name, data[i].value), document.all ? i : null);
|
||||
}
|
||||
}
|
||||
if (idf != null) {
|
||||
$(relationID).val(idf);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (financialId == 'select') {
|
||||
{/literal}
|
||||
callbackURLs = "{crmURL p='civicrm/ajax/rest' h=0 q='className=CRM_Financial_Page_AJAX&fnName=jqFinancial'}"
|
||||
{literal}
|
||||
callbackURLs = callbackURLs + "&_value=select";
|
||||
$.ajax({
|
||||
url: callbackURLs,
|
||||
context: document.body,
|
||||
success: function(data, textStatus) {
|
||||
$(financialAccountID).html("");//clear old options
|
||||
data = eval(data);//get json array
|
||||
if (data != null) {
|
||||
for (i = 0; i < data.length; i++) {
|
||||
$(financialAccountID).get(0).add(new Option(data[i].name, data[i].value), document.all ? i : null);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#account_relationship").change(function() {
|
||||
{/literal}
|
||||
relationID = "#account_relationship"
|
||||
financialAccountID = "#financial_account_id"
|
||||
callbackURLs = "{crmURL p='civicrm/ajax/rest' h=0 q='className=CRM_Financial_Page_AJAX&fnName=jqFinancial'}"
|
||||
{literal}
|
||||
var financialId = $("#account_relationship").val();
|
||||
var check = $(financialAccountID).val();
|
||||
callbackURLs = callbackURLs+"&_value="+financialId;
|
||||
$.ajax({
|
||||
url: callbackURLs,
|
||||
context: document.body,
|
||||
success: function(data, textStatus) {
|
||||
$(financialAccountID).html("");//clear old options
|
||||
data = eval(data);//get json array
|
||||
if (data != null) {
|
||||
for (i = 0; i < data.length; i++) {
|
||||
if (data[i].selected == 'Selected') {
|
||||
var idf = data[i].value;
|
||||
}
|
||||
$(financialAccountID).get(0).add(new Option(data[i].name, data[i].value), document.all ? i : null);
|
||||
}
|
||||
}
|
||||
if (idf != null) {
|
||||
$(financialAccountID).val(idf);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (financialId == 'select') {
|
||||
{/literal}
|
||||
callbackURL = "{crmURL p='civicrm/ajax/rest' h=0 q='className=CRM_Financial_Page_AJAX&fnName=jqFinancialRelation'}"
|
||||
{literal}
|
||||
callbackURL = callbackURL+"&_value=select";
|
||||
$.ajax({
|
||||
url: callbackURL,
|
||||
context: document.body,
|
||||
success: function(data, textStatus) {
|
||||
$(relationID).html("");//clear old options
|
||||
data = eval(data);//get json array
|
||||
if (data != null) {
|
||||
for (i = 0; i < data.length; i++) {
|
||||
if (data[i].selected == 'Selected') {
|
||||
var idf = data[i].value;
|
||||
}
|
||||
$(relationID).get(0).add(new Option(data[i].name, data[i].value), document.all ? i : null);
|
||||
}
|
||||
}
|
||||
if (idf != null) {
|
||||
$(relationID).val(idf);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
|
@ -0,0 +1,29 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
<div id="billing-payment-block">
|
||||
{include file="CRM/Core/BillingBlock.tpl"}
|
||||
</div>
|
|
@ -0,0 +1,68 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
{crmRegion name="payment-edit-block"}
|
||||
<div id="payment-edit-section" class="crm-section billing_mode-section">
|
||||
{foreach from=$paymentFields key=fieldName item=paymentField}
|
||||
{assign var='name' value=$fieldName}
|
||||
<div class="crm-container {$name}-section">
|
||||
<div class="label">{$form.$name.label}
|
||||
</div>
|
||||
<div class="content">{if $name eq 'total_amount'}{$currency} {/if}{$form.$name.html}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/crmRegion}
|
||||
<div class="crm-submit-buttons">
|
||||
{include file="CRM/common/formButtons.tpl" location="bottom"}
|
||||
</div>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function ($) {
|
||||
|
||||
showHideFieldsByPaymentInstrumentID();
|
||||
$('#payment_instrument_id').on('change', showHideFieldsByPaymentInstrumentID);
|
||||
|
||||
function showHideFieldsByPaymentInstrumentID() {
|
||||
var paymentInstrumentLabel = $('#payment_instrument_id option:selected').text();
|
||||
if (paymentInstrumentLabel == ts('Credit Card')) {
|
||||
$('.check_number-section').hide();
|
||||
$('.card_type_id-section, .pan_truncation-section').show();
|
||||
}
|
||||
else if (paymentInstrumentLabel == ts('Check')) {
|
||||
$('.card_type_id-section, .pan_truncation-section').hide();
|
||||
$('.check_number-section').show();
|
||||
}
|
||||
else {
|
||||
$('.card_type_id-section, .pan_truncation-section, .check_number-section').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,45 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
<div id="paypalExpress">
|
||||
<fieldset class="crm-group paypal_checkout-group">
|
||||
<legend>{ts}Checkout with PayPal{/ts}</legend>
|
||||
<div class="section">
|
||||
<div class="crm-section paypalButtonInfo-section">
|
||||
<div class="content">
|
||||
<span class="description">{ts}Click the PayPal button to continue.{/ts}</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="crm-section {$expressButtonName}-section">
|
||||
<div class="content">
|
||||
{$form.$expressButtonName.html} <span class="description">{ts}Checkout securely. Pay without sharing your financial information.{/ts}</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
|
@ -0,0 +1,38 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $form.$expressButtonName}
|
||||
<div class="crm-section no-label paypal_button_info-section">
|
||||
<div class="content description">
|
||||
{ts}If you have a PayPal account, you can click the PayPal button to continue. Otherwise, fill in the credit card and billing information on this form and click <strong>Continue</strong> at the bottom of the page.{/ts}
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-section no-label {$form.$expressButtonName.name}-section">
|
||||
<div class="content description">
|
||||
{$form.$expressButtonName.html}
|
||||
<div class="description">{ts}Checkout securely. Pay without sharing your financial information.{/ts}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
|
@ -0,0 +1,335 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
{* Financial search component. *}
|
||||
<div id="enableDisableStatusMsg" class="crm-container" style="display:none"></div>
|
||||
<div class="crm-submit-buttons">
|
||||
<a accesskey="N" href="{crmURL p='civicrm/financial/batch' q="reset=1&action=add&context=$batchStatus"}" id="newBatch" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}New Accounting Batch{/ts}</span></a>
|
||||
</div>
|
||||
<div class="crm-form-block crm-search-form-block">
|
||||
<div class="crm-accordion-wrapper crm-activity_search-accordion">
|
||||
<div class="crm-accordion-header">
|
||||
{ts}Filter Results{/ts}
|
||||
</div>
|
||||
<div class="crm-accordion-body">
|
||||
<div id="financial-search-form" class="crm-block crm-form-block">
|
||||
<table class="form-layout-compressed">
|
||||
{* Loop through all defined search criteria fields (defined in the buildForm() function). *}
|
||||
{foreach from=$elements item=element}
|
||||
<tr class="crm-financial-search-form-block-{$element}">
|
||||
<td class="label">{$form.$element.label}</td>
|
||||
<td>{$form.$element.html}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-layout-compressed">{$form.batch_update.html} {$form.submit.html}</div><br/>
|
||||
<table id="crm-batch-selector-{$batchStatus}" class="row-highlight">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="crm-batch-checkbox">{$form.toggleSelect.html}</th>
|
||||
<th class="crm-batch-name">{ts}Batch Name{/ts}</th>
|
||||
<th class="crm-batch-payment_instrument">{ts}Payment Method{/ts}</th>
|
||||
<th class="crm-batch-item_count">{ts}Item Count{/ts}</th>
|
||||
<th class="crm-batch-total">{ts}Total Amount{/ts}</th>
|
||||
<th class="crm-batch-status">{ts}Status{/ts}</th>
|
||||
<th class="crm-batch-created_by">{ts}Created By{/ts}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{include file="CRM/Form/validate.tpl"}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
var batchSelector;
|
||||
buildBatchSelector();
|
||||
$("#batch_update").prop('disabled', false);
|
||||
|
||||
$('#financial-search-form :input')
|
||||
.change(function() {
|
||||
if (!$(this).hasClass('crm-inline-error')) {
|
||||
batchSelector.fnDraw();
|
||||
}
|
||||
})
|
||||
.keypress(function(event) {
|
||||
if (event.which == 13) {
|
||||
event.preventDefault();
|
||||
$(this).change();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
var checkedRows = [];
|
||||
function buildBatchSelector() {
|
||||
var ZeroRecordText = {/literal}'<div class="status messages">{ts escape="js"}No Accounting Batches match your search criteria.{/ts}</div>'{literal};
|
||||
var sourceUrl = {/literal}'{crmURL p="civicrm/ajax/batchlist" h=0 q="snippet=4&context=financialBatch"}'{literal};
|
||||
|
||||
batchSelector = $('#crm-batch-selector-{/literal}{$batchStatus}{literal}').dataTable({
|
||||
"bFilter" : false,
|
||||
"bAutoWidth" : false,
|
||||
"aaSorting" : [],
|
||||
"aoColumns" : [
|
||||
{sClass:'crm-batch-checkbox', bSortable:false},
|
||||
{sClass:'crm-batch-name'},
|
||||
{sClass:'crm-batch-payment_instrument'},
|
||||
{sClass:'crm-batch-item_count right', bSortable:false},
|
||||
{sClass:'crm-batch-total right', bSortable:false},
|
||||
{sClass:'crm-batch-status'},
|
||||
{sClass:'crm-batch-created_by'},
|
||||
{sClass:'crm-batch-links', bSortable:false},
|
||||
],
|
||||
"bProcessing": true,
|
||||
"asStripClasses" : ["odd-row", "even-row"],
|
||||
"sPaginationType": "full_numbers",
|
||||
"sDom" : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>',
|
||||
"bServerSide": true,
|
||||
"bJQueryUI": true,
|
||||
"sAjaxSource": sourceUrl,
|
||||
"iDisplayLength": 25,
|
||||
"oLanguage": {
|
||||
"sZeroRecords": ZeroRecordText,
|
||||
"sProcessing": {/literal}"{ts escape='js'}Processing...{/ts}"{literal},
|
||||
"sLengthMenu": {/literal}"{ts escape='js'}Show _MENU_ entries{/ts}"{literal},
|
||||
"sInfo": {/literal}"{ts escape='js'}Showing _START_ to _END_ of _TOTAL_ entries{/ts}"{literal},
|
||||
"sInfoEmpty": {/literal}"{ts escape='js'}Showing 0 to 0 of 0 entries{/ts}"{literal},
|
||||
"sInfoFiltered": {/literal}"{ts escape='js'}(filtered from _MAX_ total entries) {/ts}"{literal},
|
||||
"sSearch": {/literal}"{ts escape='js'}Search:{/ts}"{literal},
|
||||
"oPaginate": {
|
||||
"sFirst": {/literal}"{ts escape='js'}First{/ts}"{literal},
|
||||
"sPrevious": {/literal}"{ts escape='js'}Previous{/ts}"{literal},
|
||||
"sNext": {/literal}"{ts escape='js'}Next{/ts}"{literal},
|
||||
"sLast": {/literal}"{ts escape='js'}Last{/ts}"{literal}
|
||||
}
|
||||
},
|
||||
"fnServerParams": function (aoData) {
|
||||
$('#financial-search-form :input').each(function() {
|
||||
if ($(this).val()) {
|
||||
aoData.push(
|
||||
{name:$(this).attr('id'), value: $(this).val()}
|
||||
);
|
||||
}
|
||||
});
|
||||
checkedRows = [];
|
||||
$("#crm-batch-selector-{/literal}{$batchStatus}{literal} input.select-row:checked").each(function() {
|
||||
checkedRows.push('#' + $(this).attr('id'));
|
||||
});
|
||||
},
|
||||
"fnRowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
|
||||
var box = $(aData[0]);
|
||||
var id = box.attr('id').replace('check_', '');
|
||||
$(nRow).addClass('crm-entity').attr('data-entity', 'batch').attr('data-id', id).attr('data-status_id', box.attr('data-status_id'));
|
||||
$('td:eq(1)', nRow).wrapInner('<div class="crm-editable crmf-title" />');
|
||||
return nRow;
|
||||
},
|
||||
"fnDrawCallback": function(oSettings) {
|
||||
$(this).trigger('crmLoad');
|
||||
$("#toggleSelect").prop('checked', false);
|
||||
if (checkedRows.length) {
|
||||
$(checkedRows.join(',')).prop('checked', true).change();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editRecords(records, op) {
|
||||
records = validateOp(records, op);
|
||||
if (records.length) {
|
||||
$("#enableDisableStatusMsg").dialog({
|
||||
title: {/literal}'{ts escape="js"}Confirm Changes{/ts}'{literal},
|
||||
modal: true,
|
||||
open:function() {
|
||||
switch (op) {{/literal}
|
||||
case 'reopen':
|
||||
var msg = '<h3>{ts escape="js"}Are you sure you want to re-open:{/ts}</h3>';
|
||||
break;
|
||||
case 'delete':
|
||||
var msg = '<h3>{ts escape="js"}Are you sure you want to delete:{/ts}</h3>';
|
||||
break;
|
||||
case 'close':
|
||||
var msg = '<h3>{ts escape="js"}Are you sure you want to close:{/ts}</h3>';
|
||||
break;
|
||||
case 'export':
|
||||
var msg = '<h3>{ts escape="js"}Export:{/ts}</h3>\
|
||||
<div>\
|
||||
<label>{ts escape="js"}Format:{/ts}</label>\
|
||||
<select class="export-format">\
|
||||
<option value="IIF">IIF</option>\
|
||||
<option value="CSV">CSV</option>\
|
||||
</select>\
|
||||
</div>';
|
||||
break;
|
||||
{literal}}
|
||||
msg += listRecords(records, op == 'close' || op == 'export');
|
||||
$('#enableDisableStatusMsg').show().html(msg);
|
||||
},
|
||||
buttons: {
|
||||
{/literal}"{ts escape='js'}Cancel{/ts}"{literal}: function() {
|
||||
$(this).dialog("close");
|
||||
},
|
||||
{/literal}"{ts escape='js'}OK{/ts}{literal}": function() {
|
||||
saveRecords(records, op);
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function listRecords(records, compareValues) {
|
||||
var txt = '<ul>',
|
||||
mismatch = false;
|
||||
for (var i in records) {
|
||||
var $tr = $('tr[data-id=' + records[i] + ']');
|
||||
txt += '<li>' + $('.crmf-title', $tr).text();
|
||||
if (compareValues) {
|
||||
$('.actual-value.crm-error', $tr).each(function() {
|
||||
mismatch = true;
|
||||
var $th = $tr.closest('table').find('th').eq($(this).closest('td').index());
|
||||
var $expected = $(this).siblings('.expected-value');
|
||||
var label = $th.text();
|
||||
var actual = $(this).text();
|
||||
var expected = $expected.text();
|
||||
txt += {/literal}'<div class="messages crm-error"><strong>' +
|
||||
label + ' {ts escape="js"}mismatch.{/ts}</strong><br />{ts escape="js"}Expected{/ts}: ' + expected + '<br />{ts escape="js"}Current Total{/ts}: ' + actual + '</div>'{literal};
|
||||
});
|
||||
}
|
||||
txt += '</li>';
|
||||
}
|
||||
txt += '</ul>';
|
||||
if (mismatch) {
|
||||
txt += {/literal}'<div class="messages status">{ts escape="js"}Click OK to override and update expected values.{/ts}</div>'{literal}
|
||||
}
|
||||
return txt;
|
||||
}
|
||||
|
||||
function saveRecords(records, op) {
|
||||
if (op == 'export') {
|
||||
return exportRecords(records);
|
||||
}
|
||||
var postUrl = CRM.url('civicrm/ajax/rest', 'className=CRM_Financial_Page_AJAX&fnName=assignRemove');
|
||||
//post request and get response
|
||||
$.post(postUrl, {records: records, recordBAO: 'CRM_Batch_BAO_Batch', op: op, key: {/literal}"{crmKey name='civicrm/ajax/ar'}"{literal}},
|
||||
function(response) {
|
||||
//this is custom status set when record update success.
|
||||
if (response.status == 'record-updated-success') {
|
||||
//Redirect CRM-18169
|
||||
window.location.href = CRM.url('civicrm/financial/financialbatches', 'reset=1&batchStatus=' + response.status_id);
|
||||
CRM.alert(listRecords(records), op == 'delete' ? {/literal}'{ts escape="js"}Deleted{/ts}' : '{ts escape="js"}Updated{/ts}'{literal}, 'success');
|
||||
}
|
||||
else {
|
||||
CRM.alert({/literal}'{ts escape="js"}An error occurred while processing your request.{/ts}', $("#batch_update option[value=" + op + "]").text() + ' {ts escape="js"}Error{/ts}'{literal}, 'error');
|
||||
}
|
||||
},
|
||||
'json').error(serverError);
|
||||
}
|
||||
|
||||
function exportRecords(records) {
|
||||
var query = {'batch_id': records, 'export_format': $('select.export-format').val()};
|
||||
var exportUrl = CRM.url('civicrm/financial/batch/export', 'reset=1');
|
||||
// jQuery redirect expects all query args as an object, so extract them from crm url
|
||||
var urlParts = exportUrl.split('?');
|
||||
$.each(urlParts[1].split('&'), function(key, val) {
|
||||
var q = val.split('=');
|
||||
query[q[0]] = q[1];
|
||||
});
|
||||
$().redirect(urlParts[0], query, 'GET');
|
||||
setTimeout(function() {batchSelector.fnDraw();}, 4000);
|
||||
}
|
||||
|
||||
function validateOp(records, op) {
|
||||
switch (op) {
|
||||
case 'reopen':
|
||||
var notAllowed = [1, 5];
|
||||
break;
|
||||
case 'close':
|
||||
var notAllowed = [2, 5];
|
||||
break;
|
||||
case 'export':
|
||||
var notAllowed = [5];
|
||||
break;
|
||||
default:
|
||||
return records;
|
||||
}
|
||||
var len = records.length;
|
||||
var invalid = {};
|
||||
var i = 0;
|
||||
while (i < len) {
|
||||
var status = $('tr[data-id='+records[i]+']').data('status_id');
|
||||
if ($.inArray(status, notAllowed) >= 0) {
|
||||
$('#check_' + records[i] + ':checked').prop('checked', false).change();
|
||||
invalid[status] = invalid[status] || [];
|
||||
invalid[status].push(records[i]);
|
||||
records.splice(i, 1);
|
||||
--len;
|
||||
}
|
||||
else {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
for (status in invalid) {
|
||||
i = invalid[status];
|
||||
var msg = (i.length == 1 ? {/literal}'{ts escape="js"}This record already has the status{/ts}' : '{ts escape="js"}The following records already have the status{/ts}'{literal}) + ' ' + $('tr[data-id='+i[0]+'] .crm-batch-status').text() + ':' + listRecords(i);
|
||||
CRM.alert(msg, {/literal}'{ts escape="js"}Cannot{/ts} '{literal} + $("#batch_update option[value=" + op + "]").text());
|
||||
}
|
||||
return records;
|
||||
}
|
||||
|
||||
function serverError() {
|
||||
CRM.alert({/literal}'{ts escape="js"}No response from the server. Check your internet connection and try reloading the page.{/ts}', '{ts escape="js"}Network Error{/ts}'{literal}, 'error');
|
||||
}
|
||||
|
||||
$('#Go').click(function() {
|
||||
var op = $("#batch_update").val();
|
||||
if (op == "") {
|
||||
CRM.alert({/literal}'{ts escape="js"}Please select an action from the menu.{/ts}', '{ts escape="js"}No Action Selected{/ts}'{literal});
|
||||
}
|
||||
else if (!$("input.select-row:checked").length) {
|
||||
CRM.alert({/literal}'{ts escape="js"}Please select one or more batches for this action.{/ts}', '{ts escape="js"}No Batches Selected{/ts}'{literal});
|
||||
}
|
||||
else {
|
||||
records = [];
|
||||
$("input.select-row:checked").each(function() {
|
||||
records.push($(this).attr('id').replace('check_', ''));
|
||||
});
|
||||
editRecords(records, op);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#crm-container').on('click', 'a.action-item[href="#"]', function(event) {
|
||||
event.stopImmediatePropagation();
|
||||
editRecords([$(this).closest('tr').attr('data-id')], $(this).attr('rel'));
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,26 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{include file="CRM/Financial/Form/Search.tpl"}
|
|
@ -0,0 +1,192 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
|
||||
<div id="enableDisableStatusMsg" class="crm-container" style="display:none;"></div>
|
||||
<table id="batch-summary" cellpadding="0" cellspacing="0" border="0" class="report crm-batch_summary">
|
||||
<thead class="sticky">
|
||||
<tr>
|
||||
{foreach from=$columnHeaders item=head}
|
||||
<th>{$head}</th>
|
||||
{/foreach}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
{foreach from=$columnHeaders item=head key=rowKey}
|
||||
<td id="row_{$rowKey}" class="even-row"></td>
|
||||
{/foreach}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="crm-submit-buttons">{if in_array($batchStatus, array('Open', 'Reopened'))}{$form.close_batch.html}{/if} {$form.export_batch.html}</div>
|
||||
|
||||
{if in_array($batchStatus, array('Open', 'Reopened'))} {* Add / remove transactions only allowed for Open/Reopened batches *}
|
||||
<br /><div class="form-layout-compressed">{$form.trans_remove.html} {$form.rSubmit.html}</div><br/>
|
||||
{/if}
|
||||
|
||||
<div id="ltype">
|
||||
<p></p>
|
||||
<div class="form-item">
|
||||
{strip}
|
||||
<table id="crm-transaction-selector-remove-{$entityID}" cellpadding="0" cellspacing="0" border="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="crm-transaction-checkbox">{if in_array($batchStatus, array('Open', 'Reopened'))}{$form.toggleSelects.html}{/if}</th>
|
||||
<th class="crm-contact-type"></th>
|
||||
<th class="crm-contact-name">{ts}Name{/ts}</th>
|
||||
<th class="crm-amount">{ts}Amount{/ts}</th>
|
||||
<th class="crm-trxnID">{ts}Trxn ID{/ts}</th>
|
||||
<th class="crm-trxn_date">{ts}Payment/Transaction Date{/ts}</th>
|
||||
<th class="crm-received">{ts}Contribution Date{/ts}</th>
|
||||
<th class="crm-payment-method">{ts}Pay Method{/ts}</th>
|
||||
<th class="crm-status">{ts}Status{/ts}</th>
|
||||
<th class="crm-type">{ts}Type{/ts}</th>
|
||||
<th class="crm-transaction-links"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
{include file="CRM/Financial/Form/BatchTransaction.tpl"}
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
var entityID = {/literal}{$entityID}{literal};
|
||||
batchSummary(entityID);
|
||||
CRM.$('#close_batch').click( function() {
|
||||
assignRemove(entityID, 'close');
|
||||
return false;
|
||||
});
|
||||
CRM.$('#export_batch').click( function() {
|
||||
assignRemove(entityID, 'export');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
function assignRemove(recordID, op) {
|
||||
var recordBAO = 'CRM_Batch_BAO_Batch';
|
||||
if (op == 'assign' || op == 'remove') {
|
||||
recordBAO = 'CRM_Batch_BAO_EntityBatch';
|
||||
}
|
||||
var entityID = {/literal}"{$entityID}"{literal};
|
||||
if (op == 'close' || op == 'export') {
|
||||
var mismatch = checkMismatch();
|
||||
}
|
||||
else {
|
||||
CRM.$('#mark_x_' + recordID).closest('tr').block({message: {/literal}'{ts escape="js"}Updating{/ts}'{literal}});
|
||||
}
|
||||
if (op == 'close' || (op == 'export' && mismatch.length)) {
|
||||
CRM.$("#enableDisableStatusMsg").dialog({
|
||||
title: {/literal}'{ts escape="js"}Close Batch{/ts}'{literal},
|
||||
modal: true,
|
||||
open:function() {
|
||||
if (op == 'close') {
|
||||
var msg = {/literal}'{ts escape="js"}Are you sure you want to close this batch?{/ts}'{literal};
|
||||
}
|
||||
else {
|
||||
var msg = {/literal}'{ts escape="js"}Are you sure you want to close and export this batch?{/ts}'{literal};
|
||||
}
|
||||
CRM.$('#enableDisableStatusMsg').show().html(msg + mismatch);
|
||||
},
|
||||
buttons: {
|
||||
{/literal}"{ts escape='js'}Cancel{/ts}"{literal}: function() {
|
||||
CRM.$(this).dialog("close");
|
||||
},
|
||||
{/literal}"{ts escape='js'}OK{/ts}"{literal}: function() {
|
||||
CRM.$(this).dialog("close");
|
||||
saveRecord(recordID, op, recordBAO, entityID);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
saveRecord(recordID, op, recordBAO, entityID);
|
||||
}
|
||||
}
|
||||
|
||||
function noServerResponse() {
|
||||
CRM.alert({/literal}'{ts escape="js"}No response from the server. Check your internet connection and try reloading the page.{/ts}', '{ts escape="js"}Network Error{/ts}'{literal}, 'error');
|
||||
}
|
||||
|
||||
function saveRecord(recordID, op, recordBAO, entityID) {
|
||||
if (op == 'export') {
|
||||
window.location.href = CRM.url('civicrm/financial/batch/export', {reset: 1, id: recordID, status: 1});
|
||||
return;
|
||||
}
|
||||
var postUrl = {/literal}"{crmURL p='civicrm/ajax/rest' h=0 q='className=CRM_Financial_Page_AJAX&fnName=assignRemove'}"{literal};
|
||||
//post request and get response
|
||||
CRM.$.post( postUrl, { records: [recordID], recordBAO: recordBAO, op:op, entityID:entityID, key: {/literal}"{crmKey name='civicrm/ajax/ar'}"{literal} }, function( html ){
|
||||
//this is custom status set when record update success.
|
||||
if (html.status == 'record-updated-success') {
|
||||
if (op == 'close') {
|
||||
window.location.href = CRM.url('civicrm/financial/financialbatches', 'reset=1&batchStatus=2');
|
||||
}
|
||||
else {
|
||||
buildTransactionSelectorAssign( true );
|
||||
buildTransactionSelectorRemove();
|
||||
batchSummary(entityID);
|
||||
}
|
||||
}
|
||||
else {
|
||||
CRM.alert(html.status);
|
||||
}
|
||||
},
|
||||
'json').error(noServerResponse);
|
||||
}
|
||||
|
||||
function batchSummary(entityID) {
|
||||
var postUrl = {/literal}"{crmURL p='civicrm/ajax/rest' h=0 q='className=CRM_Financial_Page_AJAX&fnName=getBatchSummary'}"{literal};
|
||||
//post request and get response
|
||||
CRM.$.post( postUrl, {batchID: entityID}, function(html) {
|
||||
CRM.$.each(html, function(i, val) {
|
||||
CRM.$("#row_" + i).html(val);
|
||||
});
|
||||
},
|
||||
'json');
|
||||
}
|
||||
|
||||
function checkMismatch() {
|
||||
var txt = '';
|
||||
var enteredItem = CRM.$("#row_item_count").text();
|
||||
var assignedItem = CRM.$("#row_assigned_item_count").text();
|
||||
var enteredTotal = CRM.$("#row_total").text();
|
||||
var assignedTotal = CRM.$("#row_assigned_total").text();
|
||||
if (enteredItem != "" && enteredItem != assignedItem) {
|
||||
txt = '{/literal}<div class="messages crm-error"><strong>Item Count mismatch:</strong><br/>{ts escape="js"}Expected{/ts}:' + enteredItem +'<br/>{ts escape="js"}Current Total{/ts}:' + assignedItem + '</div>{literal}';
|
||||
}
|
||||
if (enteredTotal != "" && enteredTotal != assignedTotal) {
|
||||
txt += '{/literal}<div class="messages crm-error"><strong>Total Amount mismatch</strong><br/>{ts escape="js"}Expected{/ts}:' + enteredTotal +'<br/>{ts escape="js"}Current Total{/ts}:' + assignedTotal + '</div>{literal}';
|
||||
}
|
||||
if (txt.length) {
|
||||
txt += {/literal}'<div class="messages status">{ts escape="js"}Click OK to override and update expected values.{/ts}</div>'{literal}
|
||||
}
|
||||
return txt;
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,91 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $action eq 1 or $action eq 2 or $action eq 8}
|
||||
{include file="CRM/Financial/Form/FinancialAccount.tpl"}
|
||||
{else}
|
||||
<div class="help">
|
||||
{capture assign="typeLink"}{crmURL p="civicrm/admin/financial/financialType" q="reset=1"}{/capture}
|
||||
{capture assign="paymentLink"}{crmURL p="civicrm/admin/options/payment_instrument" q="reset=1"}{/capture}
|
||||
{capture assign="premiumLink"}{crmURL p="civicrm/admin/contribute/managePremiums" q="reset=1"}{/capture}
|
||||
<p>{ts 1=$typeLink 2=$paymentLink 3=$premiumLink}Financial accounts correspond to those in your accounting system. <a href="%1">Financial types</a>, <a href="%2">payment methods</a>, and <a href="%3">premiums</a> are associated with financial accounts so that they can result in the proper double-entry transactions to export to your accounting system.{/ts}</p>
|
||||
</div>
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
<a href="{crmURL q="action=add&reset=1"}" id="newFinancialAccount-top" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Financial Account{/ts}</span></a>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $rows}
|
||||
{include file="CRM/common/jsortable.tpl"}
|
||||
<div id="ltype">
|
||||
<p></p>
|
||||
<div class="form-item">
|
||||
{strip}
|
||||
{* handle enable/disable actions*}
|
||||
{include file="CRM/common/enableDisableApi.tpl"}
|
||||
<table id="crm-financial_accounts" class="display">
|
||||
<thead class="sticky">
|
||||
<th>{ts}Name{/ts}</th>
|
||||
<th>{ts}Description{/ts}</th>
|
||||
<th>{ts}Acctg Code{/ts}</th>
|
||||
<th id="sortable">{ts}Account Type{/ts}</th>
|
||||
<th>{ts}Deductible?{/ts}</th>
|
||||
<th>{ts}Reserved?{/ts}</th>
|
||||
<th>{ts}Default?{/ts}</th>
|
||||
<th>{ts}Enabled?{/ts}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
{foreach from=$rows item=row}
|
||||
<tr id="financial_account-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
|
||||
<td class="crm-editable" data-field="name">{$row.name}</td>
|
||||
<td class="crm-editable" data-field="description" data-type="textarea">{$row.description}</td>
|
||||
<td class="crm-editable" data-field="accounting_code">{$row.accounting_code}</td>
|
||||
<td>{$row.financial_account_type_id}{if $row.account_type_code} ({$row.account_type_code}){/if}</td>
|
||||
<td>{if $row.is_deductible eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" /> {/if}</td>
|
||||
<td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{$row.action|replace:'xx':$row.id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
<a href="{crmURL q="action=add&reset=1"}" id="newFinancialAccount-bottom" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Financial Account{/ts}</span></a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="messages status">
|
||||
<div class="icon inform-icon"></div>
|
||||
{capture assign=crmURL}{crmURL q="action=add&reset=1"}{/capture}
|
||||
{ts 1=$crmURL}There are no Financial Account entered. You can <a href='%1'>add one</a>.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
|
@ -0,0 +1,60 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{htxt id="payment_instrument-title"}
|
||||
{ts}Payment Method{/ts}
|
||||
{/htxt}
|
||||
{htxt id="payment_instrument"}
|
||||
<p>
|
||||
{ts}If you specify a payment method then this batch will be limited to exporting only transactions paid with that method.{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts}Note that not all transactions are necessarily associated with a payment method.{/ts}
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="item_count-title"}
|
||||
{ts}Number of Transactions{/ts}
|
||||
{/htxt}
|
||||
{htxt id="item_count"}
|
||||
<p>
|
||||
{ts}If you know in advance the number of transactions in this batch, you may specify it now.{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts}When you close your batch, CiviCRM will verify that you have entered the correct number{/ts} ({ts}you will have the opportunity to override the warning if they do not match{/ts}).
|
||||
</p>
|
||||
{/htxt}
|
||||
|
||||
{htxt id="total-title"}
|
||||
{ts}Total Amount{/ts}
|
||||
{/htxt}
|
||||
{htxt id="total"}
|
||||
<p>
|
||||
{ts}If you know in advance the total amount in this batch, you may specify it now.{/ts}
|
||||
</p>
|
||||
<p>
|
||||
{ts}When you close your batch, CiviCRM will verify the totals entered match this number{/ts} ({ts}you will have the opportunity to override the warning if they do not match{/ts}).
|
||||
</p>
|
||||
{/htxt}
|
|
@ -0,0 +1,28 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $action eq 1 or $action eq 2 or $action eq 8 or $action eq 262144 or $action eq 524288 or $action eq 128}
|
||||
{include file="CRM/Financial/Form/FinancialBatch.tpl"}
|
||||
{/if}
|
|
@ -0,0 +1,81 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $action eq 1 or $action eq 2 or $action eq 8}
|
||||
{include file="CRM/Financial/Form/FinancialType.tpl"}
|
||||
{else}
|
||||
<div class="help">
|
||||
{capture assign="premiumLink"}{crmURL p="civicrm/admin/contribute/managePremiums" q="reset=1"}{/capture}
|
||||
<p>{ts 1=$premiumLink}Financial types are used to categorize contributions for reporting and accounting purposes. You may set up as many as needed, including commonly used types such as Donation, Campaign Contribution or Membership Dues. Additionally, financial types can account for the inventory and expense of <a href="%1">premiums</a>.{/ts}</p>
|
||||
{capture assign="acctLink"}{crmURL p="civicrm/admin/financial/financialAccount" q="reset=1&action=browse"}{/capture}
|
||||
<p>{ts 1=$acctLink}Each financial type relates to a number of <a href="%1">financial accounts</a> to track income, accounts receivable, and fees.</p>{/ts}
|
||||
</div>
|
||||
|
||||
{if $rows}
|
||||
<div id="ltype">
|
||||
<p></p>
|
||||
<div class="form-item">
|
||||
{strip}
|
||||
{* handle enable/disable actions*}
|
||||
{include file="CRM/common/enableDisableApi.tpl"}
|
||||
{include file="CRM/common/jsortable.tpl"}
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<thead class="sticky">
|
||||
<th>{ts}Name{/ts}</th>
|
||||
<th>{ts}Description{/ts}</th>
|
||||
<th>{ts}Financial Accounts{/ts}</th>
|
||||
<th>{ts}Deductible?{/ts}</th>
|
||||
<th>{ts}Reserved?{/ts}</th>
|
||||
<th>{ts}Enabled?{/ts}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
{foreach from=$rows item=row}
|
||||
<tr id="financial_type-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
|
||||
<td class="crm-editable" data-field="name">{$row.name}</td>
|
||||
<td class="crm-editable" data-field="description" data-type="textarea">{$row.description}</td>
|
||||
<td>{$row.financial_account}</td>
|
||||
<td class="crm-editable" data-field="is_deductible" data-type="boolean">{if $row.is_deductible eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{$row.action|replace:'xx':$row.id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}None found.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
{crmButton q="action=add&reset=1" id="newFinancialType" icon="plus-circle"}{ts}Add Financial Type{/ts}{/crmButton}
|
||||
{crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
|
@ -0,0 +1,80 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{if $action eq 1 or $action eq 2 or $action eq 8}
|
||||
{include file="CRM/Financial/Form/FinancialTypeAccount.tpl"}
|
||||
{else}
|
||||
{if $rows}
|
||||
<div id="ltype">
|
||||
<div class="form-item">
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
{crmButton q="action=add&reset=1&aid=$aid" id="newfinancialTypeAccount" icon="plus-circle"}{ts}Assign Account{/ts}{/crmButton}
|
||||
{crmButton p="civicrm/admin/financial/financialType" q="action=update&id=`$aid`&reset=1" icon="pencil"}{ts}Edit Financial Type{/ts}{/crmButton}
|
||||
</div>
|
||||
{/if}
|
||||
{strip}
|
||||
{* handle enable/disable actions*}
|
||||
{include file="CRM/common/enableDisableApi.tpl"}
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<thead class="sticky">
|
||||
<th>{ts}Relationship{/ts}</th>
|
||||
<th>{ts}Financial Account{/ts}</th>
|
||||
<th>{ts}Accounting Code{/ts}</th>
|
||||
<th>{ts}Account Type (Code){/ts}</th>
|
||||
<th>{ts}Owned By{/ts}</th>
|
||||
<th>{ts}Is Active?{/ts}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
{foreach from=$rows item=row}
|
||||
<tr id="row_{$row.id}"class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
|
||||
<td>{$row.account_relationship}</td>
|
||||
<td>{$row.financial_account}</td>
|
||||
<td>{$row.accounting_code}</td>
|
||||
<td>{$row.financial_account_type}{if $row.account_type_code} ({$row.account_type_code}){/if}</td>
|
||||
<td>{$row.owned_by}</td>
|
||||
<td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
|
||||
<td>{$row.action|replace:'xx':$row.id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
{if $action ne 1 and $action ne 2}
|
||||
<div class="action-link">
|
||||
{crmButton q="action=add&reset=1&aid=$aid" id="newfinancialTypeAccount" icon="plus-circle"}{ts}Assign Account{/ts}{/crmButton}
|
||||
{crmButton p="civicrm/admin/financial/financialType" q="action=update&id=`$aid`&reset=1" icon="pencil"}{ts}Edit Financial Type{/ts}{/crmButton}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{capture assign=crmURL}{crmURL q="action=add&reset=1&aid=$aid"}{/capture}
|
||||
{ts 1=$crmURL}There are no financial accounts assigned to this financial type. You can <a href='%1'>assign one</a>.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
Loading…
Add table
Add a link
Reference in a new issue