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

Public Member Functions

long getId ()
 
void setId (long id)
 
ContractFlow getContractFlow ()
 
void setContractFlow (ContractFlow contractFlow)
 
DocumentDefinition getDocumentDefinition ()
 
void setDocumentDefinition (DocumentDefinition documentDefinition)
 
LineType getLineType ()
 
void setLineType (LineType lineType)
 
String getConcept ()
 
void setConcept (String concept)
 
int getDaysToAdd ()
 
void setDaysToAdd (int daysToAdd)
 
Set< Integer > getDaysOfMonth ()
 
void setDaysOfMonth (Set< Integer > daysOfMonth)
 
int getDayOfWeek ()
 
void setDayOfWeek (int dayOfWeek)
 
Set< Integer > getExcludedMonths ()
 
void setExcludedMonths (Set< Integer > excludedMonths)
 
double getPercentValue ()
 
void setPercentValue (double percentValue)
 
double getAmountValue ()
 
void setAmountValue (double amountValue)
 
Object entityId ()
 
boolean isEmpty ()
 
double generateFlow (Document document, double pendingAmount, int count)
 
double appendAmount (Document source, Document destination, Contract store, double pendingAmount)
 
- Public Member Functions inherited from org.turro.jpa.entity.IDaoEntity
default boolean isNew ()
 
default void prepareSave ()
 
default void prepareDelete ()
 
default void removeEmpties ()
 
default Collection< Collection > collections ()
 

Detailed Description

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

Definition at line 46 of file ContractExpiry.java.

Member Function Documentation

◆ appendAmount()

double org.turro.financials.entity.ContractExpiry.appendAmount ( Document  source,
Document  destination,
Contract  store,
double  pendingAmount 
)

Definition at line 230 of file ContractExpiry.java.

