19 package org.turro.erp.sales;
21 import org.turro.elephant.context.Application;
22 import org.turro.elephant.db.WhereClause;
23 import org.turro.elephant.util.DateFormats;
24 import org.turro.elephant.util.DecimalFormats;
25 import org.turro.erp.db.ErpPU;
26 import org.turro.erp.entity.CustomerOrder;
27 import org.turro.financials.entity.Contract;
28 import org.turro.zkoss.input.CollectionListbox;
29 import org.zkoss.zul.Listhead;
30 import org.zkoss.zul.Listheader;
45 this.contract = contract;
51 if(v ==
null)
return null;
66 private void addHeaders() {
67 if(getListhead() !=
null)
return;
68 Listhead lh =
new Listhead();
77 private WhereClause createCriteria(Contract contract) {
78 WhereClause wc =
new WhereClause();
79 wc.addClause(
"select cu from CustomerOrder as cu");
80 wc.addClause(
"where not exists (select o from OrderReference as o where o.customerOrder = cu)");
81 if(contract !=
null) {
82 wc.addClause(
"and cu.customerId = :idContract");
83 wc.addNamedValue(
"idContract", contract.getId());
85 wc.addClause(
"order by cu.customerId, cu.orderDate, cu.orderId");
static String getString(String key)
void setContract(Contract contract)
String convertToString(CustomerOrder v)