18 package org.turro.financials.register;
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.command.Command;
27 import org.turro.command.Context;
28 import org.turro.contacts.Contact;
29 import org.turro.elephant.context.ElephantContext;
30 import org.turro.elephant.util.DateFormats;
31 import org.turro.elephant.util.DecimalFormats;
32 import org.turro.financials.entity.Company;
33 import org.turro.financials.model.business.CompanyWrapper;
34 import org.turro.i18n.I_;
35 import org.turro.zkoss.dialog.InputDialog;
36 import org.turro.zkoss.print.ReportPrint;
37 import org.turro.zkoss.print.ReportToolbarbutton;
52 protected void print(
final String type) {
55 getPage(),
I_.
get(
"Account balance"),
"Start page", 1,
"####", 0,
58 public Object execute(Context context) {
59 Integer startPage = (Integer) context.get(
"value");
60 if(startPage !=
null) {
61 if(ari !=
null && ari.size() > 0) {
62 Map parameters =
new HashMap();
65 int fractionDigits = companyContact.
getCurrency().getDefaultFractionDigits();
66 parameters.put(
"company", company);
67 parameters.put(
"companyContact", companyContact);
68 parameters.put(
"filter", filter);
69 parameters.put(
"startPage", startPage - 1);
72 parameters.put(
"exportFormat", type);
74 parameters.put(
"SUBREPORT_DIR",
"../_reports/financials/accounting/");
76 "/WEB-INF/_reports/financials/accounting/AccountBalanceGroup.jasper" :
77 "/WEB-INF/_reports/financials/accounting/AccountBalance.jasper";
81 }
catch (JRException ex) {
static String logMsg(String msg)
static Company getDefaultCompany()
Collection< AccountRI > getAccountRIs()
void print(final String type)
void setFilter(BalanceFilter filter)
static String get(String msg)
static void print(String title, Collection collection, Map parameters, String jasperFile, String defaultFile, String type, String certificateStore)