Skip to content

Commit

Permalink
Improve the label of function and variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lomamech committed Apr 6, 2017
1 parent 6da05db commit 036fc36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/src/js/services/grid/TransactionService.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,12 @@ function TransactionService($timeout, util, uiGridConstants, bhConstants, Notify
* @description
* This method is used to check if a transaction is balanced by their record
*/
function transaction(entity) {
var dataEntity = entity.data.data;
function validateTransaction(entity) {
var transaction = entity.data.data;
var debit = 0,
credit = 0;

dataEntity.forEach(function (row) {
transaction.forEach(function (row) {
debit += Number(row.debit_equiv);
credit += Number(row.credit_equiv);
});
Expand Down Expand Up @@ -561,7 +561,7 @@ function TransactionService($timeout, util, uiGridConstants, bhConstants, Notify
* This function saves all transactions by
*/
Transactions.prototype.save = function save() {
var clientErrors = transaction(this._entity);
var clientErrors = validateTransaction(this._entity);

if(clientErrors){
return $q.reject(clientErrors);
Expand Down

0 comments on commit 036fc36

Please sign in to comment.