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

Public Member Functions

double getCost ()
 
void setCost (double cost)
 
double getDedication ()
 
void setDedication (double dedication)
 
String getDescription ()
 
void setDescription (String description)
 
Date getDocumentDate ()
 
void setDocumentDate (Date documentDate)
 
long getDocumentLineId ()
 
void setDocumentLineId (long documentLineId)
 
String getDocumentNumber ()
 
void setDocumentNumber (String documentNumber)
 
double getUnits ()
 
void setUnits (double units)
 
HumanResource getHumanResource ()
 
void setHumanResource (HumanResource humanResource)
 
long getId ()
 
void setId (long id)
 
OrderItem getOrderItem ()
 
void setOrderItem (OrderItem orderItem)
 
String getProductDescription ()
 
void setProductDescription (String productDescription)
 
long getProductId ()
 
void setProductId (long productId)
 
long getProviderId ()
 
void setProviderId (long providerId)
 
long getProviderProductId ()
 
void setProviderProductId (long providerProductId)
 
String getReceptorId ()
 
void setReceptorId (String receptorId)
 
Resource getResource ()
 
void setResource (Resource resource)
 
Date getStartWorking ()
 
void setStartWorking (Date startWorking)
 
double getTax ()
 
void setTax (double tax)
 
DocumentLine getDocumentLine ()
 
void setDocumentLine (DocumentLine documentLine)
 
Product getProduct ()
 
void setProduct (Product product)
 
IProduct getIProduct ()
 
void setIProduct (IProduct product)
 
Contract getProvider ()
 
void setProvider (Contract provider)
 
ProductByContractor getProviderProduct ()
 
void setProviderProduct (ProductByContractor providerProduct)
 
Contact getPetitioner ()
 
void setPetitioner (Contact petitioner)
 
boolean isEmpty ()
 
boolean isProductType ()
 
boolean isHumanResourceType ()
 
boolean isResourceType ()
 
String getName ()
 
String getType ()
 
double getAmount ()
 
Date getWorkDate ()
 
ReceiptStatus getStatus ()
 
ReceiptItem getRelated ()
 
double getRealUnits ()
 

Detailed Description

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

Definition at line 44 of file ReceiptItem.java.

Member Function Documentation

◆ getAmount()

double org.turro.erp.entity.ReceiptItem.getAmount ( )

Definition at line 361 of file ReceiptItem.java.

361  {
362  return cost * units * dedication;
363  }
Here is the caller graph for this function:

◆ getCost()

double org.turro.erp.entity.ReceiptItem.getCost ( )

Definition at line 81 of file ReceiptItem.java.

81  {
82  return cost;
83  }
Here is the caller graph for this function:

◆ getDedication()

double org.turro.erp.entity.ReceiptItem.getDedication ( )

Definition at line 89 of file ReceiptItem.java.

89  {
90  return dedication;
91  }
Here is the caller graph for this function:

◆ getDescription()

String org.turro.erp.entity.ReceiptItem.getDescription ( )

Definition at line 97 of file ReceiptItem.java.

97  {
98  return description;
99  }
Here is the caller graph for this function:

◆ getDocumentDate()

Date org.turro.erp.entity.ReceiptItem.getDocumentDate ( )

Definition at line 105 of file ReceiptItem.java.

105  {
106  return documentDate;
107  }
Here is the caller graph for this function:

◆ getDocumentLine()

DocumentLine org.turro.erp.entity.ReceiptItem.getDocumentLine ( )

Definition at line 235 of file ReceiptItem.java.

235  {
236  return documentLine.getEntity(documentLineId);
237  }

◆ getDocumentLineId()

long org.turro.erp.entity.ReceiptItem.getDocumentLineId ( )

Definition at line 113 of file ReceiptItem.java.

113  {
114  return documentLineId;
115  }

◆ getDocumentNumber()

String org.turro.erp.entity.ReceiptItem.getDocumentNumber ( )

Definition at line 121 of file ReceiptItem.java.

121  {
122  return documentNumber;
123  }
Here is the caller graph for this function:

◆ getHumanResource()

HumanResource org.turro.erp.entity.ReceiptItem.getHumanResource ( )

Definition at line 137 of file ReceiptItem.java.

137  {
138  return humanResource;
139  }
Here is the caller graph for this function:

