From 8e8cc7848981cf3e4634e7aa075dec4c970e6bb2 Mon Sep 17 00:00:00 2001 From: tanshu Date: Tue, 11 Aug 2015 17:01:01 +0530 Subject: [PATCH] Fix: Dr/Cr did not show in Journal Voucher because of Type error with the debit filter. --- brewman/static/scripts/journal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brewman/static/scripts/journal.js b/brewman/static/scripts/journal.js index 7e61c3fc..da2e6684 100644 --- a/brewman/static/scripts/journal.js +++ b/brewman/static/scripts/journal.js @@ -4,7 +4,7 @@ var JournalController = ['$scope', '$location', 'asDateFilter', '$modal', 'uploa $scope.foAccount = true; $scope.voucher = voucher; - $scope.debit = 1; + $scope.debit = "1"; function getOld(ledgerID, journals) { return _.find(journals, function (journal) { return journal.Ledger.LedgerID === ledgerID; @@ -49,7 +49,7 @@ var JournalController = ['$scope', '$location', 'asDateFilter', '$modal', 'uploa oldJournal.Amount = amount; } } else { - $scope.voucher.Journals.push({Debit: $scope.debit, Amount: Number($scope.amount), Ledger: $scope.account}); + $scope.voucher.Journals.push({Debit: parseInt($scope.debit), Amount: Number($scope.amount), Ledger: $scope.account}); } delete $scope.account; delete $scope.amount;