]> git.ktnx.net Git - mobile-ledger-staging.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java
NT: new rules for determining whether transaction can be submitted (not quite finished)
[mobile-ledger-staging.git] / app / src / main / java / net / ktnx / mobileledger / model / LedgerTransactionAccount.java
index 4a83b185a00ac7da9046244fc1efd7b26762753b..28931b8c63d8353fbaa0d26dd15d0ae16054159e 100644 (file)
@@ -26,18 +26,21 @@ public class LedgerTransactionAccount {
     private boolean amountSet = false;
     private String currency;
     private String comment;
-    public LedgerTransactionAccount(String accountName, float amount) {
-        this(accountName, amount, null);
-    }
-    public LedgerTransactionAccount(String accountName, float amount, String currency) {
+    public LedgerTransactionAccount(String accountName, float amount, String currency,
+                                    String comment) {
         this.setAccountName(accountName);
         this.amount = amount;
         this.amountSet = true;
         this.currency = currency;
+        this.comment = comment;
     }
     public LedgerTransactionAccount(String accountName) {
         this.accountName = accountName;
     }
+    public LedgerTransactionAccount(String accountName, String currency) {
+        this.accountName = accountName;
+        this.currency = currency;
+    }
     public LedgerTransactionAccount(LedgerTransactionAccount origin) {
         // copy constructor
         setAccountName(origin.getAccountName());
@@ -68,22 +71,22 @@ public class LedgerTransactionAccount {
 
         return amount;
     }
-
     public void setAmount(float account_amount) {
         this.amount = account_amount;
         this.amountSet = true;
     }
-
     public void resetAmount() {
         this.amountSet = false;
     }
-
     public boolean isAmountSet() {
         return amountSet;
     }
     public String getCurrency() {
         return currency;
     }
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
     @NonNull
     public String toString() {
         if (!amountSet)