18 package org.turro.financials.document;
20 import java.util.Collection;
21 import org.turro.command.CommandUtil;
22 import org.turro.elephant.util.DateFormats;
23 import org.turro.elephant.util.DecimalFormats;
24 import org.turro.financials.db.FinancialsPU;
25 import org.turro.financials.document.filter.DocumentFilterGrid;
26 import org.turro.financials.entity.Document;
27 import org.turro.i18n.I_;
28 import org.turro.jpa.Dao;
29 import org.turro.jpa.grid.RendererOnDemand;
30 import org.turro.zkoss.grid.PagingGrid;
31 import org.zkoss.zk.ui.ext.AfterCompose;
32 import org.zkoss.zul.*;
48 this.filterGrid = filterGrid;
60 ListModelList<Long> model = (ListModelList) getModel();
73 ListModelList<Long> model = (ListModelList) getModel();
89 private void addRows() {
96 protected void renderRow(Row row,
final Document doc) {
98 row.setSclass(
"draft");
100 row.appendChild(
new Label(doc.
getId() +
""));
101 row.appendChild(
new Label(DateFormats.format(doc.
getReceiptDate(),
true)));
102 row.appendChild(
new Label(DateFormats.format(doc.
getDocumentDate(),
true)));
105 row.appendChild(CommandUtil.getLabelAdapter(doc.
getContract()).setSclass(
"softLabel"));
106 row.appendChild(
new Label(DecimalFormats.format(doc.
getTotalAmount(),
107 DecimalFormats.getStringFormat(doc.
getCurrency().getDefaultFractionDigits()))));
111 setModel(
new ListModelList(list));
116 private void addColumns() {
120 Column col =
new Column(
"#",
null,
"80px");
121 cols.appendChild(col);
123 col =
new Column(I_.get(
"Receipt/Issue"),
null,
"120px");
124 cols.appendChild(col);
126 col =
new Column(I_.get(
"Date"),
null,
"120px");
127 cols.appendChild(col);
129 col =
new Column(I_.get(
"Number"),
null,
"180px");
130 cols.appendChild(col);
132 col =
new Column(I_.get(
"Document"));
134 cols.appendChild(col);
136 col =
new Column(I_.get(
"Contract"));
138 cols.appendChild(col);
140 col =
new Column(I_.get(
"Amount"),
null,
"120px");
141 col.setAlign(
"right");
142 cols.appendChild(col);
Collection getDocuments(List< IFilterValue > values, boolean onlyIds)
void sendDocumentsToParticipants()
void sendDocumentsToCurrent()
DocumentFilter getFilter()
void setFilterGrid(DocumentFilterGrid filterGrid)
void setDocument(Document document)
void setSendToCurrent(boolean sendToCurrent)
void setSendToParticipants(boolean sendToParticipants)
void setAskBeforeSend(boolean askBeforeSend)
String getDocumentNumber()
DocumentDefinition getDocumentDefinition()
List< IFilterValue > getValues()
Columns getColumns(boolean create)
Rows getRows(boolean create)
void setRowCount(int rows)