There is a change in 1.19.1 that breaks the parser (precision member
changed from plain number to an object). While modifying the parser to
be able to try different versions of the API is possible, it is quite a
task, and by simple omission of 'astyle' members the parser library
ignores the incoming data.
This (not providing 'astyle') also seems to work when adding new
transactions, at least with hledger-web 1.16.2
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2020 Damyan Ivanov.
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
private String acommodity;
private ParsedQuantity aquantity;
private boolean aismultiplier;
private String acommodity;
private ParsedQuantity aquantity;
private boolean aismultiplier;
- private ParsedStyle astyle;
private ParsedPrice aprice;
public ParsedAmount() {
}
private ParsedPrice aprice;
public ParsedAmount() {
}
public void setAismultiplier(boolean aismultiplier) {
this.aismultiplier = aismultiplier;
}
public void setAismultiplier(boolean aismultiplier) {
this.aismultiplier = aismultiplier;
}
- public ParsedStyle getAstyle() {
- return astyle;
- }
- public void setAstyle(ParsedStyle astyle) {
- this.astyle = astyle;
- }
-
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2020 Damyan Ivanov.
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
public class ParsedBalance {
private ParsedQuantity aquantity;
private String acommodity;
public class ParsedBalance {
private ParsedQuantity aquantity;
private String acommodity;
- private ParsedStyle astyle;
public ParsedBalance() {
}
public ParsedQuantity getAquantity() {
public ParsedBalance() {
}
public ParsedQuantity getAquantity() {
public void setAcommodity(String acommodity) {
this.acommodity = acommodity;
}
public void setAcommodity(String acommodity) {
this.acommodity = acommodity;
}
- public ParsedStyle getAstyle() {
- return astyle;
- }
- public void setAstyle(ParsedStyle astyle) {
- this.astyle = astyle;
- }
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2020 Damyan Ivanov.
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
qty.setDecimalPlaces(2);
qty.setDecimalMantissa(Math.round(acc.getAmount() * 100));
amt.setAquantity(qty);
qty.setDecimalPlaces(2);
qty.setDecimalMantissa(Math.round(acc.getAmount() * 100));
amt.setAquantity(qty);
- ParsedStyle style = new ParsedStyle();
- style.setAscommodityside(getCommoditySide());
- style.setAscommodityspaced(getCommoditySpaced());
- style.setAsprecision(2);
- style.setAsdecimalpoint('.');
- amt.setAstyle(style);
if (acc.getCurrency() != null)
amt.setAcommodity(acc.getCurrency());
amounts.add(amt);
if (acc.getCurrency() != null)
amt.setAcommodity(acc.getCurrency());
amounts.add(amt);
private ParsedQuantity aquantity;
private String acommodity;
private boolean aismultiplier;
private ParsedQuantity aquantity;
private String acommodity;
private boolean aismultiplier;
- private ParsedStyle astyle;
public Contents() {
acommodity = "";
}
public Contents() {
acommodity = "";
}
public void setAismultiplier(boolean aismultiplier) {
this.aismultiplier = aismultiplier;
}
public void setAismultiplier(boolean aismultiplier) {
this.aismultiplier = aismultiplier;
}
- public ParsedStyle getAstyle() {
- return astyle;
- }
- public void setAstyle(ParsedStyle astyle) {
- this.astyle = astyle;
- }