18 package org.turro.financials.document;
20 import java.util.Collection;
21 import java.util.List;
22 import org.turro.elephant.util.DateFormats;
23 import org.turro.elephant.util.DecimalFormats;
24 import org.turro.financials.document.action.DocumentActionMenu;
25 import org.turro.financials.entity.DocumentLine;
26 import org.turro.i18n.I_;
27 import org.turro.zkoss.input.CollectionListbox;
28 import org.zkoss.zul.Listfoot;
29 import org.zkoss.zul.Listfooter;
30 import org.zkoss.zul.Listhead;
31 import org.zkoss.zul.Listheader;
32 import org.zkoss.zul.Listitem;
40 private boolean showContract =
false,
41 showTotalAmount =
false;
56 this.showContract = showContract;
60 return showTotalAmount;
64 this.showTotalAmount = showTotalAmount;
69 if(v ==
null)
return null;
86 getParent().appendChild(dam);
97 for(Listitem li : (List<Listitem>) getItems()) {
99 li.setAttribute(
"document", ((
DocumentLine) li.getValue()).getDocument());
103 private void addHeaders() {
104 if(getListhead() !=
null)
return;
105 Listhead lh =
new Listhead();
107 lh.appendChild(
new Listheader(
I_.
get(
"Document"),
null,
"30%"));
108 lh.appendChild(
new Listheader(
I_.
get(
"Date"),
null,
"10%"));
109 lh.appendChild(
new Listheader(
I_.
get(
"Number"),
null,
"10%"));
110 lh.appendChild(
new Listheader(
I_.
get(
"Concept"),
null,
"40%"));
111 lh.appendChild(
new Listheader(
I_.
get(
"Amount"),
null,
"10%"));
115 private void addFooters() {
116 Listfoot lh = getListfoot();
121 lh.getChildren().clear();
122 lh.appendChild(
new Listfooter());
123 lh.appendChild(
new Listfooter());
124 lh.appendChild(
new Listfooter());
125 lh.appendChild(
new Listfooter(DecimalFormats.format(getTotal())));
128 private double getTotal() {
131 total += dl.getTaxable();
DocumentLinesListbox(Collection< DocumentLine > collection)
void setShowTotalAmount(boolean showTotalAmount)
boolean isShowTotalAmount()
String convertToString(DocumentLine v)
void setShowContract(boolean showContract)
String getPartialDescription()
String getFullDescription()
ProductByContractor getProductByContractor()
String getDocumentNumber()
DocumentDefinition getDocumentDefinition()
static String get(String msg)