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

Public Member Functions

 StatementFirst ()
 
 StatementFirst (double initialDebit, double initialCredit)
 
String getId ()
 
String getAccount ()
 
double getBalance ()
 
double getCredit ()
 
double getDebit ()
 
Date getDate ()
 
String getAccountSearch ()
 
void setAccountSearch (String accountSearch)
 
Date getFromDate ()
 
void setFromDate (Date fromDate)
 
String getDescription ()
 
String getConcept ()
 
RegisterView getView ()
 
void setView (RegisterView view)
 
void refreshData (Dao dao)
 
Date getInitialDate (Dao dao, Date fromDate)
 
- Public Member Functions inherited from org.turro.financials.account.logic.StatementEntry
 StatementEntry (RegisterEntry entry)
 
long getOrder ()
 
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 initialDebit
 
- Protected Attributes inherited from org.turro.financials.account.logic.StatementEntry
double balance
 
RegisterEntry entry
 

Detailed Description

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

Definition at line 30 of file StatementFirst.java.

Constructor & Destructor Documentation

◆ StatementFirst() [1/2]

org.turro.financials.account.logic.StatementFirst.StatementFirst ( )

Definition at line 37 of file StatementFirst.java.

37  {
38  super(null);
39  }

◆ StatementFirst() [2/2]

org.turro.financials.account.logic.StatementFirst.StatementFirst ( double  initialDebit,
double  initialCredit 
)

Definition at line 41 of file StatementFirst.java.

41  {
42  super(null);
44  this.initialCredit = initialCredit;
46  }
Here is the call graph for this function:

Member Function Documentation

◆ getAccount()

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

Reimplemented from org.turro.financials.account.logic.StatementEntry.

Definition at line 54 of file StatementFirst.java.

54  {
55  return I_.get("Accumulated");
56  }
Here is the call graph for this function:

◆ getAccountSearch()

String org.turro.financials.account.logic.StatementFirst.getAccountSearch ( )

Definition at line 78 of file StatementFirst.java.

78  {
79  return accountSearch;
80  }

◆ getBalance()

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

Reimplemented from org.turro.financials.account.logic.StatementEntry.

Definition at line 59 of file StatementFirst.java.

Here is the call graph for this function:

◆ getConcept()

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

Reimplemented from org.turro.financials.account.logic.StatementEntry.

Definition at line 100 of file StatementFirst.java.

100  {
101  return null;
102  }

◆ getCredit()

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

Reimplemented from org.turro.financials.account.logic.StatementEntry.

Definition at line 64 of file StatementFirst.java.

64  {
65  return initialCredit;
66  }
Here is the caller graph for this function:

◆ getDate()

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

Reimplemented from org.turro.financials.account.logic.StatementEntry.

Definition at line 74 of file StatementFirst.java.

Here is the call graph for this function:

◆ getDebit()

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

Reimplemented from org.turro.financials.account.logic.StatementEntry.

Definition at line 69 of file StatementFirst.java.

69  {
70  return initialDebit;
71  }
Here is the caller graph for this function:

◆ getDescription()

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

Reimplemented from org.turro.financials.account.logic.StatementEntry.

Definition at line 95 of file StatementFirst.java.

95  {
96  return null;
97  }

◆ getFromDate()

Date org.turro.financials.account.logic.StatementFirst.getFromDate ( )

Definition at line 86 of file StatementFirst.java.

86  {
87  return fromDate;
88  }
Here is the caller graph for this function:

◆ getId()

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

Reimplemented from org.turro.financials.account.logic.StatementEntry.

Definition at line 49 of file StatementFirst.java.

49  {
50  return "00";
51  }

◆ getInitialDate()

Date org.turro.financials.account.logic.StatementFirst.getInitialDate ( Dao  dao,
Date  fromDate 
)

Definition at line 143 of file StatementFirst.java.

143  {
144  try {
145  return (Date) dao.getSingleResult(
146  "select max(r.registerDate) from Register r " +
147  "where r.registerDate < ? " +
148  "and r.closing = TRUE " +
149  "and day(r.registerDate) = 1 " +
150  "and month(r.registerDate) = 1",
151  new Object[] { fromDate });
152  } catch(NoResultException ex) {
153  return null;
154  }
155  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getView()

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

Reimplemented from org.turro.financials.account.logic.StatementEntry.

Definition at line 105 of file StatementFirst.java.

105  {
106  return view;
107  }

◆ refreshData()

void org.turro.financials.account.logic.StatementFirst.refreshData ( Dao  dao)

Definition at line 113 of file StatementFirst.java.

113  {
114  initialDebit = 0.0;
115  initialCredit = 0.0;
116  Date init = getInitialDate(dao, fromDate);
117  Object[] pars = view != null ?
118  new Object[] {
119  accountSearch.replaceAll("\\*", "%"),
120  fromDate,
121  init,
122  view
123  } :
124  new Object[] {
125  accountSearch.replaceAll("\\*", "%"),
126  fromDate,
127  init
128  };
129  Object[] o = (Object[]) dao.getSingleResult(
130  "select sum(entry.debit), sum(entry.credit) " +
131  "from RegisterEntry as entry " +
132  "where entry.account.id like ? " +
133  "and entry.register.registerDate < ? " +
134  (init != null ? "and entry.register.registerDate >= ? " : "and ? is null ") +
135  (view != null ? "and entry.register.view = ? " : ""),
136  pars);
137  if(o != null && o.length == 2) {
138  initialDebit = (Double) (o[0] == null ? 0.0 : o[0]);
139  initialCredit = (Double) (o[1] == null ? 0.0 : o[1]);
140  }
141  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAccountSearch()

void org.turro.financials.account.logic.StatementFirst.setAccountSearch ( String  accountSearch)

Definition at line 82 of file StatementFirst.java.

82  {
83  this.accountSearch = accountSearch;
84  }
Here is the caller graph for this function:

◆ setFromDate()

void org.turro.financials.account.logic.StatementFirst.setFromDate ( Date  fromDate)

Definition at line 90 of file StatementFirst.java.

90  {
91  this.fromDate = fromDate;
92  }
Here is the caller graph for this function:

◆ setView()

void org.turro.financials.account.logic.StatementFirst.setView ( RegisterView  view)

Definition at line 109 of file StatementFirst.java.

109  {
110  this.view = view;
111  }
Here is the caller graph for this function:

Member Data Documentation

◆ initialDebit

double org.turro.financials.account.logic.StatementFirst.initialDebit
protected

Definition at line 32 of file StatementFirst.java.


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