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

Public Member Functions

void onUser (Event event)
 
void onOK ()
 
void onSave ()
 
void onCancel ()
 
void onChange $pgprovider ()
 
void onChange $cost ()
 

Detailed Description

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

Definition at line 37 of file OrderEdit.java.

Member Function Documentation

◆ $cost()

void onChange org.turro.erp.purchase.OrderEdit.$cost ( )

Definition at line 125 of file OrderEdit.java.

125  {
126  if(orderItem.isCostMaximum()) {
127  if(((Number) cost.getNumber()).doubleValue() > orderItem.getMaxCost()) {
128  cost.setValue(orderItem.getMaxCost());
129  }
130  }
131  }
Here is the call graph for this function:

◆ $pgprovider()

void onChange org.turro.erp.purchase.OrderEdit.$pgprovider ( )

Definition at line 120 of file OrderEdit.java.

120  {
121  Contract ctc = provider.getObjectValue();
122  costrow.setVisible(ctc != null);
123  }
Here is the call graph for this function:

◆ onCancel()

void org.turro.erp.purchase.OrderEdit.onCancel ( )

Definition at line 116 of file OrderEdit.java.

116  {
117  oiForm.detach();
118  }

◆ onOK()

void org.turro.erp.purchase.OrderEdit.onOK ( )

Definition at line 92 of file OrderEdit.java.

92  {
93  onSave();
94  }
Here is the call graph for this function:

◆ onSave()

void org.turro.erp.purchase.OrderEdit.onSave ( )

Definition at line 96 of file OrderEdit.java.

96  {
97  orderItem.setDocumentDate(docdate.getValue());
98  orderItem.setDocumentNumber(docnumber.getValue());
99  orderItem.setDescription(description.getValue());
100  orderItem.setUnits(((Number) units.getNumber()).doubleValue());
101  orderItem.setCost(((Number) cost.getNumber()).doubleValue());
102  orderItem.setTax(((Number) tax.getNumber()).doubleValue());
103  orderItem.setDelivery(delivery.getValue());
104  if(orderItem.getHumanResource() != null) {
105  orderItem.setDedication(dedication.getValue());
106  } else if(orderItem.getResource() != null) {
107  orderItem.setDedication(1);
108  } else {
109  orderItem.setDedication(1);
110  orderItem.setProvider(provider.getObjectValue());
111  }
112  new ErpPU().saveObject(orderItem);
113  oiForm.detach();
114  }
void setProvider(Contract provider)
Definition: OrderItem.java:341
HumanResource getHumanResource()
Definition: OrderItem.java:157
void setDocumentDate(Date documentDate)
Definition: OrderItem.java:129
void setDescription(String description)
Definition: OrderItem.java:121
void setCost(double cost)
Definition: OrderItem.java:89
void setDocumentNumber(String documentNumber)
Definition: OrderItem.java:145
void setDelivery(Date delivery)
Definition: OrderItem.java:113
void setUnits(double units)
Definition: OrderItem.java:153
void setDedication(double dedication)
Definition: OrderItem.java:105
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onUser()

void org.turro.erp.purchase.OrderEdit.onUser ( Event  event)

Definition at line 50 of file OrderEdit.java.

50  {
51  orderItem = (OrderItem) event.getData();
52  docdate.setValue(orderItem.getDocumentDate());
53  docnumber.setValue(orderItem.getDocumentNumber());
54  description.setValue(orderItem.getDescription());
55  cost.setValue(orderItem.getCost());
56  tax.setValue(orderItem.getTax());
57  costrow.setVisible(true);
58  units.setValue(orderItem.getUnits());
59  delivery.setValue(orderItem.getDelivery());
60  if(orderItem.getHumanResource() != null) {
61  reslabel.setValue(Application.getString("lHumanResource"));
62  resvalue.setValue(orderItem.getHumanResource().getName());
63  provrow.setVisible(false);
64  dedication.setValue(orderItem.getDedication());
65  dedicrow.setVisible(true);
66  movbutton.setVisible(false);
67  if(!orderItem.getHumanResource().isInternal()) {
68  costrow.setVisible(true);
69  }
70  } else if(orderItem.getResource() != null) {
71  reslabel.setValue(Application.getString("lResource"));
72  resvalue.setValue(orderItem.getResource().getName());
73  provrow.setVisible(false);
74  dedicrow.setVisible(false);
75  movbutton.setVisible(false);
76  if(!orderItem.getResource().isInternal()) {
77  costrow.setVisible(true);
78  }
79  } else {
80  reslabel.setValue(Application.getString("lProduct"));
81  resvalue.setValue(orderItem.getIProduct().getProductName());
82  provider.setObjectValue(new FinancialsPU().find(Contract.class, orderItem.getProviderId()));
83  provrow.setVisible(true);
84  dedicrow.setVisible(false);
85  movbutton.setVisible(true);
86  movbutton.setIProduct(orderItem.getRequiredUsage().getIProduct());
87  costrow.setVisible(true);
88  provider.setReadonly(orderItem.isProviderFixed());
89  }
90  }
RequiredUsage getRequiredUsage()
Definition: OrderItem.java:249
Here is the call graph for this function:

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