19 package org.turro.financials.document;
21 import java.util.ArrayList;
22 import java.util.Date;
23 import org.turro.financials.contract.ContractCombobox;
24 import org.turro.financials.contract.ContractListbox;
25 import org.turro.financials.contract.logic.ContractWrapper;
26 import org.turro.financials.document.logic.DocumentWrapper;
27 import org.turro.financials.entity.Document;
28 import org.turro.financials.entity.DocumentLine;
29 import org.turro.financials.entity.DocumentWorkflow;
30 import org.turro.financials.linetype.LineTypePreferenceListbox;
31 import org.turro.financials.menu.FinancialsMenu;
32 import org.turro.financials.model.document.DocumentDefinitionWrapper;
33 import org.turro.zkoss.input.DateboxShort;
34 import org.turro.zkoss.input.ExpressionInput;
35 import org.turro.zul.frame.Framework;
36 import org.zkoss.zk.ui.Executions;
37 import org.zkoss.zk.ui.IdSpace;
38 import org.zkoss.zk.ui.event.Event;
39 import org.zkoss.zk.ui.event.Events;
40 import org.zkoss.zk.ui.ext.AfterCompose;
41 import org.zkoss.zk.ui.select.Selectors;
42 import org.zkoss.zk.ui.select.annotation.Listen;
43 import org.zkoss.zk.ui.select.annotation.Wire;
44 import org.zkoss.zul.Textbox;
45 import org.zkoss.zul.Window;
51 public class QuickDocument extends Window implements IdSpace, AfterCompose {
72 private Textbox docNumber;
78 private final Date date;
79 private final Double amount;
80 private final String concept;
82 @Listen(
"onChange = #contract")
92 @Listen(
"onSelect = #ctcDef")
115 @Listen(
"onSelect = #docFlow")
132 @Listen(
"onChange = #docDate")
134 docReceipt.setValue(docDate.
getValue());
137 @Listen(
"onClick = #close")
139 Events.postEvent(
new Event(Events.ON_CLOSE,
this));
142 @Listen(
"onClick = #create")
193 Events.postEvent(
new Event(Events.ON_CLOSE,
this));
199 this.amount = amount;
200 this.concept = concept;
201 Executions.createComponents(
"/WEB-INF/_zul/bs/comps/document/quickDocument.zul",
this,
null);
202 Selectors.wireComponents(
this,
this,
false);
203 Selectors.wireEventListeners(
this,
this);
217 docDate.setValue(date);
218 docReceipt.setValue(date);
void updateContractDefinition(ContractDefinition contractDefinition)
QuickDocument(Date date, Double amount, String concept)
void setStore(Contract store)
void setEquivalenceSurcharge(double equivalenceSurcharge)
void setLineOrder(int lineOrder)
void setContractPreference(ContractPreference contractPreference)
void setQuantity(double quantity)
void setDiscountMoney(double discountMoney)
void setDiscountPerCent(double discountPerCent)
void setLineType(LineType lineType)
void setRetention(double retention)
void setDocument(Document document)
void setProduct(Product product)
void setPrice(double price)
void setProductByContractor(ProductByContractor productByContractor)
void setConcept(String concept)
void setAncestor(DocumentDefinition ancestor)
void setDescendant(DocumentDefinition descendant)
void setDocumentNumber(String documentNumber)
void setDocumentDate(Date documentDate)
void setContract(Contract contract)
String getDocumentNumber()
void setDraft(boolean draft)
void setCurrency(Currency currency)
Set< DocumentLine > getDocumentLines()
void setDocumentDefinition(DocumentDefinition documentDefinition)
void setReceiptDate(Date receiptDate)
DocumentDefinition getDocumentDefinition()
void flowFrom(Document doc, String header, DocumentWorkflow workflow)
ContractPreference getContractPreference()
void setDocument(Document document)
Collection< DocumentDefinition > getExpiryDefinitions(DocumentDefinition source)
Collection< Contract > getRelatedStores(Contract contract)
static Object getAttribute(Object object, String key)
static void setAttribute(Object object, String key, Object value)