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;