]> git.ktnx.net Git - mobile-ledger-staging.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/Currency.java
helper method for loading a currency by name
[mobile-ledger-staging.git] / app / src / main / java / net / ktnx / mobileledger / model / Currency.java
index a4854c05219c146608326b1acf8f2556f5aebd25..3cb70f8bd6cec7ea199a4d81f9bfdcf17828a4c2 100644 (file)
@@ -79,6 +79,10 @@ public class Currency {
         this.position = position;
         this.hasGap = hasGap;
     }
+    public static Currency loadByName(String name) {
+        MobileLedgerProfile profile = Data.profile.getValue();
+        return profile.loadCurrencyByName(name);
+    }
     public int getId() {
         return id;
     }