19 package org.turro.erp.reference;
21 import java.util.logging.Level;
22 import java.util.logging.Logger;
23 import org.turro.elephant.context.Application;
24 import org.turro.erp.entity.Breakdown;
25 import org.turro.erp.entity.OrderReference;
26 import org.turro.erp.entity.RequiredUsage;
27 import org.turro.erp.entity.Task;
28 import org.turro.jpa.entity.EntityCollectionUtil;
29 import org.turro.zkoss.grid.CollectionGrid;
30 import org.zkoss.zul.Column;
31 import org.zkoss.zul.Row;
46 return orderReference;
50 this.orderReference = orderReference;
56 amount += b.getAmount();
64 getRows().getChildren().clear();
77 }
else if (mode == 2) {
79 getRows().getChildren().clear();
94 }
else if(mode == 3) {
95 getRows().getChildren().clear();
104 ((Column)
getColumns().getChildren().get(1)).setVisible(show);
108 ((Column)
getColumns().getChildren().get(3)).setVisible(show);
109 ((Column)
getColumns().getChildren().get(4)).setVisible(show);
125 EntityCollectionUtil.remove(orderReference.
getBreakdowns(), t);
136 super.rowChanged(row);
140 private void addColumns() {
142 addColumn(
"#",
"int",
"orderRef",
null, 0,
false,
false).setWidth(
"60px");
147 }
catch (ClassNotFoundException ex) {
148 Logger.getLogger(OrderReferenceGrid.class.getName()).log(Level.SEVERE,
null, ex);
static String getString(String key)
void setOrderRef(int orderRef)
void setDescription(String description)
void setPrice(Double price)
void setQuantity(Double quantity)
SortedSet< Task > getTasks()
Set< Breakdown > getBreakdowns()
boolean deleteRow(Row row)
void setOrderReference(OrderReference orderReference)
OrderReference getOrderReference()
boolean isValid(Breakdown v)
void initiateRow(Row row, Breakdown value)
void setShowPrice(boolean show)
void setShowQuantity(boolean show)
EditableColumn addColumn(String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
boolean isAllowInsertions()
Columns getColumns(boolean create)
Rows getRows(boolean create)