19 package org.turro.erp.purchase;
21 import java.util.Date;
22 import org.turro.string.Strings;
23 import org.turro.command.Command;
24 import org.turro.command.Context;
25 import org.turro.elephant.context.Application;
26 import org.turro.elephant.util.DateFormats;
27 import org.turro.elephant.util.DecimalFormats;
28 import org.turro.elephant.util.ZkossUtils;
29 import org.turro.elephant.zkoss.Modal;
30 import org.turro.erp.entity.ReceiptItem;
31 import org.turro.erp.entity.Task;
32 import org.turro.erp.entity.WorkOrder;
33 import org.turro.financials.entity.Contract;
34 import org.turro.util.PhraseBuilder;
35 import org.turro.zkoss.label.LabelAdapter;
36 import org.turro.zkoss.label.PercentLabel;
37 import org.zkoss.zk.ui.Executions;
38 import org.zkoss.zk.ui.event.Event;
39 import org.zkoss.zk.ui.event.EventListener;
40 import org.zkoss.zk.ui.event.Events;
41 import org.zkoss.zul.*;
56 public void render(
final Row row, Object data,
int index)
throws Exception {
57 if(row instanceof Group) {
59 PhraseBuilder pb =
new PhraseBuilder();
61 if(provider !=
null) {
72 row.appendChild(
new Label(pb.toString()));
73 }
else if(row instanceof Groupfoot) {
75 row.appendChild(
new Space());
76 row.appendChild(
new Label(
"" + dros.items));
78 docProps.addEventListener(Events.ON_CLICK,
new EventListener() {
80 public void onEvent(Event event)
throws Exception {
84 row.appendChild(docProps);
85 row.appendChild(
new Space());
86 row.appendChild(
new Space());
89 row.appendChild(
new Space());
93 row.appendChild(
new Label(dr.
getName()));
94 Vlayout vbox =
new Vlayout();
95 row.appendChild(vbox);
106 vbox =
new Vlayout();
107 row.appendChild(vbox);
114 l.setStyle(
"color:green;font-size:11px;");
116 l.setStyle(
"color:red;font-size:11px;");
120 vbox =
new Vlayout();
121 row.appendChild(vbox);
126 vbox =
new Vlayout();
127 row.appendChild(vbox);
131 Toolbarbutton del =
new Toolbarbutton(
null,
"/_zul/images/edit-delete.png");
132 del.addEventListener(Events.ON_CLICK,
new EventListener() {
134 public void onEvent(Event event)
throws Exception {
135 ZkossUtils.confirmDeletion(
null,
new Command() {
137 public Object execute(Context context) {
144 row.appendChild(del);
149 Window w = (Window) Executions.createComponents(
"/WEB-INF/_zul/erp/purchase/editReceiptGroup.zul",
null,
null);
150 w.setMode(Window.MODAL);
151 Events.sendEvent(Events.ON_USER, w, dros);
154 public Object execute(Context context) {
static String getString(String key)
static int doModal(String file)
RequiredUsage getRequiredUsage()
String getDocumentNumber()
boolean isHumanResourceType()
OrderReference getOrderReference()
String getFullDescription()
String getFullDescription()
void render(final Row row, Object data, int index)
ReceiptItemRowRenderer(ReceiptsGrid grid)
void deleteReceipt(ReceiptItem dro)
Component getEditBox(final Row row, final ReceiptItem dr)
Label setSclass(String sclass)