19 package org.turro.crm.command;
21 import java.util.Collection;
22 import org.turro.annotation.ElephantPlugin;
23 import org.turro.crm.db.CrmPU;
24 import org.turro.crm.entity.VendorProspect;
25 import org.turro.elephant.context.Application;
26 import org.turro.elephant.db.WhereClause;
27 import org.turro.elephant.util.Images;
28 import org.turro.i18n.I_;
29 import org.turro.jpa.Dao;
30 import org.turro.plugin.command.CustomerSummaryPlugin;
31 import org.turro.zkoss.label.LabelTypes;
32 import org.turro.zkoss.layout.GroupboxArrow;
33 import org.zkoss.zul.Hlayout;
34 import org.zkoss.zul.Image;
35 import org.zkoss.zul.Include;
44 private Collection<VendorProspect> active;
50 if(!active.isEmpty()) {
53 protected void doFillContent() {
56 Hlayout hbox =
new Hlayout();
58 hbox.setSclass(
"z-valign-middle");
59 hbox.setValign(
"middle");
63 Include report =
new Include(
"/WEB-INF/_zul/crm/customerSummary.zul");
64 report.setDynamicProperty(
"active", active);
65 gba.appendChild(report);
71 private void activeSales() {
74 wc.
addClause(
"select distinct vendorp from VendorProspect as vendorp");
75 wc.
addClause(
"where vendorp.saleProspect.customer.idContact = :contact");
76 wc.
addClause(
"and vendorp.saleProspect.closingDate is null");
78 active = dao.getResultList(wc);
Object addResult(String key, Object value)
static Application getApplication()
void addClause(String clause)
void addNamedValue(String name, Object value)
static String getImage(String image)
static String get(String msg)
static Label getPreLabel(String value)
static Label getSoftLabel(String value)
void setCaption(Component comp)
void setOpen(boolean open)