Deposit works as well.

This commit is contained in:
James Cole
2017-04-14 14:48:44 +02:00
parent c33dd1ecee
commit bd917f6484
4 changed files with 18 additions and 1 deletions

View File

@@ -261,5 +261,8 @@ function getAccountId() {
if(what === "withdrawal") {
return $('select[name="source_account_id"]').val();
}
if(what === "deposit") {
return $('select[name="destination_account_id"]').val();
}
alert('Cannot handle ' + what);
}

View File

@@ -60,6 +60,7 @@ $(document).ready(function () {
});
$('.currency-option').on('click', triggerCurrencyChange);
$('#ffInput_amount').on('change', getExchangeRate);
// always update the exchanged_amount to match the correct currency
var journalCurrency = currencyInfo[journal.transaction_currency_id].symbol;
@@ -135,5 +136,9 @@ function getAccountId() {
if(journal.transaction_type.type === "Withdrawal") {
return $('select[name="source_account_id"]').val();
}
if(journal.transaction_type.type === "Deposit") {
return $('select[name="destination_account_id"]').val();
}
alert('Cannot handle ' + journal.transaction_type.type);
}