19 package org.turro.erp.sales;
21 import org.turro.string.Strings;
22 import org.turro.erp.db.ErpPU;
23 import org.turro.erp.entity.CustomerOrder;
24 import org.turro.financials.contract.ContractCombobox;
25 import org.turro.jpa.Dao;
26 import org.turro.zul.frame.Framework;
27 import org.zkoss.zk.ui.Component;
28 import org.zkoss.zk.ui.util.GenericForwardComposer;
29 import org.zkoss.zul.Datebox;
30 import org.zkoss.zul.Textbox;
31 import org.zkoss.zul.Toolbarbutton;
40 private Textbox orderId;
41 private Datebox orderDate;
42 private Toolbarbutton save,
delete;
47 super.doAfterCompose(comp);
53 customer.setReadonly(
true);
54 orderId.setReadonly(
true);
55 orderDate.setReadonly(
true);
64 co.setOrderId(orderId.getValue());
65 co.setOrderDate(orderDate.getValue());
94 private void updateLines() {
97 co.setOrderId(orderId.getValue());
98 co.setOrderDate(orderDate.getValue());
103 private void updateButtons() {
104 save.setDisabled(!isValid());
105 delete.setDisabled(save.isDisabled());
108 private boolean isValid() {
110 !Strings.isBlank(orderId.getValue()) &&
111 orderDate.getValue() !=
null;
void onChange $orderDate()
void doAfterCompose(Component comp)
void onChange $customer()
void setNewValues(CustomerOrder customerOrder)
CustomerOrder getCustomerOrder()
void deleteObject(Object obj)
static Framework getCurrent()