18 package org.turro.erp.purchase;
20 import java.util.Date;
21 import org.turro.string.Strings;
22 import org.turro.command.Command;
23 import org.turro.command.Context;
24 import org.turro.elephant.context.Application;
25 import org.turro.elephant.util.DateFormats;
26 import org.turro.elephant.util.DecimalFormats;
27 import org.turro.elephant.util.ZkossUtils;
28 import org.turro.elephant.zkoss.Modal;
29 import org.turro.erp.entity.OrderItem;
30 import org.turro.erp.entity.RequiredUsage;
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(oi.
getName()));
94 Vlayout vbox =
new Vlayout();
95 row.appendChild(vbox);
110 vbox =
new Vlayout();
111 row.appendChild(vbox);
116 l.setStyle(
"color:green;font-size:11px;");
118 l.setStyle(
"color:red;font-size:11px;");
122 vbox =
new Vlayout();
123 row.appendChild(vbox);
128 vbox =
new Vlayout();
129 row.appendChild(vbox);
135 Toolbarbutton del =
new Toolbarbutton(
null,
"/_zul/images/edit-delete.png");
136 del.addEventListener(Events.ON_CLICK,
new EventListener() {
138 public void onEvent(Event event)
throws Exception {
139 ZkossUtils.confirmDeletion(
null,
new Command() {
141 public Object execute(Context context) {
148 row.appendChild(del);
150 row.appendChild(
new Space());
156 Window w = (Window) Executions.createComponents(
"/WEB-INF/_zul/erp/purchase/editOrderGroup.zul",
null,
null);
157 w.setMode(Window.MODAL);
158 Events.sendEvent(Events.ON_USER, w, dros);
161 public Object execute(Context context) {
static String getString(String key)
static int doModal(String file)
RequiredUsage getOwnerRequiredUsage()
RequiredUsage getRequiredUsage()
String getDocumentNumber()
OrderReference getOrderReference()
String getFullDescription()
String getFullDescription()
OrderItemRowRenderer(OrdersGrid grid)
void render(final Row row, Object data, int index)
Component getEditBox(final Row row, final OrderItem oi)
void deleteOrder(OrderItem oi)
Label setSclass(String sclass)