BrightSide Workbench Full Report + Source Code
org.turro.financials.model.document.AmountTaxable Class Reference
Inheritance diagram for org.turro.financials.model.document.AmountTaxable:
Collaboration diagram for org.turro.financials.model.document.AmountTaxable:

Public Member Functions

 AmountTaxable (Double perCent, Double tax, Double req)
 
void add (Double taxValue, Double taxRealValue, Double reqValue, Double amount, Double taxable)
 
boolean isPerCent (Double perCent)
 
void setFractionDigits (int fractionDigits)
 
Double getTax ()
 
Double getReq ()
 
Double getDiscount ()
 
Double getAmount ()
 
Double getTaxable ()
 
Double getTaxAmount ()
 
Double getTaxRealAmount ()
 
Double getReqAmount ()
 
Double getFullTaxAmount ()
 
Double getTotal ()
 
boolean isEmpty ()
 
int hashCode ()
 
boolean equals (Object obj)
 
int compareTo (AmountTaxable o)
 

Detailed Description

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

Definition at line 27 of file AmountTaxable.java.

Constructor & Destructor Documentation

◆ AmountTaxable()

org.turro.financials.model.document.AmountTaxable.AmountTaxable ( Double  perCent,
Double  tax,
Double  req 
)

Definition at line 32 of file AmountTaxable.java.

32  {
33  this.perCent = perCent;
34  this.tax = tax;
35  this.req = req;
36  taxValue = 0.0;
37  taxRealValue = 0.0;
38  reqValue = 0.0;
39  amount = 0.0;
40  taxable = 0.0;
41  }
Here is the caller graph for this function:

Member Function Documentation

◆ add()

void org.turro.financials.model.document.AmountTaxable.add ( Double  taxValue,
Double  taxRealValue,
Double  reqValue,
Double  amount,
Double  taxable 
)

Definition at line 43 of file AmountTaxable.java.

43  {
44  this.taxValue += taxValue;
45  this.taxRealValue += taxRealValue;
46  this.reqValue += reqValue;
47  this.amount += amount;
48  this.taxable += taxable;
49  }
Here is the caller graph for this function:

◆ compareTo()

int org.turro.financials.model.document.AmountTaxable.compareTo ( AmountTaxable  o)

Definition at line 141 of file AmountTaxable.java.

141  {
142  return perCent.compareTo(o.perCent);
143  }

◆ equals()

boolean org.turro.financials.model.document.AmountTaxable.equals ( Object  obj)

Definition at line 126 of file AmountTaxable.java.

126  {
127  if (obj == null) {
128  return false;
129  }
130  if (getClass() != obj.getClass()) {
131  return false;
132  }
133  final AmountTaxable other = (AmountTaxable) obj;
134  if (this.perCent != other.perCent && (this.perCent == null || !this.perCent.equals(other.perCent))) {
135  return false;
136  }
137  return true;
138  }
AmountTaxable(Double perCent, Double tax, Double req)
Here is the call graph for this function:

◆ getAmount()

Double org.turro.financials.model.document.AmountTaxable.getAmount ( )

Definition at line 71 of file AmountTaxable.java.

71  {
72  return amount;
73  }
Here is the caller graph for this function:

◆ getDiscount()

Double org.turro.financials.model.document.AmountTaxable.getDiscount ( )

Definition at line 67 of file AmountTaxable.java.

67  {
68  return new Round(amount - taxable).decimals(fractionDigits).value();
69  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFullTaxAmount()

Double org.turro.financials.model.document.AmountTaxable.getFullTaxAmount ( )

Definition at line 103 of file AmountTaxable.java.

Here is the call graph for this function:

◆ getReq()

Double org.turro.financials.model.document.AmountTaxable.getReq ( )

Definition at line 63 of file AmountTaxable.java.

63  {
64  return req;
65  }
Here is the caller graph for this function:

◆ getReqAmount()

Double org.turro.financials.model.document.AmountTaxable.getReqAmount ( )

Definition at line 95 of file AmountTaxable.java.

95  {
96 // if(req > 0) {
97 // return getFullTaxAmount() - getTaxAmount();
98 // }
99 // return 0.0;
100  return reqValue;
101  }
Here is the caller graph for this function:

◆ getTax()

Double org.turro.financials.model.document.AmountTaxable.getTax ( )

Definition at line 59 of file AmountTaxable.java.

59  {
60  return tax;
61  }
Here is the caller graph for this function:

◆ getTaxable()

Double org.turro.financials.model.document.AmountTaxable.getTaxable ( )

Definition at line 75 of file AmountTaxable.java.

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

◆ getTaxAmount()

Double org.turro.financials.model.document.AmountTaxable.getTaxAmount ( )

Definition at line 79 of file AmountTaxable.java.

79  {
80 // if(tax != 0) {
81 // if(req != 0) {
82 // return new Round(getFullTaxAmount() * tax / perCent).decimals(fractionDigits).value();
83 // } else {
84 // return getFullTaxAmount();
85 // }
86 // }
87 // return 0.0;
88  return taxValue;
89  }
Here is the caller graph for this function:

◆ getTaxRealAmount()

Double org.turro.financials.model.document.AmountTaxable.getTaxRealAmount ( )

Definition at line 91 of file AmountTaxable.java.

91  {
92  return taxRealValue;
93  }
Here is the caller graph for this function:

◆ getTotal()

Double org.turro.financials.model.document.AmountTaxable.getTotal ( )

Definition at line 107 of file AmountTaxable.java.

107  {
108  if(tax == 0.0) {
109  return taxable; // Contract operating modifier was set
110  }
111  return taxable + taxValue;
112  }
Here is the caller graph for this function:

◆ hashCode()

int org.turro.financials.model.document.AmountTaxable.hashCode ( )

Definition at line 119 of file AmountTaxable.java.

119  {
120  int hash = 7;
121  hash = 23 * hash + (this.perCent != null ? this.perCent.hashCode() : 0);
122  return hash;
123  }

◆ isEmpty()

boolean org.turro.financials.model.document.AmountTaxable.isEmpty ( )

Definition at line 114 of file AmountTaxable.java.

114  {
115  return amount == null || amount == 0 || amount.isNaN();
116  }

◆ isPerCent()

boolean org.turro.financials.model.document.AmountTaxable.isPerCent ( Double  perCent)

Definition at line 51 of file AmountTaxable.java.

51  {
52  return this.perCent.equals(perCent);
53  }
Here is the caller graph for this function:

◆ setFractionDigits()

void org.turro.financials.model.document.AmountTaxable.setFractionDigits ( int  fractionDigits)

Definition at line 55 of file AmountTaxable.java.

55  {
56  this.fractionDigits = fractionDigits;
57  }
Here is the caller graph for this function:

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