BrightSide Workbench Full Report + Source Code
org.turro.financials.cart.CartTaxableSet Class Reference
Inheritance diagram for org.turro.financials.cart.CartTaxableSet:
Collaboration diagram for org.turro.financials.cart.CartTaxableSet:

Public Member Functions

boolean add (Double perCent, Double tax, Double taxValue, Double subtotal, Double taxable)
 
CartTaxable getPercent (Double perCent, Double tax)
 
double getTaxable ()
 
double getTaxAmount ()
 
double getTotal ()
 
void clearEmpty ()
 

Detailed Description

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

Definition at line 28 of file CartTaxableSet.java.

Member Function Documentation

◆ add()

boolean org.turro.financials.cart.CartTaxableSet.add ( Double  perCent,
Double  tax,
Double  taxValue,
Double  subtotal,
Double  taxable 
)

Definition at line 30 of file CartTaxableSet.java.

30  {
31  CartTaxable at = getPercent(perCent, tax);
32  at.add(taxValue, subtotal, taxable);
33  return super.add(at);
34  }
CartTaxable getPercent(Double perCent, Double tax)
Here is the call graph for this function:

◆ clearEmpty()

void org.turro.financials.cart.CartTaxableSet.clearEmpty ( )

Definition at line 69 of file CartTaxableSet.java.

69  {
70  Iterator<CartTaxable> it = iterator();
71  while(it.hasNext()) {
72  if(it.next().isEmpty()) {
73  it.remove();
74  }
75  }
76  }

◆ getPercent()

CartTaxable org.turro.financials.cart.CartTaxableSet.getPercent ( Double  perCent,
Double  tax 
)

Definition at line 36 of file CartTaxableSet.java.

36  {
37  for(CartTaxable at : this) {
38  if(at.isPerCent(perCent)) {
39  return at;
40  }
41  }
42  return new CartTaxable(perCent, tax);
43  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTaxable()

double org.turro.financials.cart.CartTaxableSet.getTaxable ( )

Definition at line 45 of file CartTaxableSet.java.

45  {
46  double amount = 0;
47  for(CartTaxable a : this) {
48  amount += a.getTaxable();
49  }
50  return amount;
51  }
Here is the call graph for this function:

◆ getTaxAmount()

double org.turro.financials.cart.CartTaxableSet.getTaxAmount ( )

Definition at line 53 of file CartTaxableSet.java.

53  {
54  double amount = 0;
55  for(CartTaxable a : this) {
56  amount += a.getTaxAmount();
57  }
58  return amount;
59  }
Here is the call graph for this function:

◆ getTotal()

double org.turro.financials.cart.CartTaxableSet.getTotal ( )

Definition at line 61 of file CartTaxableSet.java.

61  {
62  double amount = 0;
63  for(CartTaxable a : this) {
64  amount += a.getTotal();
65  }
66  return amount;
67  }
Here is the call graph for this function:

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