Skip to content

Firefly III: a personal finances manager

Fix #12859

James Cole60921355cec1
diff --git a/changelog.md b/changelog.md
index 2d1646f026..2e94cd0134 100644
--- a/changelog.md
+++ b/changelog.md
@@ -33,6 +33,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- #12824
- #12825
- #12851
+- #12859
### Security
diff --git a/resources/assets/v3/js/pages/transactions/shared/detect-transaction-type.js b/resources/assets/v3/js/pages/transactions/shared/detect-transaction-type.js
index 711775196c..54852deca1 100644
--- a/resources/assets/v3/js/pages/transactions/shared/detect-transaction-type.js
+++ b/resources/assets/v3/js/pages/transactions/shared/detect-transaction-type.js
@@ -50,7 +50,7 @@ export function detectTransactionType() {
this.disableSplitInputs();
return;
}
- if ("Asset account" === sourceType && "unknown" === destType) {
+ if (["Asset account", "Loan", "Debt", "Mortgage"].includes(sourceType) && "unknown" === destType) {
this.groupProperties.transactionType = "withdrawal";
console.log('[b] Transaction type is detected to be "' + this.groupProperties.transactionType + '".');
this.determineAmountCurrency(this.entries[0].source_account.account_currency_code);