18 package org.turro.financials.register;
20 import java.util.Date;
21 import java.util.logging.Level;
22 import java.util.logging.Logger;
23 import org.turro.command.CommandUtil;
24 import org.turro.elephant.context.ElephantContext;
25 import org.turro.elephant.util.DecimalFormats;
26 import org.turro.financials.account.logic.BankEntry;
27 import org.turro.financials.account.logic.BankLabel;
28 import org.turro.financials.account.logic.StatementEntry;
29 import org.turro.i18n.I_;
30 import org.turro.zkoss.grid.CollectionGrid;
31 import org.turro.zkoss.grid.EditableCell;
32 import org.turro.zkoss.label.LabelTypes;
33 import org.turro.zkoss.locale.Currencies;
34 import org.zkoss.zk.ui.HtmlBasedComponent;
35 import org.zkoss.zk.ui.event.Event;
36 import org.zkoss.zk.ui.event.EventListener;
37 import org.zkoss.zk.ui.event.Events;
38 import org.zkoss.zul.Checkbox;
39 import org.zkoss.zul.Foot;
40 import org.zkoss.zul.Footer;
41 import org.zkoss.zul.Row;
42 import org.zkoss.zul.Space;
55 }
catch (ClassNotFoundException ex) {
69 double debit = 0.0, credit = 0.0;
73 debit += se.getDebit();
74 credit += se.getCredit();
78 Footer footer =
new Footer(
"");
80 foot.appendChild(footer);
81 footer =
new Footer();
82 footer.setAlign(
"right");
84 foot.appendChild(footer);
85 footer =
new Footer();
86 footer.setAlign(
"right");
88 foot.appendChild(footer);
89 footer =
new Footer();
90 footer.setAlign(
"right");
92 foot.appendChild(footer);
93 footer =
new Footer(
"");
94 foot.appendChild(footer);
102 row.setSclass(
"invalid");
130 final Checkbox cb = (Checkbox) super.createRenderer(editableCell);
131 cb.addEventListener(Events.ON_CHECK,
new EventListener() {
133 public void onEvent(Event event)
throws Exception {
142 return super.createRenderer(editableCell);
145 private void addColumns() throws ClassNotFoundException {
148 "date",
null, 0,
true,
true).setWidth(
"90px");
150 "view.name",
null, 0,
false,
true).setWidth(
"90px");
152 "account",
null, 0,
false,
true).setWidth(
"100px");
154 "description",
null, 0,
false,
true);
156 "debit",
null, fractionDigits,
false,
true).setWidth(
"100px");
158 "credit",
null, fractionDigits,
false,
true).setWidth(
"100px");
160 "balance",
null, fractionDigits,
false,
true).setWidth(
"100px");
162 "conciliated",
null, 0,
false,
false).setWidth(
"35px");
static ControlAdapter getAdapterOrSpace(Object entity)
static String logMsg(String msg)
void setConciliated(boolean value)
void initiateRow(Row row, StatementEntry value)
HtmlBasedComponent createRenderer(EditableCell editableCell)
boolean deleteRow(Row row)
boolean isValid(StatementEntry v)
static String get(String msg)
Collection< V > getCollection()
EditableColumn addColumn(String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
void setReadOnly(boolean readOnly)
static Label getCaptionLabel(String value)
static Currency getDefault()