◆ getId()

long org.turro.erp.entity.ReceiptItem.getId ( )

Definition at line 145 of file ReceiptItem.java.

145  {
146  return id;
147  }
Here is the caller graph for this function:

◆ getIProduct()

IProduct org.turro.erp.entity.ReceiptItem.getIProduct ( )

Definition at line 261 of file ReceiptItem.java.

261  {
262  return iproduct.getIProduct(new IProductKey(productId, providerId, providerProductId, productDescription));
263  }
IProduct getIProduct(IProductKey productKey)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getName()

String org.turro.erp.entity.ReceiptItem.getName ( )

Definition at line 340 of file ReceiptItem.java.

340  {
341  if(humanResource != null) {
342  return humanResource.getName();
343  } else if(resource != null) {
344  return resource.getName();
345  } else {
346  IProduct product = getIProduct();
347  return product != null ? product.getProductName() : null;
348  }
349  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOrderItem()

OrderItem org.turro.erp.entity.ReceiptItem.getOrderItem ( )

Definition at line 153 of file ReceiptItem.java.

153  {
154  return orderItem;
155  }
Here is the caller graph for this function:

◆ getPetitioner()

Contact org.turro.erp.entity.ReceiptItem.getPetitioner ( )

Definition at line 315 of file ReceiptItem.java.

315  {
316  return receptor.getEntity(receptorId);
317  }

◆ getProduct()

Product org.turro.erp.entity.ReceiptItem.getProduct ( )

Definition at line 251 of file ReceiptItem.java.

251  {
252  return product.getEntity(productId);
253  }

◆ getProductDescription()

String org.turro.erp.entity.ReceiptItem.getProductDescription ( )

Definition at line 161 of file ReceiptItem.java.

161  {
162  return productDescription;
163  }

◆ getProductId()

long org.turro.erp.entity.ReceiptItem.getProductId ( )

Definition at line 169 of file ReceiptItem.java.

169  {
170  return productId;
171  }

◆ getProvider()

Contract org.turro.erp.entity.ReceiptItem.getProvider ( )

Definition at line 281 of file ReceiptItem.java.

281  {
282  return provider.getEntity(providerId);
283  }
Here is the caller graph for this function:

◆ getProviderId()

long org.turro.erp.entity.ReceiptItem.getProviderId ( )

Definition at line 177 of file ReceiptItem.java.

177  {
178  return providerId;
179  }
Here is the caller graph for this function:

◆ getProviderProduct()

ProductByContractor org.turro.erp.entity.ReceiptItem.getProviderProduct ( )

Definition at line 297 of file ReceiptItem.java.

297  {
298  return providerProduct.getEntity(providerProductId);
299  }

◆ getProviderProductId()

long org.turro.erp.entity.ReceiptItem.getProviderProductId ( )

Definition at line 185 of file ReceiptItem.java.

185  {
186  return providerProductId;
187  }

◆ getRealUnits()

double org.turro.erp.entity.ReceiptItem.getRealUnits ( )

Definition at line 392 of file ReceiptItem.java.

392  {
393  return units * dedication;
394  }

◆ getReceptorId()

String org.turro.erp.entity.ReceiptItem.getReceptorId ( )

Definition at line 193 of file ReceiptItem.java.

193  {
194  return receptorId;
195  }

◆ getRelated()

ReceiptItem org.turro.erp.entity.ReceiptItem.getRelated ( )

Definition at line 380 of file ReceiptItem.java.

380  {
381  OrderItem oi = orderItem != null ? orderItem.getRelated() : null;
382  if(oi != null) {
383  Collection<ReceiptItem> ris = oi.getReceiptItems();
384  Iterator<ReceiptItem> itri = ris.iterator();
385  if(itri.hasNext()) {
386  return ris.iterator().next();
387  }
388  }
389  return null;
390  }
Set< ReceiptItem > getReceiptItems()
Definition: OrderItem.java:221
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getResource()

Resource org.turro.erp.entity.ReceiptItem.getResource ( )

Definition at line 201 of file ReceiptItem.java.

201  {
202  return resource;
203  }
Here is the caller graph for this function:

◆ getStartWorking()

Date org.turro.erp.entity.ReceiptItem.getStartWorking ( )

Definition at line 209 of file ReceiptItem.java.

209  {
210  return startWorking;
211  }
Here is the caller graph for this function:

◆ getStatus()

ReceiptStatus org.turro.erp.entity.ReceiptItem.getStatus ( )

Definition at line 369 of file ReceiptItem.java.

369  {
370  if(orderItem == null) {
371  return ReceiptStatus.RECEIPT_READY;
372  }
373  if(orderItem.getUnits() <= units) {
374  return ReceiptStatus.RECEIPT_PROCESSED;
375  } else {
376  return ReceiptStatus.RECEIPT_PROCESSED_PARTIALLY;
377  }
378  }
Here is the caller graph for this function:

◆ getTax()

double org.turro.erp.entity.ReceiptItem.getTax ( )

Definition at line 217 of file ReceiptItem.java.

217  {
218  return tax;
219  }
Here is the caller graph for this function:

◆ getType()

String org.turro.erp.entity.ReceiptItem.getType ( )

Definition at line 351 of file ReceiptItem.java.

351  {
352  if(humanResource != null) {
353  return "operator";
354  } else if(resource != null) {
355  return "resource";
356  } else {
357  return "product";
358  }
359  }

◆ getUnits()

double org.turro.erp.entity.ReceiptItem.getUnits ( )

Definition at line 129 of file ReceiptItem.java.

129  {
130  return units;
131  }
Here is the caller graph for this function:

◆ getWorkDate()

Date org.turro.erp.entity.ReceiptItem.getWorkDate ( )

Definition at line 365 of file ReceiptItem.java.

365  {
366  return startWorking == null ? documentDate : startWorking;
367  }
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.erp.entity.ReceiptItem.isEmpty ( )

Definition at line 323 of file ReceiptItem.java.

323  {
324  return units == 0;
325  }
Here is the caller graph for this function:

◆ isHumanResourceType()

boolean org.turro.erp.entity.ReceiptItem.isHumanResourceType ( )

Definition at line 332 of file ReceiptItem.java.

332  {
333  return humanResource != null;
334  }

◆ isProductType()

boolean org.turro.erp.entity.ReceiptItem.isProductType ( )

Definition at line 327 of file ReceiptItem.java.

327  {
328  return ((providerProductId > 0 || productId > 0) ||
329  !Strings.isEmpty(productDescription));
330  }

◆ isResourceType()

boolean org.turro.erp.entity.ReceiptItem.isResourceType ( )

Definition at line 336 of file ReceiptItem.java.

336  {
337  return resource != null;
338  }

◆ setCost()

void org.turro.erp.entity.ReceiptItem.setCost ( double  cost)

Definition at line 85 of file ReceiptItem.java.

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

◆ setDedication()

void org.turro.erp.entity.ReceiptItem.setDedication ( double  dedication)

Definition at line 93 of file ReceiptItem.java.

93  {
94  this.dedication = dedication;
95  }
Here is the caller graph for this function:

◆ setDescription()

void org.turro.erp.entity.ReceiptItem.setDescription ( String  description)

Definition at line 101 of file ReceiptItem.java.

101  {
102  this.description = description;
103  }
Here is the caller graph for this function:

◆ setDocumentDate()

void org.turro.erp.entity.ReceiptItem.setDocumentDate ( Date  documentDate)

Definition at line 109 of file ReceiptItem.java.

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

◆ setDocumentLine()

void org.turro.erp.entity.ReceiptItem.setDocumentLine ( DocumentLine  documentLine)

Definition at line 239 of file ReceiptItem.java.

239  {
240  documentLineId = this.documentLine.setEntity(documentLine);
241  }

◆ setDocumentLineId()

void org.turro.erp.entity.ReceiptItem.setDocumentLineId ( long  documentLineId)

Definition at line 117 of file ReceiptItem.java.

117  {
118  this.documentLineId = documentLineId;
119  }

◆ setDocumentNumber()

void org.turro.erp.entity.ReceiptItem.setDocumentNumber ( String  documentNumber)

Definition at line 125 of file ReceiptItem.java.

125  {
126  this.documentNumber = documentNumber;
127  }
Here is the caller graph for this function:

◆ setHumanResource()

void org.turro.erp.entity.ReceiptItem.setHumanResource ( HumanResource  humanResource)

Definition at line 141 of file ReceiptItem.java.

141  {
142  this.humanResource = humanResource;
143  }
Here is the caller graph for this function:

◆ setId()

void org.turro.erp.entity.ReceiptItem.setId ( long  id)

Definition at line 149 of file ReceiptItem.java.

149  {
150  this.id = id;
151  }

◆ setIProduct()

void org.turro.erp.entity.ReceiptItem.setIProduct ( IProduct  product)

Definition at line 265 of file ReceiptItem.java.

265  {
266  IProductKey productKey = iproduct.setIProduct(product);
267  productId = productKey.getProductId();
268  providerId = productKey.getProviderId();
269  providerProductId = productKey.getProviderProductId();
270  productDescription = productKey.getProductDescription();
271  }
IProductKey setIProduct(IProduct product)
Here is the call graph for this function:

◆ setOrderItem()

void org.turro.erp.entity.ReceiptItem.setOrderItem ( OrderItem  orderItem)

Definition at line 157 of file ReceiptItem.java.

157  {
158  this.orderItem = orderItem;
159  }
Here is the caller graph for this function:

◆ setPetitioner()

void org.turro.erp.entity.ReceiptItem.setPetitioner ( Contact  petitioner)

Definition at line 319 of file ReceiptItem.java.

319  {
320  receptorId = this.receptor.setEntity(petitioner);
321  }

◆ setProduct()

void org.turro.erp.entity.ReceiptItem.setProduct ( Product  product)

Definition at line 255 of file ReceiptItem.java.

255  {
256  productId = this.product.setEntity(product);
257  }

◆ setProductDescription()

void org.turro.erp.entity.ReceiptItem.setProductDescription ( String  productDescription)

Definition at line 165 of file ReceiptItem.java.

165  {
166  this.productDescription = productDescription;
167  }
Here is the caller graph for this function:

◆ setProductId()

void org.turro.erp.entity.ReceiptItem.setProductId ( long  productId)

Definition at line 173 of file ReceiptItem.java.

173  {
174  this.productId = productId;
175  }
Here is the caller graph for this function:

◆ setProvider()

void org.turro.erp.entity.ReceiptItem.setProvider ( Contract  provider)

Definition at line 285 of file ReceiptItem.java.

285  {
286  providerId = this.provider.setEntity(provider);
287  }

◆ setProviderId()

void org.turro.erp.entity.ReceiptItem.setProviderId ( long  providerId)

Definition at line 181 of file ReceiptItem.java.

181  {
182  this.providerId = providerId;
183  }
Here is the caller graph for this function:

◆ setProviderProduct()

void org.turro.erp.entity.ReceiptItem.setProviderProduct ( ProductByContractor  providerProduct)

Definition at line 301 of file ReceiptItem.java.

301  {
302  providerProductId = this.providerProduct.setEntity(providerProduct);
303  }

◆ setProviderProductId()

void org.turro.erp.entity.ReceiptItem.setProviderProductId ( long  providerProductId)

Definition at line 189 of file ReceiptItem.java.

189  {
190  this.providerProductId = providerProductId;
191  }
Here is the caller graph for this function:

◆ setReceptorId()

void org.turro.erp.entity.ReceiptItem.setReceptorId ( String  receptorId)

Definition at line 197 of file ReceiptItem.java.

197  {
198  this.receptorId = receptorId;
199  }

◆ setResource()

void org.turro.erp.entity.ReceiptItem.setResource ( Resource  resource)

Definition at line 205 of file ReceiptItem.java.

205  {
206  this.resource = resource;
207  }
Here is the caller graph for this function:

◆ setStartWorking()

void org.turro.erp.entity.ReceiptItem.setStartWorking ( Date  startWorking)

Definition at line 213 of file ReceiptItem.java.

213  {
214  this.startWorking = startWorking;
215  }
Here is the caller graph for this function:

◆ setTax()

void org.turro.erp.entity.ReceiptItem.setTax ( double  tax)

Definition at line 221 of file ReceiptItem.java.

221  {
222  this.tax = tax;
223  }
Here is the caller graph for this function:

◆ setUnits()

void org.turro.erp.entity.ReceiptItem.setUnits ( double  units)

Definition at line 133 of file ReceiptItem.java.

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

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