fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ippez Robert <ippezrob...@gmail.com>
Subject Search Function for GL Accounts
Date Mon, 15 May 2017 09:42:43 GMT
Hi Dev,
Could someone please help me of which resource function i should use to
search for GL Accounts and return GL Code, GL Name for those GL Accounts
where manual entry is enabled.

Ideally, a user enters a GL Code in a text input field and on hitting enter
key (or pressing a search button), it calls for a function named
searchGLAccounts(). Now my challenge is how this searchGLAccounts()
function should be. Here is my sample code

*                      scope.searchGLAccounts = function () {*
* scope.actualGLAccounts = [];*
* scope.searchResults = [];*
* var searchString = scope.searchText;*
* if(searchString != null){*
* searchString = searchString.replace(/(^"|"$)/g, '');*
* var n = searchString.localeCompare(scope.searchText);*
* if(n!=0)*
* {*
* var exactMatch=false;*
* }*
* }*
* resourceFactory.accountCoaResource.get({glCode: searchString, template:
'true'}, function (data) {*
* var result = data;*
* var glaccount = {};*
* glaccount.glAccountId = result.glAccountId;*
* glaccount.name <http://glaccount.name> = result.name
<http://result.name>;*
*                    glaccount.glCode = result.glCode;*
* scope.actualGlAccount.push(glaccount);*
* scope.glaccounts = scope.actualGlAccount.slice(0,1);*
* });*
* }*

Your help on this will be appreciated higly.
Thanks
Regards


-- 
Ippez Roberts

Tel: +256788725408/789643284
Skype ID: ippez.robert1
Email: ippezrobert@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message