230  {
231  int count = 0;
232  if(documentDefinition.hasColumn(DocumentColumn.DCOL_TAX)) {
233  for(AmountTaxable at : source.getAmounts().getTaxables()) {
234  DocumentLine dl = new DocumentLine();
235  dl.setDocument(destination);
236  if(concept != null) {
237  dl.setConcept(concept + " [" + at.getTax() + "]");
238  }
239  pendingAmount = assignAmount(dl, getAmount(at.getAmount()), pendingAmount);
240  dl.setTax(at.getTax());
241  dl.setLineType(lineType);
242  dl.setContractPreference(source.getDefaultContractPreference());
243  dl.setStore(store);
244  dl.setLineOrder(count++);
245  destination.getDocumentLines().add(dl);
246  }
247  } else {
248  DocumentLine dl = new DocumentLine();
249  dl.setDocument(destination);
250  if(concept != null) {
251  dl.setConcept(concept);
252  }
253  pendingAmount = assignAmount(dl, getAmount(source.getTotalAmount()), pendingAmount);
254  dl.setLineType(lineType);
255  dl.setContractPreference(source.getDefaultContractPreference());
256  dl.setStore(store);
257  dl.setLineOrder(count++);
258  destination.getDocumentLines().add(dl);
259  }
260  return pendingAmount;
261  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ entityId()

Object org.turro.financials.entity.ContractExpiry.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 165 of file ContractExpiry.java.

165  {
166  return id;
167  }

◆ generateFlow()

double org.turro.financials.entity.ContractExpiry.generateFlow ( Document  document,
double  pendingAmount,
int  count 
)

Definition at line 177 of file ContractExpiry.java.

177  {
178  Document ndoc = new Document();
179  ndoc.setDocumentDate(newDate(document.getDocumentDate()));
180  ndoc.setContract(document.getContract());
181  ndoc.setCurrency(document.getCurrency());
182  ndoc.setDocumentNumber(document.getDocumentNumber() + "/" + count);
183  ndoc.setReceiptDate(ndoc.getDocumentDate());
184  ndoc.setDocumentDefinition(documentDefinition);
185  ndoc.setDraft(document.isDraft());
186  ndoc.setNotes(document.getNotes());
187  pendingAmount = appendAmount(document, ndoc, getStore(ndoc), pendingAmount);
188  DocumentRelation dr = new DocumentRelation();
189  dr.setAncestor(document);
190  dr.setDescendant(ndoc);
191  document.getDescendants().add(dr);
192  return pendingAmount;
193  }
double appendAmount(Document source, Document destination, Contract store, double pendingAmount)
Here is the call graph for this function:

◆ getAmountValue()

double org.turro.financials.entity.ContractExpiry.getAmountValue ( )

Definition at line 154 of file ContractExpiry.java.

154  {
155  return amountValue;
156  }

◆ getConcept()

String org.turro.financials.entity.ContractExpiry.getConcept ( )

Definition at line 106 of file ContractExpiry.java.

106  {
107  return concept;
108  }

◆ getContractFlow()

ContractFlow org.turro.financials.entity.ContractExpiry.getContractFlow ( )

Definition at line 82 of file ContractExpiry.java.

82  {
83  return contractFlow;
84  }

◆ getDayOfWeek()

int org.turro.financials.entity.ContractExpiry.getDayOfWeek ( )

Definition at line 130 of file ContractExpiry.java.

130  {
131  return dayOfWeek;
132  }

◆ getDaysOfMonth()

Set<Integer> org.turro.financials.entity.ContractExpiry.getDaysOfMonth ( )

Definition at line 122 of file ContractExpiry.java.

122  {
123  return daysOfMonth;
124  }

◆ getDaysToAdd()

int org.turro.financials.entity.ContractExpiry.getDaysToAdd ( )

Definition at line 114 of file ContractExpiry.java.

114  {
115  return daysToAdd;
116  }

◆ getDocumentDefinition()

DocumentDefinition org.turro.financials.entity.ContractExpiry.getDocumentDefinition ( )

Definition at line 90 of file ContractExpiry.java.

90  {
91  return documentDefinition;
92  }
Here is the caller graph for this function:

◆ getExcludedMonths()

Set<Integer> org.turro.financials.entity.ContractExpiry.getExcludedMonths ( )

Definition at line 138 of file ContractExpiry.java.

138  {
139  return excludedMonths;
140  }

◆ getId()

long org.turro.financials.entity.ContractExpiry.getId ( )

Definition at line 74 of file ContractExpiry.java.

74  {
75  return id;
76  }

◆ getLineType()

LineType org.turro.financials.entity.ContractExpiry.getLineType ( )

Definition at line 98 of file ContractExpiry.java.

98  {
99  return lineType;
100  }

◆ getPercentValue()

double org.turro.financials.entity.ContractExpiry.getPercentValue ( )

Definition at line 146 of file ContractExpiry.java.

146  {
147  return percentValue;
148  }

◆ isEmpty()

boolean org.turro.financials.entity.ContractExpiry.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 170 of file ContractExpiry.java.

170  {
171  return documentDefinition == null ||
172  (percentValue == 0.0d && amountValue == 0.0d);
173  }
Here is the caller graph for this function:

◆ setAmountValue()

void org.turro.financials.entity.ContractExpiry.setAmountValue ( double  amountValue)

Definition at line 158 of file ContractExpiry.java.

158  {
159  this.amountValue = amountValue;
160  }

◆ setConcept()

void org.turro.financials.entity.ContractExpiry.setConcept ( String  concept)

Definition at line 110 of file ContractExpiry.java.

110  {
111  this.concept = concept;
112  }

◆ setContractFlow()

void org.turro.financials.entity.ContractExpiry.setContractFlow ( ContractFlow  contractFlow)

Definition at line 86 of file ContractExpiry.java.

86  {
87  this.contractFlow = contractFlow;
88  }
Here is the caller graph for this function:

◆ setDayOfWeek()

void org.turro.financials.entity.ContractExpiry.setDayOfWeek ( int  dayOfWeek)

Definition at line 134 of file ContractExpiry.java.

134  {
135  this.dayOfWeek = dayOfWeek;
136  }
Here is the caller graph for this function:

◆ setDaysOfMonth()

void org.turro.financials.entity.ContractExpiry.setDaysOfMonth ( Set< Integer >  daysOfMonth)

Definition at line 126 of file ContractExpiry.java.

126  {
127  this.daysOfMonth = daysOfMonth;
128  }

◆ setDaysToAdd()

void org.turro.financials.entity.ContractExpiry.setDaysToAdd ( int  daysToAdd)

Definition at line 118 of file ContractExpiry.java.

118  {
119  this.daysToAdd = daysToAdd;
120  }

◆ setDocumentDefinition()

void org.turro.financials.entity.ContractExpiry.setDocumentDefinition ( DocumentDefinition  documentDefinition)

Definition at line 94 of file ContractExpiry.java.

94  {
95  this.documentDefinition = documentDefinition;
96  }

◆ setExcludedMonths()

void org.turro.financials.entity.ContractExpiry.setExcludedMonths ( Set< Integer >  excludedMonths)

Definition at line 142 of file ContractExpiry.java.

142  {
143  this.excludedMonths = excludedMonths;
144  }

◆ setId()

void org.turro.financials.entity.ContractExpiry.setId ( long  id)

Definition at line 78 of file ContractExpiry.java.

78  {
79  this.id = id;
80  }

◆ setLineType()

void org.turro.financials.entity.ContractExpiry.setLineType ( LineType  lineType)

Definition at line 102 of file ContractExpiry.java.

102  {
103  this.lineType = lineType;
104  }

◆ setPercentValue()

void org.turro.financials.entity.ContractExpiry.setPercentValue ( double  percentValue)

Definition at line 150 of file ContractExpiry.java.

150  {
151  this.percentValue = percentValue;
152  }

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