BrightSide Workbench Full Report + Source Code
org.turro.financials.register.BalanceReport Class Reference
Inheritance diagram for org.turro.financials.register.BalanceReport:
Collaboration diagram for org.turro.financials.register.BalanceReport:

Public Member Functions

void setFilter (BalanceFilter filter)
 
- Public Member Functions inherited from org.turro.zkoss.print.ReportToolbarbutton
 ReportToolbarbutton ()
 
void setShowLabels (boolean showLabels)
 
void setShowValues (boolean showValues)
 
void afterCompose ()
 
void doPrint ()
 

Protected Member Functions

void print (final String type)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.zkoss.print.ReportToolbarbutton
boolean showValues = true
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 43 of file BalanceReport.java.

Member Function Documentation

◆ print()

void org.turro.financials.register.BalanceReport.print ( final String  type)
protected

Reimplemented from org.turro.zkoss.print.ReportToolbarbutton.

Definition at line 52 of file BalanceReport.java.

52  {
53  final Collection<AccountRI> ari = filter.getAccountRIs();
54  InputDialog.getInput(
55  getPage(), I_.get("Account balance"), "Start page", 1, "####", 0,
56  new Command() {
57  @Override
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();
63  Company company = CompanyWrapper.getDefaultCompany();
64  Contact companyContact = (Contact) company.getIContact().getContact();
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);
70  parameters.put("dateFormat", DateFormats.getDefaultFormat());
71  parameters.put("currencyFormat", DecimalFormats.getStringFormat(fractionDigits));
72  parameters.put("exportFormat", type);
73  parameters.put("breakdown", filter.getBreakdown());
74  parameters.put("SUBREPORT_DIR", "../_reports/financials/accounting/");
75  String file = filter.hasTwoGroup() ?
76  "/WEB-INF/_reports/financials/accounting/AccountBalanceGroup.jasper" :
77  "/WEB-INF/_reports/financials/accounting/AccountBalance.jasper";
78  try {
79  ReportPrint.print(I_.get("Account balance"),
80  filter.getAccountRIs(), parameters, file, null, type, null);
81  } catch (JRException ex) {
82  Logger.getLogger(BalanceReport.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
83  }
84  }
85  }
86  return null;
87  }
88  });
89  }
Here is the call graph for this function:

◆ setFilter()

void org.turro.financials.register.BalanceReport.setFilter ( BalanceFilter  filter)

Definition at line 47 of file BalanceReport.java.

47  {
48  this.filter = filter;
49  }

The documentation for this class was generated from the following file: