BrightSide Workbench Full Report + Source Code
org.turro.financials.account.logic.StatementEntry Class Reference
Inheritance diagram for org.turro.financials.account.logic.StatementEntry:
Collaboration diagram for org.turro.financials.account.logic.StatementEntry:

Public Member Functions

 StatementEntry (RegisterEntry entry)
 
String getId ()
 
double getBalance ()
 
double getCredit ()
 
double getDebit ()
 
Date getDate ()
 
long getOrder ()
 
String getAccount ()
 
String getDescription ()
 
String getConcept ()
 
RegisterView getView ()
 
RegisterEntry getEntry ()
 
Register getRegister ()
 
Document getDocument ()
 
void setInheritedBalance (double inheritedBalance)
 
boolean isConciliated ()
 
void setConciliated (boolean value)
 
boolean isBank ()
 
int compareTo (StatementEntry o)
 

Protected Attributes

double balance
 
RegisterEntry entry
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 34 of file StatementEntry.java.

Constructor & Destructor Documentation

◆ StatementEntry()

org.turro.financials.account.logic.StatementEntry.StatementEntry ( RegisterEntry  entry)

Definition at line 39 of file StatementEntry.java.

39  {
40  this.entry = entry;
41  }

Member Function Documentation

◆ compareTo()

int org.turro.financials.account.logic.StatementEntry.compareTo ( StatementEntry  o)

Definition at line 160 of file StatementEntry.java.

160  {
161  if(this instanceof StatementFirst) {
162  return -1;
163  } else if(o instanceof StatementFirst) {
164  return 1;
165  }
166  int r = getDate().compareTo(o.getDate());
167  if(r == 0) {
168  r = CompareUtil.compare(getOrder(), o.getOrder());
169  }
170  if(r == 0) {
171  r = getAccount().compareTo(o.getAccount());
172  }
173  if(entry != null) {
174  if(r == 0) {
175  r = Long.valueOf(entry.getRegister().getIdRegister()).compareTo(
176  o.entry.getRegister().getIdRegister());
177  }
178  }
179  if(r == 0) {
180  r = getId().compareTo(o.getId());
181  }
182  return r;
183  }
Here is the call graph for this function:

◆ getAccount()

String org.turro.financials.account.logic.StatementEntry.getAccount ( )

Reimplemented in org.turro.financials.account.logic.StatementFirst, and org.turro.financials.account.logic.BankEntry.

Definition at line 79 of file StatementEntry.java.

79  {
80  if(entry != null) {
81  return entry.getAccount().getId();
82  }
83  return null;
84  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBalance()

double org.turro.financials.account.logic.StatementEntry.getBalance ( )

Reimplemented in org.turro.financials.account.logic.StatementFirst, and org.turro.financials.account.logic.BankEntry.

Definition at line 50 of file StatementEntry.java.

Here is the call graph for this function:

◆ getConcept()

String org.turro.financials.account.logic.StatementEntry.getConcept ( )

Reimplemented in org.turro.financials.account.logic.StatementFirst, and org.turro.financials.account.logic.BankEntry.

Definition at line 97 of file StatementEntry.java.

97  {
98  if(entry != null) {
99  PhraseBuilder sb = new PhraseBuilder(entry.getConcept());
100  Document document = entry.getRegister().getDocument();
101  if(document != null) {
102  sb.addWord("(");
103  sb.addWord(document.getDocumentDefinition().getName());
104  sb.addWord(document.getDocumentNumber());
105  sb.addWord(")", false);
106  }
107  return sb.toString();
108  }
109  return null;
110  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCredit()

double org.turro.financials.account.logic.StatementEntry.getCredit ( )

Reimplemented in org.turro.financials.account.logic.StatementFirst, and org.turro.financials.account.logic.BankEntry.

Definition at line 54 of file StatementEntry.java.

54  {
55  if(entry != null) {
56  return entry.getCredit();
57  }
58  return 0.0;
59  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDate()

Date org.turro.financials.account.logic.StatementEntry.getDate ( )

Reimplemented in org.turro.financials.account.logic.StatementFirst, and org.turro.financials.account.logic.BankEntry.

Definition at line 68 of file StatementEntry.java.

68  {
69  if(entry != null) {
71  }
72  return null;
73  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDebit()

double org.turro.financials.account.logic.StatementEntry.getDebit ( )

Reimplemented in org.turro.financials.account.logic.StatementFirst, and org.turro.financials.account.logic.BankEntry.

Definition at line 61 of file StatementEntry.java.

61  {
62  if(entry != null) {
63  return entry.getDebit();
64  }
65  return 0.0;
66  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDescription()

String org.turro.financials.account.logic.StatementEntry.getDescription ( )

Reimplemented in org.turro.financials.account.logic.StatementFirst, and org.turro.financials.account.logic.BankEntry.

Definition at line 86 of file StatementEntry.java.

86  {
87  if(entry != null && entry.getAccount() != null) {
88  MajorAccount ma = entry.getAccount().getParent();
89  return entry.getAccount().getDescription() + " " +
90  getConcept() +
91  (ma != null ? " - " + ma.getDescription() : "");
92  }
93  return null;
94  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDocument()

Document org.turro.financials.account.logic.StatementEntry.getDocument ( )

Definition at line 130 of file StatementEntry.java.

130  {
131  if(getRegister() != null) {
132  return getRegister().getDocument();
133  }
134  return null;
135  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEntry()

RegisterEntry org.turro.financials.account.logic.StatementEntry.getEntry ( )

Definition at line 119 of file StatementEntry.java.

119  {
120  return entry;
121  }

◆ getId()

String org.turro.financials.account.logic.StatementEntry.getId ( )

Reimplemented in org.turro.financials.account.logic.StatementFirst, and org.turro.financials.account.logic.BankEntry.

Definition at line 43 of file StatementEntry.java.

43  {
44  if(entry != null) {
45  return "99" + entry.getId();
46  }
47  return null;
48  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOrder()

long org.turro.financials.account.logic.StatementEntry.getOrder ( )

Reimplemented in org.turro.financials.account.logic.BankEntry.

Definition at line 75 of file StatementEntry.java.

75  {
76  return 0;
77  }
Here is the caller graph for this function:

◆ getRegister()

Register org.turro.financials.account.logic.StatementEntry.getRegister ( )

Definition at line 123 of file StatementEntry.java.

123  {
124  if(entry != null) {
125  return entry.getRegister();
126  }
127  return null;
128  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getView()

RegisterView org.turro.financials.account.logic.StatementEntry.getView ( )

Reimplemented in org.turro.financials.account.logic.StatementFirst, and org.turro.financials.account.logic.BankEntry.

Definition at line 112 of file StatementEntry.java.

112  {
113  if(entry != null) {
114  return entry.getRegister().getView();
115  }
116  return null;
117  }
Here is the call graph for this function:

◆ isBank()

boolean org.turro.financials.account.logic.StatementEntry.isBank ( )

Definition at line 155 of file StatementEntry.java.

155  {
156  return false;
157  }

◆ isConciliated()

boolean org.turro.financials.account.logic.StatementEntry.isConciliated ( )

Definition at line 141 of file StatementEntry.java.

141  {
142  if(entry != null) {
143  return entry.isConciliated();
144  }
145  return false;
146  }
Here is the call graph for this function:

◆ setConciliated()

void org.turro.financials.account.logic.StatementEntry.setConciliated ( boolean  value)

Definition at line 148 of file StatementEntry.java.

148  {
149  if(entry != null) {
150  entry.setConciliated(value);
151  new FinancialsPU().saveObject(entry);
152  }
153  }
void setConciliated(boolean conciliated)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setInheritedBalance()

void org.turro.financials.account.logic.StatementEntry.setInheritedBalance ( double  inheritedBalance)

Definition at line 137 of file StatementEntry.java.

137  {
138  this.inheritedBalance = inheritedBalance;
139  }
Here is the caller graph for this function:

Member Data Documentation

◆ balance

double org.turro.financials.account.logic.StatementEntry.balance
protected

Definition at line 36 of file StatementEntry.java.

◆ entry

RegisterEntry org.turro.financials.account.logic.StatementEntry.entry
protected

Definition at line 37 of file StatementEntry.java.


The documentation for this class was generated from the following file: