BrightSide Workbench Full Report + Source Code
org.turro.financials.treasury.m303.Item349 Class Reference
Inheritance diagram for org.turro.financials.treasury.m303.Item349:
Collaboration diagram for org.turro.financials.treasury.m303.Item349:

Public Member Functions

 Item349 (String name)
 
void addAmounts (Register r, String opAcc)
 
int compareTo (Item349 o)
 

Static Public Member Functions

static String getName (Register r)
 

Public Attributes

String name
 
double amount [] = new double[2]
 

Detailed Description

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

Definition at line 31 of file Item349.java.

Constructor & Destructor Documentation

◆ Item349()

org.turro.financials.treasury.m303.Item349.Item349 ( String  name)

Definition at line 36 of file Item349.java.

36  {
37  this.name = name;
38  }

Member Function Documentation

◆ addAmounts()

void org.turro.financials.treasury.m303.Item349.addAmounts ( Register  r,
String  opAcc 
)

Definition at line 40 of file Item349.java.

40  {
41  for(RegisterEntry re : r.getRegisterEntries()) {
42  Account acc = re.getAccount();
43  if(acc.getId().matches(opAcc.replaceAll("_", ".").replaceAll("%", ".*"))) {
44  if(acc.getId().startsWith("60") || acc.getId().startsWith("70")) {
45  amount[0] += Zero.near(re.getCredit(), 2) ? re.getDebit() : re.getCredit();
46  } else {
47  amount[1] += Zero.near(re.getCredit(), 2) ? re.getDebit() : re.getCredit();
48  }
49  }
50  }
51  }
Here is the call graph for this function:

◆ compareTo()

int org.turro.financials.treasury.m303.Item349.compareTo ( Item349  o)

Definition at line 72 of file Item349.java.

72  {
73  return CompareUtil.compare(name, o.name);
74  }

◆ getName()

static String org.turro.financials.treasury.m303.Item349.getName ( Register  r)
static

Definition at line 53 of file Item349.java.

53  {
54  for(RegisterEntry re : r.getRegisterEntries()) {
55  Account acc = re.getAccount();
56  if(isAccountName(acc)) {
57  return acc.getDescription();
58  }
59  }
60  return null;
61  }
Here is the call graph for this function:

Member Data Documentation

◆ amount

double org.turro.financials.treasury.m303.Item349.amount[] = new double[2]

Definition at line 34 of file Item349.java.

◆ name

String org.turro.financials.treasury.m303.Item349.name

Definition at line 33 of file Item349.java.


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