Skip to content

Commit

Permalink
fix(journal): zero new transaction lines debit and credit fields (#1577)
Browse files Browse the repository at this point in the history
This commit zeroes out the `debit`, `credit`, `debit_equiv`, and `credit_equiv` fields of a new transaction line by default.
  • Loading branch information
lomamech authored and jniles committed May 3, 2017
1 parent 55ed68a commit 6a3cbe5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/src/js/services/grid/TransactionService.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ function TransactionService($timeout, util, uiGridConstants, bhConstants, Notify
var transactionRow = cloneAttributes(this._entity, TRANSACTION_SHARED_ATTRIBUTES);
transactionRow.uuid = uuid();

//Set zero to a new line of a transaction in the debit, credit, debit_equiv, credit_equiv fields.
transactionRow.debit = 0;
transactionRow.credit = 0;
transactionRow.debit_equiv = 0;
transactionRow.credit_equiv = 0;

// keep track of new rows in newRows array
this._entity.newRows.post(transactionRow);

Expand Down

0 comments on commit 6a3cbe5

Please sign in to comment.