18 package org.turro.financials.document.contract;
20 import java.util.Collection;
21 import java.util.HashMap;
23 import java.util.logging.Level;
24 import java.util.logging.Logger;
25 import net.sf.jasperreports.engine.JRException;
26 import org.turro.contacts.Contact;
27 import org.turro.elephant.context.Application;
28 import org.turro.elephant.context.ElephantContext;
29 import org.turro.elephant.util.DateFormats;
30 import org.turro.elephant.util.DecimalFormats;
31 import org.turro.financials.entity.Company;
32 import org.turro.financials.entity.Document;
33 import org.turro.financials.entity.DocumentLine;
34 import org.turro.financials.model.business.CompanyWrapper;
35 import org.turro.zkoss.print.ReportButton;
36 import org.turro.zkoss.print.ReportPrint;
47 this.document = document;
51 protected void print(String type) {
53 if(lines !=
null && lines.size() > 0) {
55 int fractionDigits = document.
getCurrency().getDefaultFractionDigits();
56 Map parameters =
new HashMap();
59 parameters.put(
"company", company);
60 parameters.put(
"companyContact", companyContact);
63 parameters.put(
"showDescendants", Boolean.TRUE);
65 parameters.put(
"contractor", contractor);
66 parameters.put(
"exportFormat", type);
71 parameters.put(
"SUBREPORT_DIR",
"../_reports/financials/document/");
77 lines, parameters, file,
"/WEB-INF/_reports/financials/document/Document" +
80 }
catch (JRException ex) {
static ResourceBundle getBundle(String bundle, Locale locale, String configured)
static String getRealPath(String path)
static String logMsg(String msg)
static String getSiteLocales()
void setDocument(Document document)
IContact getIContractor()
Set< DocumentLine > getDocumentLines()
DocumentDefinition getDocumentDefinition()
static Company getCompanyFrom(DocumentLine line)
static void print(String title, Collection collection, Map parameters, String jasperFile, String defaultFile, String type, String certificateStore)