Fix: Dr/Cr did not show in Journal Voucher because of Type error with the debit filter.

This commit is contained in:
tanshu 2015-08-11 17:01:01 +05:30
parent 1cc9ba6a01
commit 8e8cc78489

View File

@ -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;