BrightSide Workbench Full Report + Source Code
org.turro.erp.purchase.ProductsItem Class Reference

Public Member Functions

 ProductsItem (ReceiptItem ri)
 
 ProductsItem ()
 
String getConcept ()
 
void setConcept (String concept)
 
double getCost ()
 
void setCost (double cost)
 
int getOrderRef ()
 
void setOrderRef (int orderRef)
 
OrderReference getOrderReference ()
 
void setOrderReference (OrderReference orderReference)
 
IProduct getIProduct ()
 
void setIProduct (IProduct product)
 
Task getTask ()
 
void setTask (Task task)
 
double getUnits ()
 
void setUnits (double units)
 
WorkOrder getWorkOrder ()
 
void setWorkOrder (WorkOrder workOrder)
 
long getWorkOrderId ()
 
void setWorkOrderId (long workOrderId)
 

Detailed Description

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

Definition at line 32 of file ProductsItem.java.

Constructor & Destructor Documentation

◆ ProductsItem() [1/2]

org.turro.erp.purchase.ProductsItem.ProductsItem ( ReceiptItem  ri)

Definition at line 43 of file ProductsItem.java.

43  {
44  task = ri.getOrderItem().getRequiredUsage().getTask();
45  orderReference = task.getOrderReference();
46  workOrder = orderReference.getWorkOrder();
47  workOrderId = workOrder.getWorkOrderId();
48  orderRef = orderReference.getOrderRef();
49  units = ri.getUnits();
50  description = ri.getDescription();
51  iProduct = ri.getIProduct();
52  cost = ri.getCost();
53  }
Here is the call graph for this function:

◆ ProductsItem() [2/2]

org.turro.erp.purchase.ProductsItem.ProductsItem ( )

Definition at line 55 of file ProductsItem.java.

55  {
56  }

Member Function Documentation

◆ getConcept()

String org.turro.erp.purchase.ProductsItem.getConcept ( )

Definition at line 58 of file ProductsItem.java.

58  {
59  return description;
60  }
Here is the caller graph for this function:

◆ getCost()

double org.turro.erp.purchase.ProductsItem.getCost ( )

Definition at line 66 of file ProductsItem.java.

66  {
67  return cost;
68  }

◆ getIProduct()

IProduct org.turro.erp.purchase.ProductsItem.getIProduct ( )

Definition at line 100 of file ProductsItem.java.

100  {
101  return iProduct;
102  }

◆ getOrderRef()

int org.turro.erp.purchase.ProductsItem.getOrderRef ( )

Definition at line 74 of file ProductsItem.java.

74  {
75  return orderRef;
76  }
Here is the caller graph for this function:

◆ getOrderReference()

OrderReference org.turro.erp.purchase.ProductsItem.getOrderReference ( )

Definition at line 92 of file ProductsItem.java.

92  {
93  return orderReference;
94  }
Here is the caller graph for this function:

◆ getTask()

Task org.turro.erp.purchase.ProductsItem.getTask ( )

Definition at line 111 of file ProductsItem.java.

111  {
112  return task;
113  }
Here is the caller graph for this function:

◆ getUnits()

double org.turro.erp.purchase.ProductsItem.getUnits ( )

Definition at line 123 of file ProductsItem.java.

123  {
124  return units;
125  }

◆ getWorkOrder()

WorkOrder org.turro.erp.purchase.ProductsItem.getWorkOrder ( )

Definition at line 131 of file ProductsItem.java.

131  {
132  return workOrder;
133  }
Here is the caller graph for this function:

◆ getWorkOrderId()

long org.turro.erp.purchase.ProductsItem.getWorkOrderId ( )

Definition at line 139 of file ProductsItem.java.

139  {
140  return workOrderId;
141  }
Here is the caller graph for this function:

◆ setConcept()

void org.turro.erp.purchase.ProductsItem.setConcept ( String  concept)

Definition at line 62 of file ProductsItem.java.

62  {
63  this.description = concept;
64  }
Here is the caller graph for this function:

◆ setCost()

void org.turro.erp.purchase.ProductsItem.setCost ( double  cost)

Definition at line 70 of file ProductsItem.java.

70  {
71  this.cost = cost;
72  }

◆ setIProduct()

void org.turro.erp.purchase.ProductsItem.setIProduct ( IProduct  product)

Definition at line 104 of file ProductsItem.java.

104  {
105  this.iProduct = product;
106  if(cost == 0 && product != null) {
107  cost = product.getProductCost();
108  }
109  }
Here is the call graph for this function:

◆ setOrderRef()

void org.turro.erp.purchase.ProductsItem.setOrderRef ( int  orderRef)

Definition at line 78 of file ProductsItem.java.

78  {
79  if(this.orderRef != orderRef) {
80  orderReference = null;
81  task = null;
82  for(OrderReference or : workOrder.getOrderReferences()) {
83  if(or.getOrderRef() == orderRef) {
84  orderReference = or;
85  break;
86  }
87  }
88  }
89  this.orderRef = orderRef;
90  }
Set< OrderReference > getOrderReferences()
Definition: WorkOrder.java:124
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setOrderReference()

void org.turro.erp.purchase.ProductsItem.setOrderReference ( OrderReference  orderReference)

Definition at line 96 of file ProductsItem.java.

96  {
97  this.orderReference = orderReference;
98  }

◆ setTask()

void org.turro.erp.purchase.ProductsItem.setTask ( Task  task)

Definition at line 115 of file ProductsItem.java.

115  {
116  if(task != null) {
117  workOrder = task.getOrderReference().getWorkOrder();
118  workOrderId = workOrder.getWorkOrderId();
119  }
120  this.task = task;
121  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUnits()

void org.turro.erp.purchase.ProductsItem.setUnits ( double  units)

Definition at line 127 of file ProductsItem.java.

127  {
128  this.units = units;
129  }

◆ setWorkOrder()

void org.turro.erp.purchase.ProductsItem.setWorkOrder ( WorkOrder  workOrder)

Definition at line 135 of file ProductsItem.java.

135  {
136  this.workOrder = workOrder;
137  }

◆ setWorkOrderId()

void org.turro.erp.purchase.ProductsItem.setWorkOrderId ( long  workOrderId)

Definition at line 143 of file ProductsItem.java.

143  {
144  if(this.workOrderId != workOrderId) {
145  workOrder = WorkOrder.getByWorkOrderId(workOrderId);
146  orderRef = 0;
147  orderReference = null;
148  task = null;
149  }
150  this.workOrderId = workOrderId;
151  }
static WorkOrder getByWorkOrderId(long value)
Definition: WorkOrder.java:365
Here is the call graph for this function:
Here is the caller graph for this function:

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