}
public void setTindex(int tindex) {
this.tindex = tindex;
- for(ParsedPosting p : tpostings) {
- p.setPtransaction_(tindex);
- }
+ if (tpostings != null)
+ for (ParsedPosting p : tpostings) {
+ p.setPtransaction_(tindex);
+ }
}
public List<ParsedPosting> getTpostings() {
return tpostings;
}
+ public void setTpostings(List<ParsedPosting> tpostings) {
+ this.tpostings = tpostings;
+ }
public void addPosting(ParsedPosting posting) {
posting.setPtransaction_(tindex);
tpostings.add(posting);
}
- public void setTpostings(List<ParsedPosting> tpostings) {
- this.tpostings = tpostings;
- }
public LedgerTransaction asLedgerTransaction() throws ParseException {
Date date = Globals.parseIsoDate(tdate);
LedgerTransaction tr = new LedgerTransaction(tindex, date, tdescription);