]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java
support both 1.14 and 1.15 JSON APIs
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / LedgerTransactionAccount.java
index 801e0169845f8c2ff2daedb06177eec7d62ba3d6..89d6a83a5d3c935ce98b0dcaa65c8d82fa0b6410 100644 (file)
@@ -19,13 +19,6 @@ package net.ktnx.mobileledger.model;
 
 import androidx.annotation.NonNull;
 
-import net.ktnx.mobileledger.json.ParsedAmount;
-import net.ktnx.mobileledger.json.ParsedPosting;
-import net.ktnx.mobileledger.json.ParsedQuantity;
-import net.ktnx.mobileledger.json.ParsedStyle;
-
-import java.util.ArrayList;
-
 public class LedgerTransactionAccount {
     private String accountName;
     private String shortAccountName;
@@ -100,25 +93,4 @@ public class LedgerTransactionAccount {
 
         return sb.toString();
     }
-    public ParsedPosting asParsedPosting() {
-        ParsedPosting result = new ParsedPosting();
-        result.setPaccount(accountName);
-        ArrayList<ParsedAmount> amounts = new ArrayList<>();
-        ParsedAmount amt = new ParsedAmount();
-        amt.setAcommodity((currency == null) ? "" : currency);
-        amt.setAismultiplier(false);
-        ParsedQuantity qty = new ParsedQuantity();
-        qty.setDecimalPlaces(2);
-        qty.setDecimalMantissa(Math.round(amount * 100));
-        amt.setAquantity(qty);
-        ParsedStyle style = new ParsedStyle();
-        style.setAscommodityside('L');
-        style.setAscommodityspaced(false);
-        style.setAsprecision(2);
-        style.setAsdecimalpoint('.');
-        amt.setAstyle(style);
-        amounts.add(amt);
-        result.setPamount(amounts);
-        return result;
-    }
 }